Upload config.yaml with huggingface_hub
Browse files- config.yaml +43 -0
config.yaml
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Configuration file for SAM-Audio model training
|
| 2 |
+
# Optimized for RTX 4090 (24GB VRAM)
|
| 3 |
+
|
| 4 |
+
# Training parameters
|
| 5 |
+
num_epochs: 50
|
| 6 |
+
batch_size: 32 # Increased for 4090's 24GB VRAM
|
| 7 |
+
learning_rate: 3e-4 # Slightly higher LR works well with larger batches
|
| 8 |
+
random_seed: 42
|
| 9 |
+
weight_decay: 0.01
|
| 10 |
+
max_grad_norm: 1.0 # Gradient clipping for stability
|
| 11 |
+
gradient_accumulation_steps: 1 # Increase if OOM (effective batch = batch_size * this)
|
| 12 |
+
warmup_epochs: 2 # Learning rate warmup
|
| 13 |
+
patience: 10 # Early stopping patience
|
| 14 |
+
|
| 15 |
+
# Data parameters
|
| 16 |
+
mask_ratio: 0.15
|
| 17 |
+
temperature: 0.07
|
| 18 |
+
num_segments: 64
|
| 19 |
+
|
| 20 |
+
# Loss weights
|
| 21 |
+
mask_weight: 0.5
|
| 22 |
+
contrastive_weight: 0.3
|
| 23 |
+
|
| 24 |
+
# Encoder parameters
|
| 25 |
+
encoder_dims: [64, 128, 256, 512]
|
| 26 |
+
kernel_size: 3
|
| 27 |
+
stride: 2
|
| 28 |
+
dropout_rate: 0.1
|
| 29 |
+
use_layer_norm: true # More stable than BatchNorm for audio
|
| 30 |
+
|
| 31 |
+
# RTX 4090 optimizations
|
| 32 |
+
compile_model: true # torch.compile() for faster execution
|
| 33 |
+
num_workers: 4 # DataLoader workers (adjust based on CPU cores)
|
| 34 |
+
|
| 35 |
+
# Logging and saving
|
| 36 |
+
wandb_project: "sam-carnatic"
|
| 37 |
+
run_name: "sam-audio-rtx4090"
|
| 38 |
+
best_model_path: "best_model.pth"
|
| 39 |
+
final_model_path: "final_model.pth"
|
| 40 |
+
|
| 41 |
+
# Model pushing
|
| 42 |
+
push_to_hub: true
|
| 43 |
+
model_name: "sarayusapa/sam-carnatic"
|