transformer-architecture-guide

transformer-architecture-guide is a skill for Claude Code, Codex from wentorai/research-plugins. It costs 15 tokens per session (2,125 once invoked), scanned A, original, MIT.

A guide to Transformer models, the neural-network architecture behind many language and vision systems. It explains attention, positional information, normalization, and other parts, with PyTorch implementation examples.

In plain words
What is it for?
It helps developers study, implement, adapt, and compare Transformer models for language processing, computer vision, and systems that combine several data types.
Why use it?
It makes a complex model design easier to understand before you build or change one. It also helps explain how design choices affect training and model behavior.

Skill for Claude CodeCodex

Which agent this was written for is unclear — built for openclaw. Also seen: built for openclaw.

Good fit It helps developers study, implement, adapt, and compare Transformer models for language processing, computer vision, and systems that combine several data types.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/wentorai/research-plugins/transformer-architecture-guide
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add wentorai/research-plugins --skill transformer-architecture-guide
Clone the repo
git clone --depth 1 https://github.com/wentorai/research-plugins

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for transformer-architecture-guide

README.md
[![agentmods](https://agentmods.dev/badge/skills/wentorai/research-plugins/transformer-architecture-guide/github.svg)](https://agentmods.dev/skills/wentorai/research-plugins/transformer-architecture-guide)
Your own site
<a href="https://agentmods.dev/skills/wentorai/research-plugins/transformer-architecture-guide"><img src="https://agentmods.dev/badge/skills/wentorai/research-plugins/transformer-architecture-guide/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for transformer-architecture-guide

Your own site · 80×15
<a href="https://agentmods.dev/skills/wentorai/research-plugins/transformer-architecture-guide"><img src="https://agentmods.dev/badge/skills/wentorai/research-plugins/transformer-architecture-guide.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 15 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,125 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00015 $0.02125
Opus 5 $0.00008 $0.01063
Sonnet 5 $0.00003 $0.00425
Haiku 4.5 $0.00002 $0.00213

Measured 5d ago against content hash 86d9af167699, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

transformer-architecture-guide scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/domains/ai-ml/transformer-architecture-guide/SKILL.md · 234 lines

How it starts

The opening of the file, as written. The whole thing — 234 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Transformer Architecture Guide

Understand, implement, and adapt Transformer architectures for NLP, computer vision, and multimodal research, from the original attention mechanism to modern variants.

The Original Transformer

The Transformer (Vaswani et al., 2017, "Attention Is All You Need") replaced recurrence and convolution with self-attention as the primary sequence modeling mechanism.

Core Components

Component Function Key Parameters
Multi-Head Self-Attention Computes attention weights across all positions d_model, n_heads, d_k, d_v
Feed-Forward Network Position-wise nonlinear transformation d_model, d_ff
Positional Encoding Injects sequence order information Sinusoidal or learned
Layer Normalization Stabilizes training Pre-norm or post-norm
Residual Connections Enables gradient flow in deep networks Add before or after norm

Self-Attention Mechanism

import torch
import torch.nn as nn
import torch.nn.functional as F
import math

class MultiHeadAttention(nn.Module):
    def __init__(self, d_model=512, n_heads=8):
        super().__init__()
        self.d_model = d_model
        self.n_heads = n_heads
        self.d_k = d_model // n_heads

        self.W_q = nn.Linear(d_model, d_model)
        self.W_k = nn.Linear(d_model, d_model)
        self.W_v = nn.Linear(d_model, d_model)
        self.W_o = nn.Linear(d_model, d_model)

    def forward(self, Q, K, V, mask=None):
        batch_size = Q.size(0)

        # Linear projections and reshape for multi-head
        Q = self.W_q(Q).view(batch_size, -1, self.n_heads, self.d_k).transpose(1, 2)
        K = self.W_k(K).view(batch_size, -1, self.n_heads, self.d_k).transpose(1, 2)
        V = self.W_v(V).view(batch_size, -1, self.n_heads, self.d_k).transpose(1, 2)

        # Scaled dot-product attention
        scores = torch.matmul(Q, K.transpose(-2, -1)) / math.sqrt(self.d_k)
        if mask is not None:
            scores = scores.masked_fill(mask == 0, -1e9)
        attn_weights = F.softmax(scores, dim=-1)
        context = torch.matmul(attn_weights, V)

        # Concatenate heads and project
        context = context.transpose(1, 2).contiguous().view(batch_size, -1, self.d_model)
        return self.W_o(context)

Read the full file on GitHub · 234 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 234 lines · 15 tokens per session scan A 86d9af167699

Subscribe to this mod's changes

transformer-architecture-guide is a skill published in the GitHub repository wentorai/research-plugins (290 stars, last pushed 2mo ago), licensed MIT. It adds 15 tokens to every session and 2,125 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

openai-docs

Use when the user asks how to build with OpenAI products or APIs and needs up-to-date official documentation with citations, help choosing the latest model for a use case, or model upgrade and prompt-upgrade guidance; prioritize OpenAI docs MCP tools, use bundled references only as helper context, and restrict any…

Haohao-end/openagent · 74 tokens

hr-prompt-engineering

Help HR professionals, recruiters, and people teams write better AI prompts to get higher-quality, more accurate, and more useful outputs from AI tools across HR workflows. Use when asked to write better AI prompts, improve my prompt for HR tasks, learn prompt engineering for HR, get better ChatGPT outputs, design…

tuanductran/hr-skills · 83 tokens

minimind-learning

A Chinese-language learning assistant for MiniMind, a small language-model project, that records study notes and recognizes common machine-learning terms.

joyehuang/minimind-notes · 76 tokens

prompt-engineering-interviewer

A Senior AI Engineer interviewer that simulates a technical interview focused on prompt engineering and LLM architecture at scale. Use this agent when you want to practice prompt pipeline design, RAG architecture, evaluation frameworks, token optimization, and edge case handling. This evaluates engineering rigor and…

PrepLabsAI/InterviewMentor · 70 tokens

nexus-tutorial

Use for creating executable Jupyter tutorials and AI engineering walkthroughs with runnable cells. Trigger on requests for step-by-step guides, notebook-based teaching, or shareable code-first learning content. Prioritize reproducibility, clarity, and copy-paste-ready outputs. When in doubt, use this skill.

aayushostwal/nexus · 64 tokens

02-ai-ml-learning

A progressive AI literacy tutor that meets learners at their current level and advances them through three layers of competency: AI User (prompt engineering and output evaluation), AI-Enhanced Worker (integrating AI tools into real workflows for coding, writing, and research), and AI Builder (understanding the ML…

gabrielmoreira/agent-skills-mirror · 0 tokens