Views
No views yet
0.15.01# ============================================================================
2# HMX ORM - Qwen3.6 27B Reasoning Preservation Fine-tune
3# Optimized for:
4# - ERP reasoning specialization
5# - Preserve general reasoning capability
6# - Preserve conversational ability
7# - Reduce catastrophic forgetting
8# - Avoid Odoo overbias
9# - Long-context business reasoning
10# ============================================================================
11
12# ─── Base Model ──────────────────────────────────────────────────────────────
13base_model: Qwen/Qwen3.6-27B
14model_type: AutoModelForCausalLM
15tokenizer_type: AutoTokenizer
16trust_remote_code: true
17
18# ─── Dataset ────────────────────────────────────────────────────────────────
19datasets:
20 - path: HashMicro/test-accounting
21 revision: main
22 data_files: "data/v3.0.0/**/*.jsonl"
23 type: chat_template
24 field_messages: messages
25 field_role: role
26 field_content: content
27
28# IMPORTANT:
29# Delete this folder whenever:
30# - changing dataset version
31# - changing sequence length
32# - changing tokenizer
33dataset_prepared_path: /workspace/data/last_run_prepared
34chat_template: chatml
35
36# Long-context reasoning
37sequence_len: 4096
38# Better cognition preservation
39sample_packing: false
40# Avoid unnecessary padding
41pad_to_sequence_len: false
42
43# ─── LoRA / PEFT ────────────────────────────────────────────────────────────
44adapter: lora
45# Resume / merge adapter if needed
46lora_model_dir:
47# Safer adaptation for reasoning preservation
48lora_r: 16
49lora_alpha: 32
50lora_dropout: 0.03
51# More stable scaling
52peft_use_rslora: true
53# DoRA unnecessary for this objective
54peft_use_dora: false
55# Keep empty unless custom norm handling needed
56peft_kwargs:
57 layer_norm_names: []
58
59# IMPORTANT:
60# Attention-only tuning first.
61# Safer for preserving reasoning + personality.
62#
63# If ERP reasoning still weak later:
64# add:
65# - gate_proj
66# - up_proj
67# - down_proj
68#
69# But MLP tuning increases overwrite risk.
70lora_target_modules:
71 - q_proj
72 - k_proj
73 - v_proj
74 - o_proj
75
76# ─── Quantization / QLoRA ──────────────────────────────────────────────────
77load_in_4bit: true
78# Best-practice QLoRA settings
79bnb_4bit_quant_type: nf4
80bnb_4bit_use_double_quant: true
81bnb_4bit_compute_dtype: bfloat16
82# Precision
83bf16: true
84fp16: false
85tf32: true
86
87# ─── Training Hyperparameters ──────────────────────────────────────────────
88micro_batch_size: 2
89# Large effective batch for smoother updates
90gradient_accumulation_steps: 16
91# Low epochs to reduce catastrophic forgetting
92num_epochs: 1
93optimizer: adamw_torch_fused
94lr_scheduler: cosine
95
96# VERY IMPORTANT:
97# Low LR preserves pretrained reasoning manifold
98learning_rate: 1e-5
99warmup_ratio: 0.03
100weight_decay: 0.01
101# Only train assistant responses
102train_on_inputs: false
103
104# Efficient batching
105group_by_length: true
106# Helps reduce overfitting / memorization
107neftune_noise_alpha: 5
108# ─── Performance / Stability ───────────────────────────────────────────────
109max_grad_norm: 0.3
110
111# Correct modern FA2 config for Axolotl
112attn_implementation: flash_attention_2
113gradient_checkpointing: true
114# ─── Checkpointing & Persistence ───────────────────────────────────────────
115output_dir: /workspace/outputs/hmx-orm-v3
116# Automatically resume interrupted runs
117auto_resume_from_checkpoints: true
118# Save twice per epoch
119saves_per_epoch: 2
120
121# Keep latest checkpoints only
122save_total_limit: 3
123
124# Dynamic checkpoint trigger
125#
126# Trigger manually:
127# touch /workspace/outputs/hmx-orm-v3/axolotl_checkpoint.save
128dynamic_checkpoint:
129 enabled: true
130 check_interval: 25
131 trigger_file_path: axolotl_checkpoint.save
132
133# ─── Evaluation ────────────────────────────────────────────────────────────
134eval_batch_size: 2
135
136# Evaluate once per epoch
137evals_per_epoch: 1
138# Small validation split
139val_set_size: 0.05
140
141# ─── HuggingFace Hub ───────────────────────────────────────────────────────
142hub_model_id: HashMicro/hmx-acc-v3-qwen27b-lora
143
144# Push checkpoints if enabled
145hub_strategy: checkpoint
146
147# Manual push recommended after validation
148push_to_hub: false
149
150# ─── Logging ───────────────────────────────────────────────────────────────
151logging_steps: 10
152
153logging_dir: /workspace/logs/tensorboard
154
155report_to:
156 - tensorboard
157
158# ─── Debug ─────────────────────────────────────────────────────────────────
159debug: true
160
161# ─── Multi GPU / Distributed ───────────────────────────────────────────────
162ddp_find_unused_parameters: false
163ddp_timeout: 18000
164