training-optimization
Skill8 starsChanged 4 months agoMITView on GitHub
Use when training or fine-tuning a deep model and tuning it for best accuracy. Covers transfer learning, two-phase fine-tuning, discriminative/layer-wise LR, LR schedules + warmup, regularization tuned to over/under-fit (dropout, weight decay, label smoothing, MixUp), mixed precision, gradient checkpointing, EMA, checkpoint/resume, and fitting a GPU/time budget. Triggers on 'fine-tune', 'train the model', 'best hyperparameters', 'overfitting', 'learning rate', 'out of memory', 'training is too slow'.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- ScientiaCapital/unsloth-mcp-servertheir own version, first seen Feb 21, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- ScientiaCapital/unsloth-mcp-server★ 2same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository22 other files it gives its agents.
- accuracy-improvement-loopSkill
- data-rigor-and-leakageSkill
- dataset-profilingSkill
- deployment-explainabilitySkill
- domain-3dSkill
- domain-anomaly-detectionSkill
- domain-audio-speechSkill
- domain-computer-visionSkill
- domain-generativeSkill
- domain-graphSkill
- domain-medical-imagingSkill
- domain-multimodalSkill
- domain-nlp-llmSkill
- domain-recommenderSkill
- domain-reinforcement-learningSkill
- domain-tabularSkill
- domain-time-seriesSkill
- domain-videoSkill
- literature-reviewSkill
- ml-research-methodologySkill
- notebook-deliverySkill
- rigorous-evaluationSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 3 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 11
Transfer learning: start from ImageNet/pretrained weights.
- Distinctive: line 24
Mixed precision (AMP): always on GPU.
- Distinctive: line 27
Preprocess once to disk: if per-epoch CPU work (decode/enhance) starves the GPU - huge speedups.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Training & Fine-Tuning
Best-practice recipe for transfer-learning a strong model, and how to fix over/under-fitting.
Fine-tuning recipe (default that works)
- Transfer learning: start from ImageNet/pretrained weights; train from scratch only with lots of data.
- Two phases: (1) freeze backbone, train the new head; (2) unfreeze and fine-tune end-to-end at a lower LR.
- Discriminative / layer-wise LR: small LR for early backbone layers, higher for the head. Biggest single fine-tuning win.
- Schedule: cosine decay with a short warmup. Log the LR curve.
- Optimizer: AdamW (decoupled weight decay). Gradient clipping ~1.0.
- Selection: checkpoint the best epoch by the validation metric; early stopping.
Diagnose then regularize (don't guess)
- Overfitting (train accuracy keeps rising while val loss rises or plateaus): raise weight decay, dropout, label smoothing; add MixUp; stronger-but-domain-appropriate augmentation; reduce epochs/patience; smaller/less-capacity head.
- Underfitting (train acc low too): reduce regularization, raise LR / capacity / resolution, train longer, check data quality.
- Match augmentation to the domain - do not use aggressive photometric/geometric ops that destroy the signal (e.g., harsh color/solarize on medical scans, or flips that change semantics).
Compute & memory (fit the budget)
- Mixed precision (AMP) always on GPU.
- Gradient checkpointing to fit high resolution / big models in limited VRAM (~3× memory saving, ~30% slower).
- Small batch + gradient accumulation to keep an effective batch size when VRAM is tight; freeze BatchNorm stats at very small batch (LayerNorm backbones like ConvNeXt are safer there).
- Preprocess once to disk if per-epoch CPU work (decode/enhance) starves the GPU - huge speedups.
- Budget = seconds/epoch × epochs × models. Measure on a quick run first; pick resolution/epochs to fit the quota. Prefer one honest fit over a run that dies mid-way.
Robustness
- Fixed seeds; checkpoint per epoch + resume so an interrupted long run continues, not restarts.
- EMA of weights and/or averaging often helps generalization - but verify it beats the plain best checkpoint on val before keeping it.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

