Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Question of unk, bos, and eos tokens.

Aperta
#11 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
25/100
Tipo di issue
Bug
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
python

Direzione di ricerca

Reproduce the report with transformers.AutoTokenizer and the codegen2-7B vocabulary path shown in the issue, then inspect the reported special-token IDs and values. The work is done when the token configuration is explained and any needed tokenizer or documentation change is identified.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Hi,

When I loaded codegen2-7b vocabulary, I found that unk, bos, and eos tokens are identical, which is confused to me since I think these three special tokens should be different. Here is my code and results. Is it normal?

from transformers import AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained("/path/codegen2-7B")

print(f"pad token id: {tokenizer.pad_token_id}")
print(f"unk token id: {tokenizer.unk_token_id}")
print(f"bos token id: {tokenizer.bos_token_id}")
print(f"eos token id: {tokenizer.eos_token_id}")
print(f"pad token: {tokenizer.pad_token}")
print(f"unk token: {tokenizer.unk_token}")
print(f"bos token: {tokenizer.bos_token}")
print(f"eos token: {tokenizer.eos_token}")
Using pad_token, but it is not set yet.
pad token id: None
unk token id: 50256
bos token id: 50256
eos token id: 50256
pad token: None
unk token: <|endoftext|>
bos token: <|endoftext|>
eos token: <|endoftext|>
Lingua principale
Python
Stelle
268
Fork
11
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di salesforce/CodeGen2

Tutte le issue di salesforce/CodeGen2

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.