Spaces:
Paused
Paused
Update koalpaca.py
Browse files- 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')
|