Update app.py
Browse files
app.py
CHANGED
@@ -23,10 +23,9 @@ quant_config = BitsAndBytesConfig(
|
|
23 |
tokenizer = LlamaTokenizer.from_pretrained(model_name)
|
24 |
model = LlamaForCausalLM.from_pretrained(
|
25 |
model_name,
|
26 |
-
quantization_config=quant_config
|
27 |
-
device_map="auto",
|
28 |
)
|
29 |
-
model = PeftModel.from_pretrained(model, lora_name)
|
30 |
|
31 |
|
32 |
# will be used with normal template
|
|
|
23 |
tokenizer = LlamaTokenizer.from_pretrained(model_name)
|
24 |
model = LlamaForCausalLM.from_pretrained(
|
25 |
model_name,
|
26 |
+
quantization_config=quant_config
|
|
|
27 |
)
|
28 |
+
model = PeftModel.from_pretrained(model, lora_name).to("cuda")
|
29 |
|
30 |
|
31 |
# will be used with normal template
|