inconsistent `eos_token_id` and `pad_token_id` in model & tokenizer config
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 停滞
- 技術スタック
- python
調査の方向性
Start by running the Python reproduction with AutoTokenizer and AutoModelForCausalLM for Salesforce/codegen-350M-mono, then inspect the loaded model and tokenizer configuration. Done means the bos_token_id and pad_token_id assertions pass alongside the existing eos_token_id assertion.
索引モデルが issue の本文から書いたものです。
説明
Hi,
Based on the paper, codegen is based on gpt2 tokenizer and training scheme, i.e. bos_token, eos_token, and pad_token are "<eodoftext>". However, it seems the HF model config includes the incorrect bos_token_id and pad_token_id (eos_token_id is fixed by https://github.com/salesforce/CodeGen/issues/32).
way to reproduce the issue & expected behavior
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("Salesforce/codegen-350M-mono")
model = AutoModelForCausalLM.from_pretrained("Salesforce/codegen-350M-mono")
assert model.config.eos_token_id == tokenizer.eos_token_id # pass (50256 == 50256)
assert model.config.bos_token_id == tokenizer.bos_token_id # failed (1 != 50256)
assert model.config.pad_token_id == tokenizer.pad_token_id # failed (None != 50256)
- 主要言語
- Python
- スター
- 5.2k
- フォーク
- 420
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
salesforce/CodeGen のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 45/100
salesforce/CodeGen#107 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 20/100
salesforce/CodeGen#104 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
salesforce/CodeGen#101 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 48/100
salesforce/CodeGen#95 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
salesforce/CodeGen#94 · コメント 8 件 ·
salesforce/CodeGen の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
stephrobert/dsoxlab#238 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
sublimehq/package_control#1780 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
nwg-piotr/nwg-displays#145 ·