qwen微调

复制代码
# env
apt-get update
apt-get install git-lfs
git init
git lfs install
mkdir Qwen
cd Qwen
git clone https://huggingface.co/Qwen/Qwen-7B
cd ..
git clone https://gitee.com/meijunhui0917/LLaMA-Efficient-Tuning.git
git clone "huanhuan": {
    "file_name": "huanhuan.json",
    "columns": {
      "prompt": "instruction",
      "query": "input",
      "response": "output"
    }
  },
复制代码
CUDA_VISIBLE_DEVICES=0 python src/train_bash.py \
    --stage sft \
    --model_name_or_path ../Qwen/Qwen-7B\
    --do_train \
    --dataset huanhuan \
    --template default \
    --finetuning_type lora \
    --lora_target c_attn \
    --output_dir ./model \
    --overwrite_cache \
    --per_device_train_batch_size 4 \
    --gradient_accumulation_steps 4 \
    --lr_scheduler_type cosine \
    --logging_steps 10 \
    --save_steps 1000 \
    --learning_rate 5e-5 \
    --num_train_epochs 3.0 \
    --plot_loss \
    --fp16
python 复制代码
CUDA_VISIBLE_DEVICES=0 python  src/train_bash.py \
    --stage sft \
    --model_name_or_path ../Qwen/Qwen-7B \
    --do_train True \
    --overwrite_cache True \
    --finetuning_type lora \
    --template chatml \
    --dataset huanhuan \
    --max_source_length 512 \
    --max_target_length 512 \
    --learning_rate 5e-05 \
    --num_train_epochs 3.0 \
    --max_samples 100000 \
    --per_device_train_batch_size 1 \
    --gradient_accumulation_steps 4 \
    --lr_scheduler_type cosine \
    --max_grad_norm 1.0 \
    --logging_steps 5 \
    --save_steps 100 \
    --warmup_steps 0 \
    --padding_side left \
    --lora_rank 8 \
    --lora_dropout 0.1 \
    --lora_target c_attn \
    --resume_lora_training True \
    --output_dir saves/Qwen-7B-chat/lora/2023-08-22-17-23-51 \
    --fp16 True \
    --plot_loss True 
复制代码
复制代码
复制代码
复制代码
复制代码
复制代码
相关推荐
小新ya1 小时前
gpt导出聊天记录
gpt·聊天记录导出
向量引擎3 小时前
复刻“疯狂的鸽子”?用Python调用Sora2与Gemini-3-Pro实现全自动热点视频流水线(附源码解析)
开发语言·人工智能·python·gpt·ai·ai编程·api调用
程序员佳佳13 小时前
【万字硬核】从零构建企业级AI中台:基于Vector Engine整合GPT-5.2、Sora2与Veo3的落地实践指南
人工智能·gpt·chatgpt·ai作画·aigc·api·ai编程
悟道心1 天前
8. 自然语言处理NLP -GPT
人工智能·gpt·自然语言处理
周周爱喝粥呀2 天前
LLM 中的自回归模型与非自回归模型:GPT 和 BERT 的区别
人工智能·gpt·ai·回归
共绩算力2 天前
DeepSeek V3.2 迈向 GPT-5 级别性能的路径:稀疏注意力、大规模强化学习与上下文重用
人工智能·gpt·共绩算力
百***24372 天前
GPT-5.2 vs DeepSeek-V3.2 全维度对比:一步API适配下的研发选型指南
gpt
百***24372 天前
GPT-5.2与DeepSeek-V3.2选型指南:一步API通用下的全维度技术对比
gpt
维度攻城狮2 天前
科研提速!Zotero Awesome GPT 搭配本地 Ollama 模型使用指南
gpt·zotero·ollama·awesome gpt
victory04313 天前
同一prompt下 doubao qwen gpt kimi的模型训练时长预测不同表现
gpt·prompt