Skip to content

Fix param mapping for Qwen2#3466

Open
ChingTsai wants to merge 1 commit intomainfrom
jimmytsai/fix-param-mapping-for-qwen2
Open

Fix param mapping for Qwen2#3466
ChingTsai wants to merge 1 commit intomainfrom
jimmytsai/fix-param-mapping-for-qwen2

Conversation

@ChingTsai
Copy link
Collaborator

@ChingTsai ChingTsai commented Mar 20, 2026

Description

  • Resolves param_mapping.py conflicts introduced in this commit.
    • Add back the mapping for Qwen2.5-7b and Qwen2.5-14b

Tests

end2end test for qwen2.5-7b

Checklist

Before submitting this PR, please make sure (put X in square brackets):

  • I have performed a self-review of my code. For an optional AI review, add the gemini-review label.
  • I have necessary comments in my code, particularly in hard-to-understand areas.
  • I have run end-to-end tests tests and provided workload links above if applicable.
  • I have made or will make corresponding changes to the doc if needed, including adding new documentation pages to the relevant Table of Contents (toctree directive) as explained in our documentation.

@codecov
Copy link

codecov bot commented Mar 20, 2026

Codecov Report

❌ Patch coverage is 18.18182% with 9 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...xtext/checkpoint_conversion/utils/param_mapping.py 18.18% 9 Missing ⚠️

📢 Thoughts on this report? Let us know!

@github-actions
Copy link

🤖 Hi @RissyRan, I've received your request, and I'm working on it now! You can track my progress in the logs for more details.

Copy link
Collaborator

@RissyRan RissyRan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

## 📋 Review Summary

This PR successfully fixes the parameter mapping for Qwen2 models by restoring support for qwen2.5-7b and qwen2.5-14b. It also introduces necessary Q/K/V bias hooks and cleanly renames the internal mapping functions to be more general (QWEN_ instead of QWEN3_).

🔍 General Feedback

  • The addition of reshape_bias perfectly complements the new bias hooks for Qwen attention layers.
  • Consider removing the redundant conditional in the reshape_bias function to keep the code DRY, as the underlying reshape operation inherently handles both directions correctly.

@ChingTsai ChingTsai force-pushed the jimmytsai/fix-param-mapping-for-qwen2 branch from 31d2f5c to 19b0ea1 Compare March 24, 2026 03:20
@ChingTsai ChingTsai force-pushed the jimmytsai/fix-param-mapping-for-qwen2 branch from 19b0ea1 to c6679fa Compare March 24, 2026 05:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants