remove nf4 unsupport comment in cpu finetuning (#12460)
Co-authored-by: Ariadne <wyn2000330@126.com>
This commit is contained in:
		
							parent
							
								
									b29da30205
								
							
						
					
					
						commit
						d272f6b471
					
				
					 2 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
					@ -181,7 +181,7 @@ def train(
 | 
				
			||||||
        bnb_config = BitsAndBytesConfig(
 | 
					        bnb_config = BitsAndBytesConfig(
 | 
				
			||||||
            load_in_4bit=True,
 | 
					            load_in_4bit=True,
 | 
				
			||||||
            bnb_4bit_use_double_quant=False,
 | 
					            bnb_4bit_use_double_quant=False,
 | 
				
			||||||
            bnb_4bit_quant_type="int4",  # nf4 not supported on cpu yet
 | 
					            bnb_4bit_quant_type="int4",
 | 
				
			||||||
            bnb_4bit_compute_dtype=torch.bfloat16
 | 
					            bnb_4bit_compute_dtype=torch.bfloat16
 | 
				
			||||||
        )
 | 
					        )
 | 
				
			||||||
        model = AutoModelForCausalLM.from_pretrained(base_model,
 | 
					        model = AutoModelForCausalLM.from_pretrained(base_model,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -62,7 +62,7 @@ if __name__ == "__main__":
 | 
				
			||||||
    bnb_config = BitsAndBytesConfig(
 | 
					    bnb_config = BitsAndBytesConfig(
 | 
				
			||||||
        load_in_4bit=True,
 | 
					        load_in_4bit=True,
 | 
				
			||||||
        bnb_4bit_use_double_quant=False,
 | 
					        bnb_4bit_use_double_quant=False,
 | 
				
			||||||
        bnb_4bit_quant_type="int4",  # nf4 not supported on cpu yet
 | 
					        bnb_4bit_quant_type="int4",
 | 
				
			||||||
        bnb_4bit_compute_dtype=torch.bfloat16
 | 
					        bnb_4bit_compute_dtype=torch.bfloat16
 | 
				
			||||||
    )
 | 
					    )
 | 
				
			||||||
    model = AutoModelForCausalLM.from_pretrained(model_path,
 | 
					    model = AutoModelForCausalLM.from_pretrained(model_path,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue