对中文LLAMA3开源版本的GPU实现以及使用ChatGPTNextWeb工具进行测试 #80

Open
opened 2024-09-13 15:09:41 +08:00 by 12390900721cs · 0 comments

前文:
https://hsw-git.huishiwei.cn/HswOAuth/llm_course/issues/79
4.用GPU启动开源版openai接口;
这里利用之前已经下载好的requirements.txt进行依赖的安装:
pip install -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple,
随后利用CPU启动服务:
python openai_api_server.py --gpus 0 --base_model /home/llm_course/.cache/modelscope/hub/ChineseAlpacaGroup/llama-3-chinese-8b-instruct-v3
4509cf19b4594803765eee871beed90.png
在这张图中可以看到使用的接口,这里需要注意一下,后续需要使用此接口来设置ChatGPTNextWeb工具。
2024-09-13 13:28:36,749 - INFO - Uvicorn running on http://0.0.0.0:19327 (Press CTRL+C to quit)

5.使用ChatGPTNextWeb工具测试的接口。
其他的讲义上写的很清楚,接口的这个地方需要用前文提到的接口进行修改。
e3393a49442c53b6314758640a67770.png
运行结果如下:
64d3348c7232e593093922bdd1cd0bf.png
这里跑的时候可以去另开一个终端使用nvidia-smi来看CPU利用率,这里我没有等他跑完,可能因为CPU不太好跑得很慢,不过确定是有结果的。

前文: [https://hsw-git.huishiwei.cn/HswOAuth/llm_course/issues/79](url) 4.用GPU启动开源版openai接口; 这里利用之前已经下载好的requirements.txt进行依赖的安装: `pip install -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple`, 随后利用CPU启动服务: `python openai_api_server.py --gpus 0 --base_model /home/llm_course/.cache/modelscope/hub/ChineseAlpacaGroup/llama-3-chinese-8b-instruct-v3`。 ![4509cf19b4594803765eee871beed90.png](/attachments/932986d6-b213-4727-972e-5f305daed2cf) 在这张图中可以看到使用的接口,这里需要注意一下,后续需要使用此接口来设置ChatGPTNextWeb工具。 `2024-09-13 13:28:36,749 - INFO - Uvicorn running on http://0.0.0.0:19327 (Press CTRL+C to quit)` 5.使用ChatGPTNextWeb工具测试的接口。 其他的讲义上写的很清楚,接口的这个地方需要用前文提到的接口进行修改。 ![e3393a49442c53b6314758640a67770.png](/attachments/7cd1d07d-b41f-4c44-9696-221a0ea42b40) 运行结果如下: ![64d3348c7232e593093922bdd1cd0bf.png](/attachments/290867b5-f4d2-4f3e-b79c-5215ecc4cefd) 这里跑的时候可以去另开一个终端使用`nvidia-smi`来看CPU利用率,这里我没有等他跑完,可能因为CPU不太好跑得很慢,不过确定是有结果的。
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: HswOAuth/llm_course#80
No description provided.