Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ModelZoo
VisualGLM-6B_pytorch
Commits
bad62d59
Commit
bad62d59
authored
Mar 01, 2024
by
wangsen
Browse files
Update model/infer_util.py
parent
3fe98be6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
model/infer_util.py
model/infer_util.py
+1
-1
No files found.
model/infer_util.py
View file @
bad62d59
...
@@ -25,7 +25,7 @@ def get_infer_setting(gpu_device=0, quant=None):
...
@@ -25,7 +25,7 @@ def get_infer_setting(gpu_device=0, quant=None):
quantize
(
model
.
transformer
,
quant
)
quantize
(
model
.
transformer
,
quant
)
model
.
eval
()
model
.
eval
()
model
=
model
.
cuda
()
model
=
model
.
cuda
()
tokenizer
=
AutoTokenizer
.
from_pretrained
(
"
/data
"
,
trust_remote_code
=
True
)
tokenizer
=
AutoTokenizer
.
from_pretrained
(
"
THUDM/chatglm-6b
"
,
trust_remote_code
=
True
)
return
model
,
tokenizer
return
model
,
tokenizer
def
is_chinese
(
text
):
def
is_chinese
(
text
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment