configs/default.yaml.
Configuration File Structure
All configuration parameters are defined at the root level of the YAML file. Below is a complete reference of available options.Random Seed and Reproducibility
Master seed for PyTorch random number generation. Controls model initialization, training randomness, and ensures reproducibility across runs.
Seed for the dataloader worker processes. Ensures consistent data shuffling and augmentation across training runs.
System Configuration
Number of worker processes for data loading. Adjust based on available CPU cores and I/O capabilities.
Memory bandwidth in gigabytes per second. Used for hardware-aware optimization decisions and performance modeling. Typical values:
- Raspberry Pi 4: 12.8 GB/s
- NVIDIA Jetson Nano: 25.6 GB/s
- Mobile devices: 8-16 GB/s
CPU frequency scaling factor (0.0 to 1.0). Simulates throttled CPU performance common in edge devices:
- 1.0: Full performance
- 0.7: 70% performance (power saving mode)
- 0.5: 50% performance (aggressive power saving)
Power consumption in watts for energy proxy calculations. Used to estimate energy consumption during inference:
- Raspberry Pi 3B: 3-5W
- Raspberry Pi 4: 5-7W
- Mobile devices: 2-4W
Dataset and Training
Dataset to use for training and evaluation. Currently supports Fashion-MNIST, a 28x28 grayscale image classification dataset with 10 classes.
Batch size for training and inference. Larger batches improve throughput but increase memory usage. For edge devices, keep this value moderate (64-256).
Number of training epochs. The framework focuses on optimization rather than full training, so this is typically kept small.
Learning rate for the Adam optimizer during training.
Number of samples to use from the training set. Speeds up experimentation by using a subset of the full dataset.
Number of samples to use from the validation set for accuracy evaluation.
Optimization Parameters
List of pruning levels to evaluate. Each value represents the fraction of channels to remove:
0.0: No pruning (baseline)0.25: Remove 25% of channels0.5: Remove 50% of channels0.7: Remove 70% of channels (aggressive pruning)
List of numeric precisions to evaluate:
fp32: Full precision (32-bit floating point)fp16: Half precision (16-bit floating point)int8: 8-bit integer quantization
Number of batches to use for INT8 quantization calibration. The calibration process collects activation statistics to determine optimal quantization parameters.More batches improve quantization accuracy but increase calibration time. Typical range: 8-32 batches.
Memory Budgets
List of memory budget thresholds in megabytes. The framework reports which configurations violate each budget:
1.0 MB: Ultra-constrained devices (microcontrollers)2.0 MB: Constrained edge devices4.0 MB: Standard edge devices
Primary memory budget constraint in megabytes. Used for filtering and highlighting optimal configurations.
Benchmarking
Number of times to repeat latency measurements for statistical analysis. Higher values provide more reliable statistics but increase benchmarking time.The framework reports mean, standard deviation, and 95th percentile latency across all repeats.
Output
Directory for saving outputs including:
- Trained model checkpoints
- Optimized model variants
- Performance metrics CSV files
- Pareto frontier visualizations
Example Configuration
Loading Configuration
The framework loads configuration using standard YAML parsing:Best Practices
Always set both
seed and dataloader_seed to the same value for full reproducibility. This ensures consistent results across multiple runs.Tuning for Different Hardware
Tuning for Different Hardware
Low-power devices (< 3W)
- Use
cpu_frequency_scale: 0.5 - Set aggressive pruning:
[0.6, 0.7, 0.8, 0.9] - Prefer INT8:
precisions: [int8] - Lower memory budgets:
[0.5, 1.0]
- Use
cpu_frequency_scale: 0.7 - Balanced pruning:
[0.0, 0.25, 0.5, 0.7] - All precisions:
[fp32, fp16, int8] - Standard budgets:
[1.0, 2.0, 4.0]
- Use
cpu_frequency_scale: 1.0 - Conservative pruning:
[0.0, 0.25, 0.5] - FP32 and FP16:
[fp32, fp16] - Higher budgets:
[4.0, 8.0, 16.0]