Closed whisky-12 closed 11 months ago
模型推理
LLaMA-7B
Linux
您好 ,请问我使用 llama.cpp推理模型是否支持GPU加速,目前执行如下脚本,只使用了cpu资源,gpu资源未被调用,每轮propmt耗时比较久, CPU是4核32G,GPU是A100 32G 推理命令如下 cd llama.cpp && ./main -m codeLlama/CodeLlama-7b/ggml-model-q4_0.bin --color -f prompts/alpaca.txt -ins -c 2048 --temp 0.2 -n 256 --repeat_penalty 1.3
#pip list | grep -E 'transformers|peft|torch'
![image](https://github.com/ymcui/Chinese-LLaMA-Alpaca/assets/79358023/06a1e529-5a79-4bb7-813b-c769bcba1a29) ![image](https://github.com/ymcui/Chinese-LLaMA-Alpaca/assets/79358023/8b3cf7b6-c077-4df6-bc81-b1c83af9e87e)
仔细看wiki里的信息,调用GPU需要指定-ngl 1(前提是编译llama.cpp时启用了cublas)。 另外,你用的是codellama,和本项目无关 :)
-ngl 1
提交前必须检查以下项目
问题类型
模型推理
基础模型
LLaMA-7B
操作系统
Linux
详细描述问题
您好 ,请问我使用 llama.cpp推理模型是否支持GPU加速,目前执行如下脚本,只使用了cpu资源,gpu资源未被调用,每轮propmt耗时比较久, CPU是4核32G,GPU是A100 32G 推理命令如下 cd llama.cpp && ./main -m codeLlama/CodeLlama-7b/ggml-model-q4_0.bin --color -f prompts/alpaca.txt -ins -c 2048 --temp 0.2 -n 256 --repeat_penalty 1.3
依赖情况(代码类问题务必提供)
运行日志或截图