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
chenzk
Baichuan-13B_fastllm
Commits
0ff1156e
Commit
0ff1156e
authored
Sep 22, 2023
by
zhouxiang
Browse files
完善
parent
6ab9856b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
baichuan2flm.py
baichuan2flm.py
+1
-1
No files found.
baichuan2flm.py
View file @
0ff1156e
...
...
@@ -5,7 +5,7 @@ from transformers.generation.utils import GenerationConfig
from
fastllm_pytools
import
torch2flm
if
__name__
==
"__main__"
:
modelpath
=
"baichuan-inc/Baichuan-13B-Chat"
"
modelpath
=
"baichuan-inc/Baichuan-13B-Chat"
tokenizer
=
AutoTokenizer
.
from_pretrained
(
modelpath
,
trust_remote_code
=
True
)
model
=
AutoModelForCausalLM
.
from_pretrained
(
modelpath
,
device_map
=
"auto"
,
torch_dtype
=
torch
.
float16
,
trust_remote_code
=
True
)
model
.
to
(
"cpu"
)
...
...
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