enpeizhao commited on
Commit
db29767
·
1 Parent(s): 12d8e04

Update base model id

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -13,14 +13,17 @@ import os
13
  # Load your custom VLM model from Hugging Face
14
  # Replace with your actual model identifier
15
  MODEL_ID = "enpeizhao/qwen2_5-3b-instruct-trl-sft-vlm-odd-12-nf4-merged"
 
 
 
16
 
17
  device = "cuda" if torch.cuda.is_available() else "cpu"
18
 
19
  def load_model():
20
  """Load the model and processor from Hugging Face"""
21
  model = AutoModel.from_pretrained(MODEL_ID, trust_remote_code=True).to(device)
22
- processor = AutoProcessor.from_pretrained(MODEL_ID, trust_remote_code=True)
23
- tokenizer = AutoTokenizer.from_pretrained(MODEL_ID, trust_remote_code=True)
24
  return model, processor, tokenizer
25
 
26
  # Load model at startup
 
13
  # Load your custom VLM model from Hugging Face
14
  # Replace with your actual model identifier
15
  MODEL_ID = "enpeizhao/qwen2_5-3b-instruct-trl-sft-vlm-odd-12-nf4-merged"
16
+ BASE_MODEL_ID = "Qwen/Qwen2.5-3B-Instruct"
17
+
18
+
19
 
20
  device = "cuda" if torch.cuda.is_available() else "cpu"
21
 
22
  def load_model():
23
  """Load the model and processor from Hugging Face"""
24
  model = AutoModel.from_pretrained(MODEL_ID, trust_remote_code=True).to(device)
25
+ processor = AutoProcessor.from_pretrained(BASE_MODEL_ID, trust_remote_code=True)
26
+ tokenizer = AutoTokenizer.from_pretrained(BASE_MODEL_ID, trust_remote_code=True)
27
  return model, processor, tokenizer
28
 
29
  # Load model at startup