Update app.py
Browse files
app.py
CHANGED
@@ -24,8 +24,8 @@ from transformers import LlamaTokenizer, LlamaForCausalLM, GenerationConfig
|
|
24 |
tokenizer = LlamaTokenizer.from_pretrained("decapoda-research/llama-7b-hf")
|
25 |
model = LlamaForCausalLM.from_pretrained(
|
26 |
"decapoda-research/llama-7b-hf",
|
27 |
-
|
28 |
-
device_map="
|
29 |
)
|
30 |
|
31 |
def evaluate(question):
|
|
|
24 |
tokenizer = LlamaTokenizer.from_pretrained("decapoda-research/llama-7b-hf")
|
25 |
model = LlamaForCausalLM.from_pretrained(
|
26 |
"decapoda-research/llama-7b-hf",
|
27 |
+
load_in_8bit_fp32_cpu_offload=True
|
28 |
+
device_map="cpu",
|
29 |
)
|
30 |
|
31 |
def evaluate(question):
|