[BUG] CodeGen 2.5 Tokenizer cannot be initialized anymore
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- 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 failure with AutoTokenizer.from_pretrained for the mono and multi CodeGen 2.5 models using trust_remote_code=True. Start from the tokenization initialization path shown in the traceback and investigate the add_special_tokens conflict; done means both tokenizer constructions initialize successfully.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
The code from https://huggingface.co/Salesforce/codegen25-7b-multi_P#causal-sampling-code-autocompletion and https://github.com/salesforce/CodeGen/tree/main/codegen25#sampling does not work currently.
Creating the tokenizer like
tokenizer = AutoTokenizer.from_pretrained("Salesforce/codegen25-7b-mono", trust_remote_code=True)
# or
tokenizer = AutoTokenizer.from_pretrained("Salesforce/codegen25-7b-multi", trust_remote_code=True)
gives an error:
Traceback (most recent call last):
File "C:\teamscale\teamscale\server\com.teamscale.service\src\main\resources\com\teamscale\service\testimpact\embeddings_prioritization\ml\code_gen_embedder.py", line 4, in <module>
tokenizer = AutoTokenizer.from_pretrained("Salesforce/codegen25-7b-multi", trust_remote_code=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Alessandro\AppData\Local\Programs\Python\Python312\Lib\site-packages\transformers\models\auto\tokenization_auto.py", line 905, in from_pretrained
return tokenizer_class.from_pretrained(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Alessandro\AppData\Local\Programs\Python\Python312\Lib\site-packages\transformers\tokenization_utils_base.py", line 2213, in from_pretrained
return cls._from_pretrained(
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Alessandro\AppData\Local\Programs\Python\Python312\Lib\site-packages\transformers\tokenization_utils_base.py", line 2447, in _from_pretrained
tokenizer = cls(*init_inputs, **init_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Alessandro\.cache\huggingface\modules\transformers_modules\Salesforce\codegen25-7b-multi\0bdf3f45a09e4f53b333393205db1388634a0e2e\tokenization_codegen25.py", line 136, in __init__
super().__init__(
File "C:\Users\Alessandro\AppData\Local\Programs\Python\Python312\Lib\site-packages\transformers\tokenization_utils.py", line 435, in __init__
super().__init__(**kwargs)
File "C:\Users\Alessandro\AppData\Local\Programs\Python\Python312\Lib\site-packages\transformers\tokenization_utils_base.py", line 1592, in __init__
raise AttributeError(f"{key} conflicts with the method {key} in {self.__class__.__name__}")
AttributeError: add_special_tokens conflicts with the method add_special_tokens in CodeGen25Tokenizer
I have installed tiktoken==0.8.0 as installation of tiktoken==0.4.0 via pip fails.
- Ngôn ngữ chính
- Python
- Star
- 5.2k
- Fork
- 420
- 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
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của salesforce/CodeGen
-
Verify evals on Papers with Code Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 45/100
salesforce/CodeGen#107 ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 20/100
salesforce/CodeGen#104 ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
salesforce/CodeGen#101 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 48/100
salesforce/CodeGen#95 ·
-
The output is comments, not code Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
salesforce/CodeGen#93 ·
Tất cả issue của salesforce/CodeGen
Issue tương tự
-
agent-ready documentation needs-triage
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 88/100
-
documentation
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 91/100
-
workflow-status page template still says reusable workflows are "triggered only by workflow_call:" Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
-
Add https://search.jeremyh.xyz/ Đang mởinstance instance add
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
searxng/searx-instances#939 · 1 bình luận ·
-
area-deployment area-integrations triage:bot-seen
Độ khó 2/5 Nửa ngày Mức phù hợp với người mới 86/100