"doc/git@developer.sourcefind.cn:wangsen/paddle_dbnet.git" did not exist on "369889b6e009e2a8f85253abe5d03c652056c514"
Unverified Commit d366228d authored by Ratthachat (Jung)'s avatar Ratthachat (Jung) Committed by GitHub
Browse files

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
parent 814b9550
...@@ -677,7 +677,9 @@ class RagSequenceForGeneration(RagPreTrainedModel): ...@@ -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): ...@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment