brdemorin commited on
Commit
718d5d1
1 Parent(s): 5212cf3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -1
app.py CHANGED
@@ -3,7 +3,15 @@ from transformers import AutoModelForCausalLM, AutoTokenizer
3
 
4
  model_name = "brdemorin/Phi3_80_steps_v2"
5
 
6
- model = AutoModelForCausalLM.from_pretrained(model_name)
 
 
 
 
 
 
 
 
7
  tokenizer = AutoTokenizer.from_pretrained(model_name)
8
 
9
  def chat(input_text):
 
3
 
4
  model_name = "brdemorin/Phi3_80_steps_v2"
5
 
6
+ # Update the following parameters as necessary for your GPTQ model
7
+ gptq_parameters = {
8
+ "load_in_8bit": False,
9
+ "device_map": "auto",
10
+ "trust_remote_code": True, # This is often needed for custom models
11
+ }
12
+
13
+ # Load the model with GPTQ parameters
14
+ model = AutoModelForCausalLM.from_pretrained(model_name, **gptq_parameters)
15
  tokenizer = AutoTokenizer.from_pretrained(model_name)
16
 
17
  def chat(input_text):