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

Delete legacy layer in TinyBern2 model #33

Open
RichJackson opened this issue Jun 10, 2024 · 0 comments
Open

Delete legacy layer in TinyBern2 model #33

RichJackson opened this issue Jun 10, 2024 · 0 comments

Comments

@RichJackson
Copy link
Collaborator

original comment from @wonjininfo

@RichJackson reported warning when we load the model:

Some weights of the model checkpoint at .../kazu/kazu_model_pack_public-v0.0.25/tinybern were not used when initializing BertForTokenClassification: ['fit_dense.weight', 'fit_dense.bias']
- This IS expected if you are initializing BertForTokenClassification 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 BertForTokenClassification from the checkpoint of a model that you expect to be exactly identical (initializing a BertForSequenceClassification model from a BertForSequenceClassification model).

I think, this layer (fit_dense) comes from legacy code and will not affect performance or functionality.

Related code:
https://github.com/AstraZeneca/KAZU/blob/main/kazu/modelling/distillation/tiny_transformers.py#L56-L57

Todo: I will first double-check it and will delete fit_dense layer!

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