Skip to content

Commit ce087cd

Browse files
csarronNathanHB
andauthored
Fix max_length type in base_model.py (#138)
Co-authored-by: Nathan Habib <[email protected]>
1 parent 017581f commit ce087cd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lighteval/models/base_model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ def _init_max_length(self, max_length) -> int:
259259
int: Max length to use depending on the available args and config
260260
"""
261261
if max_length is not None:
262-
return max_length
262+
return int(max_length)
263263
# Try to get the sequence length from the model config.
264264
seqlen_config_attrs = ("n_positions", "max_position_embeddings", "n_ctx")
265265

0 commit comments

Comments
 (0)