Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Telechat-12b的Tokenizer是不是有问题? #79

Open
Sun-Xiaohui opened this issue Nov 22, 2024 · 0 comments
Open

Telechat-12b的Tokenizer是不是有问题? #79

Sun-Xiaohui opened this issue Nov 22, 2024 · 0 comments

Comments

@Sun-Xiaohui
Copy link

encode和decode绝大多数情况下应该是一个互逆操作,但是12b模型的tokenizer,encode和decode表现如下

PATH = '/toolchain/LLM/telechat-12b-hf'
tokenizer = AutoTokenizer.from_pretrained(PATH, trust_remote_code=True)
print(tokenizer.encode(tokenizer.decode([2000]))) #[561,579]
print(tokenizer.decode([579])) # 'red'
print(tokenizer.encode('red')) # [2952]
print(tokenizer.decode([2952])) # 'red'

可以解答一下吗? @hannawong @ZiYu0427 @liuxz0801 @Unknown-Body @LSX-Sneakerprogrammer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant