Skip to content
Back to skills

Mha Configurator

ASecurity

Recommend head count, KV-head count, and projection strategy (MHA / MQA / GQA / MLA) for a new transformer. Use when you need help with mha configurator.

  • 9 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 8, 2026
development

Security analysis

A100/100

Scanned September 8, 2026

npx -y skills add anubhavg-icpl/vibe --skill mha-configurator --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Mha Configurator?

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

Security grade badge for Mha Configurator
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/anubhavg-icpl-mha-configurator/badge)](https://www.skillsdirectory.com/skills/anubhavg-icpl-mha-configurator)

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: mha-configurator
description: Recommend head count, KV-head count, and projection strategy (MHA / MQA / GQA / MLA) for a new transformer. Use when you need help with mha configurator.
license: CC-BY-NC-SA-4.0
phase: 7
lesson: 3
metadata:
  version: 1.0.0
  tags: [transformers, attention, mha, gqa]
---

Given a transformer spec (parameter budget, hidden size `d_model`, target context length, inference device memory, training vs inference priority), output:

1. Projection variant. One of: MHA, GQA, MQA, MLA. One-sentence reason tied to KV-cache constraints.
2. Head geometry. `n_heads`, `n_kv_heads`, `d_head`. Values must satisfy `d_model = n_heads * d_head` and `n_heads % n_kv_heads == 0`.
3. KV cache estimate. Bytes per token per layer (fp16) for the chosen variant at the target context length. Flag if one batch exceeds the target device memory.
4. Initialization. Xavier / Kaiming scale for Q, K, V, O matrices. Note whether bias terms are included (most 2026 models drop them).
5. Testability hook. A single synthetic task (e.g. induction-head pattern `A B A ? → B`) that a trained two-layer version of this config should solve to ≥95% on.

Refuse to recommend `d_head < 32` — attention dynamics break down. Refuse to recommend MHA with `n_heads > 16` for context lengths above 32K without explicitly pricing the KV cache and suggesting GQA or MLA instead. Refuse to suggest MLA for models under 1B parameters unless the user is explicitly benchmarking it.

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…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.