-
Notifications
You must be signed in to change notification settings - Fork 274
update qwen quant #880
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
Draft
zhewenl
wants to merge
1
commit into
NVIDIA:ajrasane/qwen3-omni-30B
Choose a base branch
from
zhewenl:zhewen/patch-qwen-quant
base: ajrasane/qwen3-omni-30B
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
update qwen quant #880
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| saved_models_* | ||
| *.model | ||
| model_config.yaml | ||
| qwen3_omni_30b_nvfp4/ |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -766,7 +766,11 @@ def pre_quantize( | |
| elif model_type == "qwen3omni": | ||
| # Qwen3Omni returns (text_ids, audio) tuple; text_ids has .sequences | ||
| # Pass full batch with all multimodal inputs | ||
| result = full_model.generate(**calib_batch, max_new_tokens=100) | ||
| print("[DEBUG] pre_quantize: starting qwen3omni preview generation (max_new_tokens=100)...", flush=True) | ||
| result = full_model.generate( | ||
| **calib_batch, max_new_tokens=100, thinker_max_new_tokens=100 | ||
| ) | ||
| print("[DEBUG] pre_quantize: preview generation complete", flush=True) | ||
| if isinstance(result, tuple): | ||
| text_ids, _ = result | ||
| generated_ids_before_ptq = ( | ||
|
|
@@ -827,7 +831,11 @@ def post_quantize( | |
| elif model_type == "qwen3omni": | ||
| # Qwen3Omni returns (text_ids, audio) tuple; text_ids has .sequences | ||
| # Pass full batch with all multimodal inputs | ||
| result = full_model.generate(**calib_batch, max_new_tokens=100) | ||
| # Note: thinker_max_new_tokens controls the thinker's generation limit (default 1024), | ||
| # which is separate from max_new_tokens. Cap it to avoid long waits. | ||
| result = full_model.generate( | ||
| **calib_batch, max_new_tokens=100, thinker_max_new_tokens=100 | ||
|
Author
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. updated here |
||
| ) | ||
| if isinstance(result, tuple): | ||
| text_ids, _ = result | ||
| generated_ids_after_ptq = ( | ||
|
|
@@ -958,9 +966,11 @@ def quantize_main( | |
| # Detect if this is a Nemotron VL model using architecture-based detection | ||
| is_nemotron_vl_model = is_nemotron_vl(full_model) | ||
|
|
||
| print("[DEBUG] quantize_main: calling pre_quantize...", flush=True) | ||
| preview_input_ids, generated_ids_before_ptq, calib_batch = pre_quantize( | ||
| args, full_model, model_type, tokenizer, calib_dataloader, is_nemotron_vl_model | ||
| ) | ||
| print("[DEBUG] quantize_main: pre_quantize done, proceeding to quantization", flush=True) | ||
|
|
||
| if args.auto_quantize_bits: | ||
| assert len(args.qformat.split(",")) > 1, ( | ||
|
|
||
Oops, something went wrong.
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.
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.
updated here