renpas22 commited on
Commit ·
d4b8544
1
Parent(s): 9770aa1
Enable 8-bit quantization and reduce batch size for memory
Browse files
train_configs/train_qwen_cot_dual.yaml
CHANGED
|
@@ -17,10 +17,10 @@ tracker_project_name: qwen_step_cot_training
|
|
| 17 |
report_to: tensorboard # or "wandb" for Weights & Biases
|
| 18 |
|
| 19 |
# Training Hyperparameters (Top-level for trainer access)
|
| 20 |
-
gradient_accumulation_steps:
|
| 21 |
max_train_steps: 10000
|
| 22 |
learning_rate: 2e-5
|
| 23 |
-
train_batch_size: 2
|
| 24 |
mixed_precision: bf16
|
| 25 |
|
| 26 |
# Model Dimensions (for PRM initialization)
|
|
@@ -145,7 +145,8 @@ lora_config:
|
|
| 145 |
|
| 146 |
# Memory Optimization
|
| 147 |
mixed_precision: bf16 # Use bfloat16 for better stability than fp16
|
| 148 |
-
quantize:
|
|
|
|
| 149 |
gradient_checkpointing: true
|
| 150 |
precompute_text_embeddings: false # Dynamic computation for reasoning chains
|
| 151 |
precompute_image_embeddings: false
|
|
|
|
| 17 |
report_to: tensorboard # or "wandb" for Weights & Biases
|
| 18 |
|
| 19 |
# Training Hyperparameters (Top-level for trainer access)
|
| 20 |
+
gradient_accumulation_steps: 16 # Increased to allow smaller batch size
|
| 21 |
max_train_steps: 10000
|
| 22 |
learning_rate: 2e-5
|
| 23 |
+
train_batch_size: 1 # Reduced from 2 to 1 to save memory
|
| 24 |
mixed_precision: bf16
|
| 25 |
|
| 26 |
# Model Dimensions (for PRM initialization)
|
|
|
|
| 145 |
|
| 146 |
# Memory Optimization
|
| 147 |
mixed_precision: bf16 # Use bfloat16 for better stability than fp16
|
| 148 |
+
quantize: true # Enable 8-bit quantization to save memory
|
| 149 |
+
quantization_type: "int8" # Use 8-bit quantization
|
| 150 |
gradient_checkpointing: true
|
| 151 |
precompute_text_embeddings: false # Dynamic computation for reasoning chains
|
| 152 |
precompute_image_embeddings: false
|