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

HF Model loading fixes #59

Merged
merged 3 commits into from
Jul 26, 2024
Merged

HF Model loading fixes #59

merged 3 commits into from
Jul 26, 2024

Conversation

farzadab
Copy link
Contributor

This PR fixes the following:

  1. gets rid of the unexpected weights warnings
  2. makes HF model loading faster by skipping random initialization

Example of the unexpected weights warning that this PR is supposed to resolve:

Some weights of the model checkpoint at fixie-ai/ultravox_dev were not used when initializing UltravoxModel: ['language_model.lm_head.weight', 'language_model.model.embed_tokens.weight', 'language_model.model.layers.0.input_layernorm.weight',

...

- This IS expected if you are initializing UltravoxModel from the checkpoint of a model trained on another task or with another architecture (e.g. initializing a BertForSequenceClassification model from a BertForPreTraining model).
- This IS NOT expected if you are initializing UltravoxModel from the checkpoint of a model that you expect to be exactly identical (initializing a BertForSequenceClassification model from a BertForSequenceClassification model).

@farzadab farzadab requested review from juberti and zqhuang211 July 26, 2024 00:08
ultravox/model/ultravox_model.py Outdated Show resolved Hide resolved
@farzadab farzadab enabled auto-merge (squash) July 26, 2024 23:24
@farzadab farzadab merged commit 4212376 into main Jul 26, 2024
1 check passed
@farzadab farzadab deleted the farzad/hf-model-load-fixes branch July 26, 2024 23:28
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

Successfully merging this pull request may close these issues.

3 participants