Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -183,7 +183,8 @@ print("emb model load success!")
|
|
183 |
print("gen model load begin...")
|
184 |
gen_model_path = 'openbmb/MiniCPM-V-2_6'
|
185 |
gen_tokenizer = AutoTokenizer.from_pretrained(gen_model_path, attn_implementation='sdpa', trust_remote_code=True)
|
186 |
-
gen_model =
|
|
|
187 |
gen_model.eval()
|
188 |
gen_model.to(device)
|
189 |
print("gen model load success!")
|
|
|
183 |
print("gen model load begin...")
|
184 |
gen_model_path = 'openbmb/MiniCPM-V-2_6'
|
185 |
gen_tokenizer = AutoTokenizer.from_pretrained(gen_model_path, attn_implementation='sdpa', trust_remote_code=True)
|
186 |
+
gen_model = AutoModel.from_pretrained(gen_model_path, trust_remote_code=True,
|
187 |
+
attn_implementation='sdpa', torch_dtype=torch.bfloat16)
|
188 |
gen_model.eval()
|
189 |
gen_model.to(device)
|
190 |
print("gen model load success!")
|