allenai / allenai/longformer

Longformer model with weight(model.encoder.embed_positions.weight) error

オープン
#186 コメント 3 件 リアクション 2 件 担当者 0 名 GitHub で見る
主要言語
Python
スター
2.2k
フォーク
286
PR マージ指標
30日以内にマージされた PR はありません

説明

```bash
RuntimeError: Error(s) in loading state_dict for BartModel:
size mismatch for model.encoder.embed_positions.weight: copying a param with shape torch.Size([16386, 768]) from checkpoint, the shape in current model is torch.Size([1026, 768]).
```

I use longformer model called longformer-encdec-base-16384 which is downloaded in https://github.com/allenai/longformer,and use huggingface to load the model,when transformers’ version is 3.1.0, the code can run, but when it is 4.4.2,the error happened.

MeanWhile,when I use the model to proposal pairs of sentences,I found it that the returned token_type_ids values are just zero
without one. how ever,in the model's special_tokens_map.json, it has defined cls_token and sep_token.

Finally, I sincerely hope you would reply me soon. Thanks!

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。