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

[Bug] load_model not using revision #9

Open
joshlevy89 opened this issue May 20, 2024 · 0 comments
Open

[Bug] load_model not using revision #9

joshlevy89 opened this issue May 20, 2024 · 0 comments

Comments

@joshlevy89
Copy link
Owner

In the examples (and evals on honesty-eval branch), when load_model is called in the setup of the notebook, the "revision" parameter is only passed to the model from_pretrained, but not the tokenizer from_pretrained. I doubt this makes a difference - probably the tokenizer is the same for the revision as for the main branch for the models I've used - but nevertheless, should be added.

Should add what is in bold.

def load_model(model_name_or_path, revision, device):
model = AutoModelForCausalLM.from_pretrained(
model_name_or_path, device_map=device, revision=revision, trust_remote_code=False)
tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, use_fast=True, padding_side="left", revision=revision)
tokenizer.pad_token_id = 0
return model, tokenizer

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