Wang Jingye Chuan Hu commited on
Commit
a435e54
1 Parent(s): 3677395

Fix chatGLM_int4 Error (#586)

Browse files

* Fix chatGLM_int4 Error

Error: expected scalar type Half but found Float.

* Update models.py

---------

Co-authored-by: Chuan Hu <51039745+GaiZhenbiao@users.noreply.github.com>

Files changed (1) hide show
  1. modules/models.py +1 -1
modules/models.py CHANGED
@@ -234,7 +234,7 @@ class ChatGLM_Client(BaseLLMModel):
234
  if quantified:
235
  model = AutoModel.from_pretrained(
236
  model_source, trust_remote_code=True
237
- ).float()
238
  else:
239
  model = AutoModel.from_pretrained(
240
  model_source, trust_remote_code=True
 
234
  if quantified:
235
  model = AutoModel.from_pretrained(
236
  model_source, trust_remote_code=True
237
+ ).half()
238
  else:
239
  model = AutoModel.from_pretrained(
240
  model_source, trust_remote_code=True