elplaguister 4n3mone commited on
Commit
caaf812
β€’
1 Parent(s): b3741e6

Update koalpaca.py (#6)

Browse files

- Update koalpaca.py (b6fd14eda5395cc5d87cb127d791a3273e6b95d3)


Co-authored-by: yongsang yoo <4n3mone@users.noreply.huggingface.co>

Files changed (1) hide show
  1. koalpaca.py +1 -1
koalpaca.py CHANGED
@@ -14,7 +14,7 @@ class KoAlpaca(Model):
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')
 
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')