Update koalpaca.py

#1
by 4n3mone - opened
Files changed (1) hide show
  1. koalpaca.py +2 -1
koalpaca.py CHANGED
@@ -13,7 +13,8 @@ class KoAlpaca(Model):
13
  bnb_4bit_quant_type="nf4",
14
  bnb_4bit_compute_dtype=torch.bfloat16
15
  )
16
- self.model = AutoModelForCausalLM.from_pretrained(config.base_model_name_or_path, quantization_config=self.bnb_config, device_map={"":0})
 
17
  self.model = PeftModel.from_pretrained(self.model, peft_model_id)
18
  self.tokenizer = AutoTokenizer.from_pretrained(config.base_model_name_or_path)
19
  self.gen_config = GenerationConfig.from_pretrained('./models/koalpaca', 'gen_config.json')
 
13
  bnb_4bit_quant_type="nf4",
14
  bnb_4bit_compute_dtype=torch.bfloat16
15
  )
16
+ #self.model = AutoModelForCausalLM.from_pretrained(config.base_model_name_or_path, quantization_config=self.bnb_config, device_map={"":0})
17
+ self.model = AutoModelForCausalLM.from_pretrained(config.base_model_name_or_path, quantization_config=self.bnb_config, device_map=auto)
18
  self.model = PeftModel.from_pretrained(self.model, peft_model_id)
19
  self.tokenizer = AutoTokenizer.from_pretrained(config.base_model_name_or_path)
20
  self.gen_config = GenerationConfig.from_pretrained('./models/koalpaca', 'gen_config.json')