Views
No views yet
0.13.0.dev01# config_sft_zhihu.yml
2
3base_model: Orion-zhen/Meissa-Qwen2.5-7B-Instruct
4model_type: AutoModelForCausalLM
5tokenizer_type: AutoTokenizer
6
7# 使用您上传的数据集
8datasets:
9 - path: chanceQZhang/zhihuhighvotes
10 type: chat_template # ChatML 格式使用 chat_template
11 split: train
12# 提速核心
13sample_packing: true
14pad_to_sequence_len: true
15
16
17
18# LoRA 配置
19adapter: lora
20lora_r: 8
21lora_alpha: 32
22lora_dropout: 0.1
23lora_target_modules:
24 - q_proj
25 - v_proj
26 - k_proj
27 - o_proj
28 - gate_proj
29 - up_proj
30 - down_proj
31
32# --- 核心优化:显存节省配置 ---
33bf16: true # 30/40系列或A系列显卡必开,提升速度且省显存
34fp16: false
35gradient_checkpointing: true # 必开!用计算时间换空间,大幅降低显存占用
36flash_attention: true # 必开!大幅降低长文本下的显存需求
37
38# 训练配置
39sequence_len: 2048
40micro_batch_size: 6
41gradient_accumulation_steps: 3
42num_epochs: 2
43learning_rate: 0.00005
44# 减少中间开销
45logging_steps: 10
46eval_steps: 100
47save_steps: 302
48
49# 输出
50output_dir: ./outputs/zhihu-tech-career-lora