File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -690,6 +690,9 @@ def recurse_elems(elem: Any):
690690 "quant_method" : "fp8" ,
691691 "activation_scheme" : "static"
692692 }
693+ elif quantization .get ("quant_method" ) == "compressed-tensors" :
694+ # Pass through the quantization config to compressed-tensors
695+ quantization_config = quantization
693696 else :
694697 raise ValueError (
695698 f"Found unknown quantization='{ quantization } ' in config" )
@@ -707,13 +710,16 @@ def recurse_elems(elem: Any):
707710
708711 if config_type == "multimodal" :
709712 multimodal_config = config_dict .pop ("vision_encoder" )
713+ quantization_config = config_dict .get ("quantization_config" , {})
710714
711715 config_dict = {
712716 "text_config" : config_dict ,
713717 "vision_config" : multimodal_config
714718 }
715719 config_dict ["architectures" ] = ["PixtralForConditionalGeneration" ]
716720 config_dict ["model_type" ] = "pixtral"
721+ if quantization_config :
722+ config_dict ["quantization_config" ] = quantization_config
717723
718724 config_dict .update (kwargs )
719725
You can’t perform that action at this time.
0 commit comments