微信扫码
与创始人交个朋友
我要投稿
cd ~
git clone https://github.com/SmartFlowAI/Llama3-Tutorial
git clone https://github.com/SmartFlowAI/Llama3-Tutorial:用于克隆一个远程 Git 仓库到本地。
mkdir -p ~/model
cd ~/model
ln -s /root/share/new_models/meta-llama/Meta-Llama-3-8B-Instruct .
mkdir -p ~/model
cd ~/model
ln -s /root/share/new_models/openai/clip-vit-large-patch14-336 .
mkdir -p ~/model
cd ~/model
ln -s /root/share/new_models/xtuner/llama3-llava-iter_2181.pth .cd ~
git clone https://github.com/InternLM/tutorial -b camp2
python ~/tutorial/xtuner/llava/llava_data/repeat.py \
-i ~/tutorial/xtuner/llava/llava_data/unique_data.json \
-o ~/tutorial/xtuner/llava/llava_data/repeated_data.json \
-n 200
git clone https://github.com/InternLM/tutorial -b camp2:使用 Git 克隆一个名为 "tutorial" 的仓库,从指定的分支 "camp2" 中获取内容。具体解释如下:
python ~/tutorial/xtuner/llava/llava_data/repeat.py -i ~/tutorial/xtuner/llava/llava_data/unique_data.json -o ~/tutorial/xtuner/llava/llava_data/repeated_data.json -n 200:运行 Python 脚本文件 "repeat.py",并传递一些参数。具体解释如下:
xtuner train ~/Llama3-Tutorial/configs/llama3-llava/llava_llama3_8b_instruct_qlora_clip_vit_large_p14_336_lora_e1_finetune.py --work-dir ~/llama3_llava_pth --deepspeed deepspeed_zero2
使用 "xtuner" 程序进行模型训练的命令:
xtuner convert pth_to_hf ~/Llama3-Tutorial/configs/llama3-llava/llava_llama3_8b_instruct_qlora_clip_vit_large_p14_336_lora_e1_finetune.py \
~/model/llama3-llava-iter_2181.pth \
~/llama3_llava_pth/pretrain_iter_2181_hf
xtuner convert pth_to_hf ~/Llama3-Tutorial/configs/llama3-llava/llava_llama3_8b_instruct_qlora_clip_vit_large_p14_336_lora_e1_finetune.py \
~/llama3_llava_pth/iter_1200.pth \
~/llama3_llava_pth/iter_1200_hf
这两个命令都是使用 "xtuner" 程序进行文件格式的转换,将 PyTorch 模型文件(.pth 格式)转换为 Hugging Face 模型文件(HF 格式):
export MKL_SERVICE_FORCE_INTEL=1
xtuner chat /root/model/Meta-Llama-3-8B-Instruct \
--visual-encoder /root/model/clip-vit-large-patch14-336 \
--llava /root/llama3_llava_pth/pretrain_iter_2181_hf \
--prompt-template llama3_chat \
--image /root/tutorial/xtuner/llava/llava_data/test_img/oph.jpg
用于启动一个名为 "xtuner" 的对话系统,其作用是根据指定的模型进行对话生成。具体解释如下:
export MKL_SERVICE_FORCE_INTEL=1
xtuner chat /root/model/Meta-Llama-3-8B-Instruct \
--visual-encoder /root/model/clip-vit-large-patch14-336 \
--llava /root/llama3_llava_pth/iter_1200_hf \
--prompt-template llama3_chat \
--image /root/tutorial/xtuner/llava/llava_data/test_img/oph.jpg
53AI,企业落地应用大模型首选服务商
产品:大模型应用平台+智能体定制开发+落地咨询服务
承诺:先做场景POC验证,看到效果再签署服务协议。零风险落地应用大模型,已交付160+中大型企业
2024-08-18
当产品经理谈到用LLM Agent构建新一代智能体的时候,他们在说什么?
2024-08-15
对话AI教育从业者们:AI如何解决因材施教的难题?
2024-08-03
工业应用中的向量数据库与知识向量化存储方案
2024-07-25
两大深度学习框架TensorFlow与PyTorch对比
2024-07-17
让生成式 AI 触手可及:NVIDIA NIM on VKE 部署实践
2024-07-16
中文大模型基准测评2024上半年报告
2024-07-16
一文看懂人工智能的起源、发展、三次浪潮与未来趋势
2024-07-14
"自拍" 秒变 "证件照" 看Coze如何实现
2024-05-14
2024-04-26
2024-05-22
2024-04-12
2024-07-18
2024-03-30
2024-05-10
2024-08-13
2024-04-25
2024-04-26
2024-09-22
2024-09-22
2024-09-22
2024-09-21
2024-09-21
2024-09-20
2024-09-20
2024-09-19