Skip to content
Back to skills

Mixed Precision

ASecurity

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

  • 10 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 29, 2026
ai-agentsgoperformance

Security analysis

A100/100

Scanned September 29, 2026

npx -y skills add FOURTEEN1416/academic-agent-toolkit --skill mixed-precision --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Mixed Precision?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Mixed Precision
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/fourteen1416-mixed-precision/badge)](https://www.skillsdirectory.com/skills/fourteen1416-mixed-precision)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: mixed-precision
description: Use FP16/BF16 mixed precision to accelerate training and reduce memory. Use when optimizing GPU performance.
metadata:
  category: tooling
  trigger-keywords: "training,gpu,memory,speed,precision,fp16,bf16"
  applicable-stages: "10,12"
  priority: "5"
  version: "1.0"
  author: researchclaw
  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()
---

## 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

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…