modelscope / modelscope/ms-swift
最新的swift4.0.2镜像,Qwen3.5-35B-A3B模型gptq量化报错
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 15.7k
- Forks
- 1.7k
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 136
Description
Checklist / 检查清单
- I have searched existing issues, and this is a new bug report. / 我已经搜索过现有的 issues,确认这是一个新的 bug report。
Bug Description / Bug 描述
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/swift/cli/export.py", line 5, in
export_main()
File "/usr/local/lib/python3.11/site-packages/swift/pipelines/export/export.py", line 54, in export_main
return SwiftExport(args).main()
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/swift/pipelines/base.py", line 52, in main
result = self.run()
^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/swift/pipelines/export/export.py", line 31, in run
quantize_model(args)
File "/usr/local/lib/python3.11/site-packages/swift/pipelines/export/quant.py", line 290, in quantize_model
QuantEngine(args).quantize()
File "/usr/local/lib/python3.11/site-packages/swift/pipelines/export/quant.py", line 47, in quantize
gptq_quantizer = self.gptq_model_quantize(v2=(args.quant_method == 'gptq_v2'))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/swift/pipelines/export/quant.py", line 267, in gptq_model_quantize
modules_in_block_to_quantize = self.get_modules_in_block_to_quantize(self.model, block_name_to_quantize)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/swift/pipelines/export/quant.py", line 221, in get_modules_in_block_to_quantize
prefix, experts = QuantEngine._get_experts(block)
^^^^^^^^^^^^^^^
TypeError: cannot unpack non-iterable NoneType object
How to Reproduce / 如何复现
swift4.0.2镜像
Additional Information / 补充信息
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with swift/pipelines/export/quant.py, especially QuantEngine._get_experts and get_modules_in_block_to_quantize around the reported traceback. Reproduce using the swift4.0.2 image and the Qwen3.5-35B-A3B GPTQ export described in the issue. Done means the export no longer raises the NoneType unpacking error and completes quantization.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100