1base_model: Qwen/Qwen3-1.7B
2
3# Quantization
4
5bnb_config_kwargs:
6 bnb_4bit_compute_dtype: bfloat16
7 bnb_4bit_quant_type: nf4
8 bnb_4bit_use_double_quant: true
9
10datasets:
11 - path: TeamPV/sharegpt-mistral-onr
12 split: train
13 type: chat_template
14 conversation: messages # Your dataset has 'messages' field
15ds_type: json
16
17# Use model's built-in chat template
18
19val_set_size: 0.0
20test_datasets:
21 - path: TeamPV/sharegpt-mistral-onr
22 split: validation
23 type: chat_template
24 conversation: messages
25
26eval_sample_packing: false
27eval_batch_size: 6
28eval_steps: 30000
29early_stopping_patience: 3
30
31
32# Tokenization
33chat_template: tokenizer_default
34sequence_len: 1200
35pad_to_sequence_len: true
36sample_packing: false
37
38special_tokens:
39 pad_token: "</s>"
40
41# LoRA/DoRA
42adapter: lora
43lora_r: 32
44lora_alpha: 64
45lora_dropout: 0.05
46lora_target_modules:
47 - q_proj
48 - k_proj
49 - v_proj
50 - o_proj
51 - up_proj
52 - down_proj
53 - gate_proj
54peft_use_dora: false
55output_dir: /output/qwen1p7
56use_tensorboard: true
57
58# Training
59micro_batch_size: 5
60gradient_accumulation_steps: 1
61num_epochs: 4
62learning_rate: 0.00005
63lr_scheduler: cosine
64warmup_ratio: 0.10
65
66# Optimizer
67# optimizer: adamw_torch_fused
68optimizer: adamw_bnb_8bit
69bf16: true
70fp16: false
71# tf32: true
72
73# Attention
74flash_attention: true
75
76# Memory
77gradient_checkpointing: true
78gradient_checkpointing_kwargs:
79 use_reentrant: false
80
81# Checkpointing
82save_steps: 30000
83
84
85save_total_limit: 2
86load_best_model_at_end: true
87
88# Logging
89logging_steps: 50
90
91# HuggingFace Hub upload
92hub_model_id: TeamPV/mistral-nemo-onr-dora-1p7 # Your HF repo name
93hub_strategy: end # Options: end, every_save, checkpoint, all_checkpoints
94hf_use_auth_token: true
95
96# Optional: make repo private