Agent skill

mixed-precision

Use FP16/BF16 mixed precision to accelerate training and reduce memory. Use when optimizing GPU performance.

Stars 11,027
Forks 1,262

Install this agent skill to your Project

npx add-skill https://github.com/aiming-lab/AutoResearchClaw/tree/main/researchclaw/skills/builtin/tooling/mixed-precision

Metadata

Additional technical details for this skill

author
researchclaw
version
1.0
category
tooling
priority
5
references
Micikevicius et al., Mixed Precision Training, ICLR 2018
code template
scaler = torch.cuda.amp.GradScaler() for batch in dataloader: optimizer.zero_grad() with torch.cuda.amp.autocast(): output = model(batch) loss = criterion(output, target) scaler.scale(loss).backward() scaler.step(optimizer) scaler.update()
trigger keywords
training,gpu,memory,speed,precision,fp16,bf16
applicable stages
10,12

SKILL.md

Mixed Precision Training Best Practice

Use torch.cuda.amp for automatic mixed precision:

  • Wrap forward pass in torch.cuda.amp.autocast()
  • Use GradScaler for loss scaling
  • BF16 preferred over FP16 on Ampere+ GPUs (RTX 3xxx, A100, RTX 4xxx)
  • Watch for NaN gradients — reduce learning rate if needed
  • Do NOT use amp with custom CUDA kernels unless tested

Expand your agent's capabilities with these related and highly-rated skills.

aiming-lab/AutoResearchClaw

scientific-visualization

Publication-ready scientific figure design with matplotlib and seaborn. Use when creating journal submission figures with proper formatting, accessibility, and statistical annotations.

11,027 1,262
Explore
aiming-lab/AutoResearchClaw

hypothesis-formulation

Structured scientific hypothesis generation from observations. Use when formulating testable hypotheses, competing explanations, or experimental predictions.

11,027 1,262
Explore
aiming-lab/AutoResearchClaw

scientific-writing

Academic manuscript writing with IMRAD structure, citation formatting, and reporting guidelines. Use when drafting or revising research papers.

11,027 1,262
Explore
aiming-lab/AutoResearchClaw

a-evolve

Apply A-Evolve's agentic evolution methodology to improve AI agent performance across runs. Use when the user wants to diagnose agent failures, generate targeted skills from error patterns, evolve system prompts, or accumulate episodic knowledge. Works standalone or inside AutoResearchClaw pipelines. Triggers on: "evolve", "self-improve", "diagnose failures", "generate skills from errors", "what went wrong and how to fix it", or any mention of A-Evolve.

11,027 1,262
Explore
aiming-lab/AutoResearchClaw

chemistry-rdkit

Computational chemistry with RDKit for molecular analysis, descriptors, fingerprints, and substructure search. Use when working with SMILES, drug discovery, or cheminformatics tasks.

11,027 1,262
Explore
aiming-lab/AutoResearchClaw

literature-search

Systematic literature review methodology including search strategy, screening, and synthesis. Use when conducting literature reviews or writing background sections.

11,027 1,262
Explore

Didn't find tool you were looking for?

Be as detailed as possible for better results