详细报错信息
Traceback (most recent call last):
File "/mnt/d/ai/swift/swift/cli/export.py", line 5, in
export_main()
File "/mnt/d/ai/swift/swift/utils/run_utils.py", line 32, in x_main
result = llm_x(args, *kwargs)
File "/mnt/d/ai/swift/swift/llm/export.py", line 263, in llm_export
gptq_quantizer = gptq_model_quantize(model, template.tokenizer, args.quant_batch_size)
File "/mnt/d/ai/swift/swift/llm/export.py", line 162, in gptq_model_quantize
gptq_quantizer.quantize_model(model, tokenizer)
File "/mnt/d/envs_swift/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 116, in decorate_context
return func(args, **kwargs)
File "/mnt/d/envs_swift/lib/python3.10/site-packages/optimum/gptq/quantizer.py", line 570, in quantize_model
self.pack_model(model=model, quantizers=quantizers)
File "/mnt/d/envs_swift/lib/python3.10/site-packages/optimum/gptq/quantizer.py", line 641, in pack_model
self._replace_by_quant_layers(model, quantizers)
File "/mnt/d/envs_swift/lib/python3.10/site-packages/optimum/gptq/quantizer.py", line 299, in _replace_by_quant_layers
self._replace_by_quant_layers(child, names, name + "." + name1 if name != "" else name1)
File "/mnt/d/envs_swift/lib/python3.10/site-packages/optimum/gptq/quantizer.py", line 267, in _replace_by_quant_layers
layer = getattr(module, attr)
File "/mnt/d/envs_swift/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1729, in getattr
raise AttributeError(f"'{type(self).name}' object has no attribute '{name}'")
AttributeError: 'Qwen2AudioEncoder' object has no attribute '_supports_sdpa'
详细报错信息 Traceback (most recent call last): File "/mnt/d/ai/swift/swift/cli/export.py", line 5, in
export_main()
File "/mnt/d/ai/swift/swift/utils/run_utils.py", line 32, in x_main
result = llm_x(args, *kwargs)
File "/mnt/d/ai/swift/swift/llm/export.py", line 263, in llm_export
gptq_quantizer = gptq_model_quantize(model, template.tokenizer, args.quant_batch_size)
File "/mnt/d/ai/swift/swift/llm/export.py", line 162, in gptq_model_quantize
gptq_quantizer.quantize_model(model, tokenizer)
File "/mnt/d/envs_swift/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 116, in decorate_context
return func(args, **kwargs)
File "/mnt/d/envs_swift/lib/python3.10/site-packages/optimum/gptq/quantizer.py", line 570, in quantize_model
self.pack_model(model=model, quantizers=quantizers)
File "/mnt/d/envs_swift/lib/python3.10/site-packages/optimum/gptq/quantizer.py", line 641, in pack_model
self._replace_by_quant_layers(model, quantizers)
File "/mnt/d/envs_swift/lib/python3.10/site-packages/optimum/gptq/quantizer.py", line 299, in _replace_by_quant_layers
self._replace_by_quant_layers(child, names, name + "." + name1 if name != "" else name1)
File "/mnt/d/envs_swift/lib/python3.10/site-packages/optimum/gptq/quantizer.py", line 267, in _replace_by_quant_layers
layer = getattr(module, attr)
File "/mnt/d/envs_swift/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1729, in getattr
raise AttributeError(f"'{type(self).name}' object has no attribute '{name}'")
AttributeError: 'Qwen2AudioEncoder' object has no attribute '_supports_sdpa'