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
LLaMA_vllm
Commits
9381852f
Commit
9381852f
authored
Apr 30, 2024
by
zhuwenwen
Browse files
add gptq
parent
5a8ce787
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
README.md
README.md
+10
-1
No files found.
README.md
View file @
9381852f
...
...
@@ -54,12 +54,21 @@ docker run -it --name llama --privileged --shm-size=64G --device=/dev/kfd --dev
[
LLama2-70B
](
https://huggingface.co/meta-llama/Llama-2-70b-chat-hf
)
#### GPTQ模型下载
[
Llama-2-7B-Chat-GPTQ
](
https://huggingface.co/TheBloke/Llama-2-7B-Chat-GPTQ/tree/gptq-4bit-128g-actorder_True
)
[
Llama-2-13B-GPTQ
](
https://huggingface.co/TheBloke/Llama-2-13B-GPTQ/tree/gptq-4bit-128g-actorder_True
)
[
Llama-2-70B-Chat-GPTQ
](
https://huggingface.co/TheBloke/Llama-2-70B-Chat-GPTQ/tree/gptq-4bit-128g-actorder_True
)
### 离线批量推理
```
bash
python offline_inference.py
```
其中,
`prompts`
为提示词;
`temperature`
为控制采样随机性的值,值越小模型生成越确定,值变高模型生成更随机,0表示贪婪采样,默认为1;
`max_tokens=16`
为生成长度,默认为1;
`model`
为模型路径;
`tensor_parallel_size=1`
为使用卡数,默认为1;
`dtype="float16"`
为推理数据类型,如果模型权重是bfloat16,需要修改为float16推理
`model`
为模型路径;
`tensor_parallel_size=1`
为使用卡数,默认为1;
`dtype="float16"`
为推理数据类型,如果模型权重是bfloat16,需要修改为float16推理
,
`quantization="gptq"`
为使用gptq量化进行推理,需下载以上GPTQ模型。
### OpenAI兼容服务
启动服务:
...
...
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