Fixing question-answering with long contexts (#13873)
* Tmp. * Fixing BC for question answering with long context. * Capping model_max_length to avoid tf overflow. * Bad workaround bugged roberta. * Fixing name.
This commit is contained in:
@@ -162,6 +162,11 @@ class LEDModelTester:
|
||||
attention_window=self.attention_window,
|
||||
)
|
||||
|
||||
def get_pipeline_config(self):
|
||||
config = self.get_config()
|
||||
config.max_position_embeddings = 100
|
||||
return config
|
||||
|
||||
def prepare_config_and_inputs_for_common(self):
|
||||
config, inputs_dict = self.prepare_config_and_inputs()
|
||||
global_attention_mask = torch.zeros_like(inputs_dict["input_ids"])
|
||||
|
||||
Reference in New Issue
Block a user