# Regarding Rag-end2end t5 model

**URL:** <https://discuss.huggingface.co/t/regarding-rag-end2end-t5-model/32043>\
**Category:** Models\
**Created:** [February 19, 2023, 8:31pm UTC](https://discuss.huggingface.co/t/regarding-rag-end2end-t5-model/32043 "2023-02-19T20:31:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![RajDoshi](https://avatars.discourse-cdn.com/v4/letter/r/a88e57/32.png) [@RajDoshi](https://discuss.huggingface.co/u/RajDoshi)\
**Post date:** [February 19, 2023, 8:31pm UTC](https://discuss.huggingface.co/t/regarding-rag-end2end-t5-model/32043/1 "2023-02-19T20:31:15Z")

</div>

@shamanez  
I just wanted to know in rag-end2end retriever I want my architecture to be t5-based!  
using  
– model\_path t5-small  
–model\_type t5

still there is some error saying:  
File “/home/ec2-user/SageMaker/transformers/examples/research\_projects/rag-end2end-retriever/lightning\_base.py”, line 279, in on\_sanity\_check\_start  
pl\_module.model.rag.retriever.init\_retrieval() # better to use hook functions.  
File “/home/ec2-user/anaconda3/envs/python3/lib/python3.10/site-packages/torch/nn/modules/module.py”, line 1269, in **getattr**  
raise AttributeError(“‘{}’ object has no attribute ‘{}’”.format(  
AttributeError: ‘T5ForConditionalGeneration’ object has no attribute ‘rag’

need help!

---

<div class="post-metadata">

**Author:** ![shamanez](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/shamanez/32/17994_2.png) [@shamanez](https://discuss.huggingface.co/u/shamanez)\
**Post date:** [March 5, 2023, 11:06pm UTC](https://discuss.huggingface.co/t/regarding-rag-end2end-t5-model/32043/2 "2023-03-05T23:06:44Z")

</div>

For this, you might need to play around with the rag\_modelling.py
