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
Baichuan-M3_pytorch
Commits
f2b3a0bd
Commit
f2b3a0bd
authored
Mar 12, 2026
by
shihm
Browse files
add inference.py
parent
20e943f8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
inference.py
inference.py
+1
-1
No files found.
inference.py
View file @
f2b3a0bd
from
transformers
import
AutoTokenizer
,
AutoModelForCausalLM
import
os
import
torch
model_path
=
"/
home/download/
baichuan-inc/Baichuan-M3-235B"
model_path
=
"/baichuan-inc/Baichuan-M3-235B"
os
.
environ
[
'TRANSFORMERS_OFFLINE'
]
=
'1'
os
.
environ
[
'MODELSCOPE_OFFLINE'
]
=
'1'
model
=
AutoModelForCausalLM
.
from_pretrained
(
...
...
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