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 
复制代码
复制代码
复制代码
复制代码
复制代码
复制代码
相关推荐
AIGC破防黑吗喽5 小时前
Midjourney零基础学习
人工智能·gpt·学习·ai·stable diffusion·midjourney·ai绘画
知来者逆9 小时前
探索大型语言模型在文化常识方面的理解能力与局限性
人工智能·gpt·深度学习·语言模型·自然语言处理·chatgpt·llm
龙的爹233321 小时前
论文 | Model-tuning Via Prompts Makes NLP Models Adversarially Robust
人工智能·gpt·深度学习·语言模型·自然语言处理·prompt
龙的爹23331 天前
论文翻译 | Generated Knowledge Prompting for Commonsense Reasoning
人工智能·gpt·机器学习·语言模型·自然语言处理·nlp·prompt
龙的爹23331 天前
论文翻译 | Model-tuning Via Prompts Makes NLP Models Adversarially Robust
人工智能·gpt·语言模型·自然语言处理·nlp·prompt
玄奕子1 天前
GPT对话知识库——在STM32的平台下,通过SPI读取和写入Flash的步骤。
stm32·单片机·gpt·嵌入式·嵌入式驱动
龙的爹23332 天前
论文翻译 | LLaMA-Adapter :具有零初始化注意的语言模型的有效微调
人工智能·gpt·语言模型·自然语言处理·nlp·prompt·llama
罗曼蒂克在消亡2 天前
github项目——gpt-pilot自动创建应用
gpt·github·github项目
wgggfiy3 天前
chatgpt学术科研prompt模板有哪些?chatgpt的学术prompt有哪些?学术gpt,学术科研
论文阅读·人工智能·gpt·chatgpt·prompt·aigc
Ephemeroptera3 天前
通过python-api使用openai的gpt
人工智能·python·gpt