parent
							
								
									3e2af5ec0a
								
							
						
					
					
						commit
						f8730e8dc1
					
				
					 1 changed files with 4 additions and 0 deletions
				
			
		| 
						 | 
					@ -561,6 +561,10 @@ class _BaseAutoModelClass:
 | 
				
			||||||
        else:
 | 
					        else:
 | 
				
			||||||
            model = model_class(config, *model_args, **kwargs)
 | 
					            model = model_class(config, *model_args, **kwargs)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        # rwkv model linear layers has been rescaled
 | 
				
			||||||
 | 
					        if model.config.model_type == "rwkv":
 | 
				
			||||||
 | 
					            model.layers_are_rescaled = True
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        # Loading args may differ based on their usage
 | 
					        # Loading args may differ based on their usage
 | 
				
			||||||
        quant_device = "meta" if bigdl_lcmu_enabled else "cpu"
 | 
					        quant_device = "meta" if bigdl_lcmu_enabled else "cpu"
 | 
				
			||||||
        model = ggml_convert_low_bit(model, qtype, optimize_model, device=quant_device,
 | 
					        model = ggml_convert_low_bit(model, qtype, optimize_model, device=quant_device,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue