Views
No views yet
0.12.21# --- QLoRAでの最小CPT設定 ---
2base_model: Qwen/Qwen3-8B
3tokenizer_config: Qwen/Qwen3-8B
4
5# プレトレ用の素朴なJSONL(各行 {"text": "..."})
6pretraining_dataset:
7 - path: json
8 data_files:
9 - data.jsonl
10 field: text
11
12# 長さとパッキング
13sequence_len: 2048
14sample_packing: false
15pad_to_sequence_len: false
16train_on_inputs: false
17
18# 演算系
19bf16: true
20flash_attention: false
21attn_implementation: sdpa
22
23# バッチ/ステップ(まずは通るか確認)
24micro_batch_size: 24
25gradient_accumulation_steps: 1
26max_steps: 150
27
28# 最適化
29optimizer: adamw_torch
30learning_rate: 1.0e-4
31weight_decay: 0.1
32lr_scheduler: cosine
33warmup_ratio: 0.01
34
35# ロギング/保存
36logging_steps: 2
37save_steps: 20
38output_dir: ./ckpts/Qwen3-8B-cpt
39wandb_project: null
40
41# QLoRA(ここが重要)
42adapter: lora
43load_in_4bit: true
44bnb_4bit_quant_type: nf4
45bnb_4bit_use_double_quant: true
46bnb_4bit_compute_dtype: bfloat16
47
48# LoRAハイパラ
49lora_r: 64
50lora_alpha: 128
51lora_dropout: 0.05
52lora_target_modules:
53 - q_proj
54 - k_proj
55 - v_proj
56 - o_proj
57 - gate_proj
58 - up_proj
59 - down_proj
60
61# 省メモリ/IO
62gradient_checkpointing: true
63dataloader_num_workers: 1
64dataset_processes: 1
65dataloader_prefetch_factor: 8
66