Model optimization recipes covering the full apr CLI optimization surface: fine-tuning, pruning, distillation, merging, and quantization. These examples mirror the subcommands available in apr finetune, apr prune, apr distill, apr merge, and apr quantize.
Recipe Example Description
Full Pipeline optimize_full_pipelineComposed finetune, prune, distill, merge, quantize pipeline
Recipe Example Description
LoRA Fine-Tuning finetune_loraLoRA adapter training with rank/alpha control
QLoRA Fine-Tuning finetune_qloraQuantized LoRA for memory-efficient fine-tuning
Merge Adapter finetune_merge_adapterMerge and unmerge LoRA adapters with base model
Plan VRAM finetune_plan_vramVRAM estimation and memory planning
Recipe Example Description
Standard KL distill_standard_klStandard KL divergence knowledge distillation
Progressive distill_progressiveLayer-wise progressive distillation
Ensemble distill_ensembleMulti-teacher ensemble distillation
Checkpoint distill_checkpointDistillation with checkpoint saving/resuming
Recipe Example Description
Average Merge merge_averageUniform average of model weights
Weighted Merge merge_weightedWeighted average merge with custom ratios
SLERP Merge merge_slerpSpherical linear interpolation merge
TIES Merge merge_tiesTIES merge with density parameter
DARE Merge merge_dareDARE merge with drop probability
Hierarchical Merge merge_hierarchicalMulti-model hierarchical merge strategy
Recipe Example Description
4-bit Quantization quantize_4bitInt4 weight quantization
Fake QAT quantize_fake_qatFake quantization-aware training