Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

incorrect model_max_length #289

Open
joemkwon opened this issue Jun 28, 2023 · 1 comment
Open

incorrect model_max_length #289

joemkwon opened this issue Jun 28, 2023 · 1 comment

Comments

@joemkwon
Copy link

I don't understand why the default model_max_length is set to 512, and the example training bash script on the main readme doesn't pass in an argument for that as 2048 (the context size for llama). What's going on here? Thanks.

@joemkwon
Copy link
Author

Not sure if maybe this is in action:
"When the tokenizer is loaded with from_pretrained, this will be set to the value stored for the associated model in max_model_input_sizes (see above). If no value is provided, will default to VERY_LARGE_INTEGER (int(1e30)). no associated max_length can be found in max_model_input_sizes."

However, it seems odd that this happens and at the same time, the tokenizer in train.py is specified as:
tokenizer = transformers.LlamaTokenizer.from_pretrained(
model_args.model_name_or_path,
cache_dir=training_args.cache_dir,
model_max_length=training_args.model_max_length,
padding_side="right",
use_fast=False,
)

Specifically using traning_args.model_max_length not any model attribute.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant