Update app.py
Browse files
app.py
CHANGED
@@ -23,7 +23,7 @@ import gradio as gr
|
|
23 |
from peft import PeftModel
|
24 |
from transformers import (
|
25 |
LLaMATokenizer,
|
26 |
-
|
27 |
GenerationConfig,
|
28 |
AutoModelForCausalLM,
|
29 |
AutoModelForSeq2SeqLM,
|
@@ -121,7 +121,7 @@ def load_model(
|
|
121 |
tokenizer.pad_token_id = 0
|
122 |
tokenizer.padding_side = "left"
|
123 |
|
124 |
-
model =
|
125 |
base,
|
126 |
load_in_8bit=True,
|
127 |
device_map="auto",
|
|
|
23 |
from peft import PeftModel
|
24 |
from transformers import (
|
25 |
LLaMATokenizer,
|
26 |
+
LlamAForCausalLM,
|
27 |
GenerationConfig,
|
28 |
AutoModelForCausalLM,
|
29 |
AutoModelForSeq2SeqLM,
|
|
|
121 |
tokenizer.pad_token_id = 0
|
122 |
tokenizer.padding_side = "left"
|
123 |
|
124 |
+
model = LlamAForCausalLM.from_pretrained(
|
125 |
base,
|
126 |
load_in_8bit=True,
|
127 |
device_map="auto",
|