mirror of
https://github.com/huggingface/transformers.git
synced 2025-07-31 02:02:21 +06:00
fix doc example - AttributeError: type object 'RagModel' has no attribute 'from_question_encoder_generator_pretrained' (#15076)
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
This commit is contained in:
parent
b2c477fc6d
commit
533624c5a9
@ -305,7 +305,7 @@ class RagPreTrainedModel(PreTrainedModel):
|
||||
>>> from transformers import RagModel
|
||||
|
||||
>>> # initialize a RAG from two pretrained models.
|
||||
>>> model = RagModel.from_question_encoder_generator_pretrained(
|
||||
>>> model = RagModel.from_pretrained_question_encoder_generator(
|
||||
... "facebook/dpr-question_encoder-single-nq-base", "t5-small"
|
||||
... )
|
||||
>>> # saving model after fine-tuning
|
||||
|
Loading…
Reference in New Issue
Block a user