Spaces:
Paused
Paused
Update koalpaca.py (#1)
Browse files- Update koalpaca.py (381c2c296eb38ee435fe103fce9e8c899a3a2450)
Co-authored-by: yongsang yoo <[email protected]>
- 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')
|