Skip to content

Commit

Permalink
Make it compatible with multilingual-lighteval.
Browse files Browse the repository at this point in the history
  • Loading branch information
Negar Foroutan Eghlidi authored and negar-foroutan committed Oct 4, 2024
1 parent 94f3da5 commit 4d6c1d3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/nanotron/config/lighteval_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ def __post_init__(self):
class LightEvalTasksArgs:
"""Arguments related to tasks for LightEval"""

langs: Optional[str] = None
tasks: Optional[str] = None
custom_tasks: Optional[str] = None
max_samples: Optional[int] = None
Expand Down
2 changes: 1 addition & 1 deletion src/nanotron/models/llama.py
Original file line number Diff line number Diff line change
Expand Up @@ -757,7 +757,7 @@ def forward(
self,
input_ids: Union[torch.Tensor, TensorPointer], # [batch_size, seq_length]
input_mask: Union[torch.Tensor, TensorPointer], # [batch_size, seq_length]
lang_code: Union[torch.Tensor, TensorPointer], # [batch_size, 1]
lang_code: Union[torch.Tensor, TensorPointer]=None, # [batch_size, 1]
):
return self.forward_with_hidden_states(input_ids=input_ids, input_mask=input_mask, lang_code=lang_code)[0]

Expand Down

0 comments on commit 4d6c1d3

Please sign in to comment.