Monimoy commited on
Commit
4ebadf9
·
verified ·
1 Parent(s): 66b1557

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -15,7 +15,7 @@ peft_model_path = "./phi2-openassistant-lora-final"
15
  # Load the base model with 4-bit quantization
16
  #bnb_config = BitsAndBytesConfig(load_in_4bit=True) # Ensure compatibility
17
  #base_model = AutoModelForCausalLM.from_pretrained(base_model_name, quantization_config=bnb_config, device_map={"": device})
18
- base_model = AutoModelForCausalLM.from_pretrained(base_model_name, torch_dtype=torch.float32, device_map={"": device}, offload_dir="./offload")
19
 
20
  # Load LoRA adapter
21
  model = PeftModel.from_pretrained(base_model, peft_model_path)
 
15
  # Load the base model with 4-bit quantization
16
  #bnb_config = BitsAndBytesConfig(load_in_4bit=True) # Ensure compatibility
17
  #base_model = AutoModelForCausalLM.from_pretrained(base_model_name, quantization_config=bnb_config, device_map={"": device})
18
+ base_model = AutoModelForCausalLM.from_pretrained(base_model_name, torch_dtype=torch.float32, device_map={"": device})
19
 
20
  # Load LoRA adapter
21
  model = PeftModel.from_pretrained(base_model, peft_model_path)