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

Using AlephBERT in evaluation mode from allennlp #3

Open
yuvalkry opened this issue Apr 25, 2022 · 0 comments
Open

Using AlephBERT in evaluation mode from allennlp #3

yuvalkry opened this issue Apr 25, 2022 · 0 comments

Comments

@yuvalkry
Copy link

Hi,

I am loading AlephBERT using the "transformers" package via allennlp using the following jsonnet definition:

"token_embedders": {
            "bert": {
                "type": "pretrained_transformer",
                "model_name": "onlplab/alephbert-base",
                "eval_mode": true,
            }
        }

The flag "eval_mode" indicates that I am not going to train the model, I am using it in order to calculate embeddings.

When running, the module which loads the model (transformers.modeling_utils) issues the following message:

Some weights of BertModel were not initialized from the model checkpoint at onlplab/alephbert-base and are newly initialized: ['bert.pooler.dense.weight', 'bert.pooler.dense.bias']
You should probably TRAIN this model on a down-stream task to be able to use it for predictions and inference.

Do these weights affect the calculation of embeddings? if so, how to fix it?

Thanks,
Yuval

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