Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -3,7 +3,7 @@ from peft import PeftModel, PeftConfig
|
|
3 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
4 |
|
5 |
peft_model_id = f"Bsbell21/llm_instruction_generator"
|
6 |
-
model = AutoModelForCausalLM.from_pretrained(peft_model_id, return_dict=True, load_in_8bit=True, device_map='auto')
|
7 |
tokenizer = AutoTokenizer.from_pretrained(peft_model_id)
|
8 |
# Load the Lora model
|
9 |
# model = PeftModel.from_pretrained(model, peft_model_id)
|
|
|
3 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
4 |
|
5 |
peft_model_id = f"Bsbell21/llm_instruction_generator"
|
6 |
+
model = AutoModelForCausalLM.from_pretrained(peft_model_id, return_dict=True, load_in_8bit=True, load_in_8bit_fp32_cpu_offload=True, device_map='auto')
|
7 |
tokenizer = AutoTokenizer.from_pretrained(peft_model_id)
|
8 |
# Load the Lora model
|
9 |
# model = PeftModel.from_pretrained(model, peft_model_id)
|