Bsbell21 commited on
Commit
072fc04
β€’
1 Parent(s): ca57e0e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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)