-
Notifications
You must be signed in to change notification settings - Fork 1.8k
[None] [feat] Add Tencent HunYuanMoEV1 model support #5521
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
Changes from all commits
b2f52bd
b41cd6d
d765309
8d8f840
0ac773c
387818d
0d79fd9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,6 +8,7 @@ | |
| from .modeling_gemma3 import Gemma3ForCausalLM | ||
| from .modeling_gemma3vl import Gemma3VLM | ||
| from .modeling_gpt_oss import GptOssForCausalLM | ||
| from .modeling_hunyuan_moe import HunYuanMoEV1ForCausalLM | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Missing import for Gemma3Model while exporting it in all "Gemma3Model" is added to all but is not imported, which will break direct imports like Apply this diff: -from .modeling_gemma3 import Gemma3ForCausalLM
+from .modeling_gemma3 import Gemma3ForCausalLM, Gemma3Model
🤖 Prompt for AI Agents |
||
| from .modeling_hyperclovax import HCXVisionForCausalLM | ||
| from .modeling_llama import LlamaForCausalLM | ||
| from .modeling_llava_next import LlavaNextModel | ||
|
|
@@ -38,6 +39,7 @@ | |
| "Gemma3ForCausalLM", | ||
| "Gemma3VLM", | ||
| "HCXVisionForCausalLM", | ||
| "HunYuanMoEV1ForCausalLM", | ||
| "LlamaForCausalLM", | ||
| "LlavaNextModel", | ||
| "Mistral3VLM", | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
Guard against tokenizers without a chat template and reduce scope of temporaries
Without a guard, enabling the flag on models lacking a chat template will raise and crash the example. Also, move
new_promptsinto the if-block to reduce scope.You can verify this by running with a tokenizer that lacks a chat template; the current code will raise on
apply_chat_template.If you prefer structured logging instead of print, add this import at the top of the file and replace the print with
logger.warning(...):🏁 Script executed:
Length of output: 10606
🏁 Script executed:
Length of output: 1389
🏁 Script executed:
Length of output: 1986
🏁 Script executed:
Length of output: 317
🏁 Script executed:
Length of output: 224
Guard chat-template usage and limit
new_promptsscope in quickstart_advanced.pyMove the declaration of
new_promptsinto theifblock and wrap chat‐template calls in a try/except to skip unsupported tokenizers instead of crashing:If you’d rather use structured logging, add at the top:
and replace
print(...)with:🤖 Prompt for AI Agents