Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Question of unk, bos, and eos tokens.

Đang mở
#11 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
25/100
Loại issue
Lỗi
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
python
Lĩnh vực
machine-learning

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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|>
Ngôn ngữ chính
Python
Star
268
Fork
11
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của salesforce/CodeGen2

Tất cả issue của salesforce/CodeGen2

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.