Skip to content

qwen3 tokenizer convert fail #21242

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

Closed
pass-lin opened this issue May 2, 2025 · 0 comments
Closed

qwen3 tokenizer convert fail #21242

pass-lin opened this issue May 2, 2025 · 0 comments
Assignees

Comments

@pass-lin
Copy link
Contributor

pass-lin commented May 2, 2025

I'm adding Qwen3's implementation to Keras_hub, and now I'm encountering a problem.

The tokenizer of qwen3 and qwen2 is the same. But we can't convert it directly with keras_hub. What's the reason for this? How can we solve it?

from keras_hub.tokenizers import Qwen2Tokenizer
Qwen2Tokenizer.from_preset("hf://Qwen/Qwen2.5-0.5B")
’‘’
<QwenTokenizer name=qwen_tokenizer_5, built=False>
‘’‘
Qwen2Tokenizer.from_preset("hf://Qwen/Qwen2.5-0.6B")
'''
InvalidArgumentError: {{function_node __wrapped__LookupTableImportV2_device_/job:localhost/replica:0/task:0/device:CPU:0}} Expected shape [151387,2] for value, got [151387] [Op:LookupTableImportV2] name:
'''

We can't achieve qwen3 without solving this problem.

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

2 participants