Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ModelZoo
Spark-X1
Commits
59edee96
Commit
59edee96
authored
Jun 02, 2026
by
weishb
Browse files
新增transformers推理说明
parent
997d1621
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
README.md
README.md
+3
-1
No files found.
README.md
View file @
59edee96
...
@@ -61,7 +61,7 @@ docker run -it \
...
@@ -61,7 +61,7 @@ docker run -it \
**以`Spark-Chemistry-X1-13B`为例**
**以`Spark-Chemistry-X1-13B`为例**
```
bash
```
bash
cd
/path/to/model/Spark-Chemistry-X1-13B
#进入模型目录内
cd
/path/to/model/Spark-Chemistry-X1-13B
#进入模型目录内
python transformers_run.py
python transformers_run.py
```
```
**transformers_run.py参考:**
**transformers_run.py参考:**
...
@@ -109,6 +109,8 @@ response = tokenizer.decode(
...
@@ -109,6 +109,8 @@ response = tokenizer.decode(
print
(
response
)
print
(
response
)
```
```
**如果用transformers推理Spark-Scilit-X1-13B,需要额外修改模型的config.json文件,将"_attn_implementation":"flash_attention_2"改成"_attn_implementation":"eager"**
### vLLM
### vLLM
#### 单机推理
#### 单机推理
```
bash
```
bash
...
...
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