linux虚拟机对于训练模型虚拟环境的创建 #79
Labels
No Label
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: HswOAuth/llm_course#79
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
要对本地大模型进行部署,为了方便后续的开发,这里需要:
这里先说前面的部分,因为不能放太多图片来着
1.对需要使用的源码进行下载

按照讲义上的代码完成源码的下载后,使用命令行
ls
对内容进行查看。其中需要注意的是requirements.txt文件中包含了此项目需要有的依赖;scripts中包含了此项目需要用到的代码脚本。
2.下载miniconda,使用miniconda来进行python的环境和包管理;
Miniconda 是一个轻量级的 Python 发行版管理工具,属于 Anaconda 项目的简化版本。它提供了 Python 环境管理和包管理的核心功能。有如下特点:
这里使用讲义上的代码进行下载:

下载完成后,要使用新的环境,先要对环境进行创建。这里使用'su llm_course'创建一个名为 llm_course 的新用户,然后用’conda create -n chinese_llama_alpaca_3 python=3.8.17 pip -y‘完成新环境’chinese_llama_alpaca_3‘的创建,并指定python版本为3.8。


下载成功后会出现对启动和关闭环境命令行的提示:
随后启动新环境:
3.对基座模型进行下载;

进入新环境后,对基座模型进行下载。
要下载基座模型首先对ModelScope库进行下载:
’pip install modelscope -i https://mirrors.aliyun.com/pypi/simple‘
然后用ModelScope库来下载需要用到的中文的 LLaMA 模型:
’modelscope download --model ChineseAlpacaGroup/llama-3-chinese-8b-instruct-v3‘
下载需要一段时间,完成后查看文件目录:
进入modelscope查看下载好的模型,模型大小为15G,确实是一个比较大的模型。
到这里完成了环境的创建以及模型和代码的下载,我会在后一篇补充利用CPU启动开源版openai接口并使用ChatGPTNextWeb工具进行测试的部分。
后文:
https://hsw-git.huishiwei.cn/HswOAuth/llm_course/issues/80