sreejith8100 commited on
Commit
b6f80b8
·
verified ·
1 Parent(s): 47cb049

Update handler.py

Browse files
Files changed (1) hide show
  1. handler.py +6 -1
handler.py CHANGED
@@ -14,7 +14,12 @@ class EndpointHandler:
14
  def __init__(self, path=""):
15
  model_name = "openbmb/MiniCPM-V-2_6-int4"
16
  self.tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)
17
- self.model = AutoModel.from_pretrained(model_name, trust_remote_code=True).eval()
 
 
 
 
 
18
 
19
  def __call__(self, data):
20
  image_input = data.get("image")
 
14
  def __init__(self, path=""):
15
  model_name = "openbmb/MiniCPM-V-2_6-int4"
16
  self.tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)
17
+ self.model = AutoModel.from_pretrained(
18
+ model_name,
19
+ trust_remote_code=True,
20
+ # Explicitly disable 4-bit loading
21
+ device_map="auto"
22
+ ).eval()
23
 
24
  def __call__(self, data):
25
  image_input = data.get("image")