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

Unable to execute run_simple() with different models of the same type #1348

Open
TimDettmers opened this issue Mar 25, 2022 · 0 comments
Open

Comments

@TimDettmers
Copy link
Contributor

Describe the bug

When one uses run_simple() with different models of the same type roberta-base and roberta-large the run crashes because the code assumes they are the same model because weights are saved under hf_config.model_type (instead of args.hf_pretrained_model_name_or_path.). As such, the code tries to load incompatible weights and crashes.

To Reproduce

  1. Install jiant
  2. Run the simple example in README
  3. Change the model in the sample from 'roberta-basetoroberta-large`

Expected behavior
One should be able to run run_simple() with different models of the same type.

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Solution: The hf_config.model_type should be used for caching tokenizer / tasks. The args.hf_pretrained_model_name_or_path for the weights.

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