Maybe a bug in vicuna's tokenizer
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 39.5k
- Forks
- 4.8k
- PR merge metrics
- No merged PRs in 30d
Description
```python
from transformers import LlamaTokenizer
llama_tokenizer = LlamaTokenizer.from_pretrained("Path to your weight/vicuna_13b", use_fast=False)
llama_tokenizer.add_special_tokens({'pad_token': '[PAD]'})
print(llama_tokenizer.decode([3869], add_special_tokens=False) == llama_tokenizer.decode([8241], add_special_tokens=False))
print(llama_tokenizer.decode([1939], add_special_tokens=False) == llama_tokenizer.decode([3782], add_special_tokens=False))
print(llama_tokenizer.decode([3869], add_special_tokens=False), llama_tokenizer.decode([8241], add_special_tokens=False))
print(llama_tokenizer.decode([1939], add_special_tokens=False), llama_tokenizer.decode([3782], add_special_tokens=False))
```
terminal output:

So anyone know why there are two same "Yes" and two same "No" in the vocab?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the Python reproduction with LlamaTokenizer and the Vicuna weights referenced in the issue. Inspect how token IDs 3869, 8241, 1939, and 3782 map to decoded text; done means determining whether the duplicate decoded strings are expected tokenizer behavior or an actionable bug.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100