fix: enable model analyzer to resolve DeepSeek-V4 and Qwen3.5 models#1130
Open
kwohting wants to merge 2 commits into
Open
fix: enable model analyzer to resolve DeepSeek-V4 and Qwen3.5 models#1130kwohting wants to merge 2 commits into
kwohting wants to merge 2 commits into
Conversation
kwohting
commented
Jun 22, 2026
- Add support_model_types param to register_model() for co-located model_type registration
- Register DeepseekV4ForCausalLM under deepseek3 (same DeepSeekV2 class)
- Register both ForCausalLM and ForConditionalGeneration variants for Qwen3.5
- Add fuzzy architecture matching (suffix swap) as fallback in get_ft_model_type_by_config
- Add model_type field fallback for unrecognized architectures
- Fix dtype-to-bytes mapping in hf_model_helper (wrong keys FP32/INT8 → correct F32/I8)
- Handle nested text_config for hidden_size in multimodal model configs
|
guoding.lgd seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
…3.5 models - Fix dtype-to-bytes mapping (wrong keys FP32/INT8 → correct HF keys F32/I8) - Add _resolve_ft_model_type with three-level fallback: 1. ModelDict direct lookup (existing behavior) 2. Suffix swap: ForCausalLM ↔ ForConditionalGeneration (endswith-based) 3. model_type field mapping (deepseek_v4→deepseek3, qwen3_5_moe→qwen35_moe, etc.) - Handle nested text_config for hidden_size in multimodal model configs Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
101f380 to
55c4dc3
Compare
Collaborator
AI Code Review - PR #1130Status: LGTM Summary: P0/0 · P1/0 · P2/2 · P3/0 lgtm ready to ci Non-blocking SuggestionsP2
Checklist Violations (4 fail / 56 total)General Principles Checklist
Python Static-First Checklist
Strengths
|
…l_type public - Rename _resolve_ft_model_type → resolve_ft_model_type (public API) - Add 18 unit tests covering: - Direct ModelDict match - Fuzzy arch match (ForCausalLM ↔ ForConditionalGeneration) - model_type map fallback (deepseek_v4, qwen3_5, etc.) - All-miss returns None - Edge cases (empty architectures, no suffix match, NextN not fuzzy-matched) - _DTYPE_BYTES correctness (F32→4, BF16→2, I8→1, unknown→2) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Collaborator
AI Code Review - PR #1130Status: BLOCKING Summary: P0/0 · P1/1 · P2/2 · P3/1 Blocking IssuesP1
Non-blocking SuggestionsP2
P3
Checklist Violations (3 fail / 56 total)General Principles Checklist
Python Static-First Checklist
Strengths
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.