2 typos in modeling_rag.py (#8676)
* 2 typos - from_question_encoder_generator_configs fix 2 typos from_encoder_generator_configs --> from_question_encoder_generator_configs * apply make style
This commit is contained in:
committed by
GitHub
parent
814b9550d7
commit
d366228df1
@@ -677,7 +677,9 @@ class RagSequenceForGeneration(RagPreTrainedModel):
|
|||||||
), "Either a configuration or an encoder and a generator has to be provided."
|
), "Either a configuration or an encoder and a generator has to be provided."
|
||||||
|
|
||||||
if config is None:
|
if config is None:
|
||||||
config = RagConfig.from_encoder_generator_configs(question_encoder.config, generator.config, **kwargs)
|
config = RagConfig.from_question_encoder_generator_configs(
|
||||||
|
question_encoder.config, generator.config, **kwargs
|
||||||
|
)
|
||||||
super().__init__(config)
|
super().__init__(config)
|
||||||
|
|
||||||
# instantiate model
|
# instantiate model
|
||||||
@@ -1001,7 +1003,9 @@ class RagTokenForGeneration(RagPreTrainedModel):
|
|||||||
), "Either a configuration or an encoder and a generator has to be provided."
|
), "Either a configuration or an encoder and a generator has to be provided."
|
||||||
|
|
||||||
if config is None:
|
if config is None:
|
||||||
config = RagConfig.from_encoder_generator_configs(question_encoder.config, generator.config, **kwargs)
|
config = RagConfig.from_question_encoder_generator_configs(
|
||||||
|
question_encoder.config, generator.config, **kwargs
|
||||||
|
)
|
||||||
|
|
||||||
super().__init__(config)
|
super().__init__(config)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user