# Qwen architecture

## Current program update

All live cohorts are officially closed. November 2026 is Ayush Singh’s final live cohort, and enrolment is already closed. No further live cohorts will open.

Ayush is introducing the FDE + Agentic Engineering Program: an annual community membership starting at ₹24,000 + GST. It includes recordings from all three cohorts, a structured learning route, access to Ayush through the community, and one live group Q&A each month.

Every two months, we will add a detailed write-up of a production-grade project. This is a community membership with recordings and a monthly Q&A, rather than a new live teaching cohort.

We will admit up to 50 new members per month. Invitations for the first 50 seats will be emailed in January 2027. Join the waitlist with your name, LinkedIn profile, phone number, and email address to receive a broadcast notification when monthly applications open.

Join the waitlist: https://forms.gle/WzPF6T7mRLK1LtVm8

The curriculum and teaching descriptions below document the recorded live cohort program. They are not an offer of new live cohort enrolment.


Canonical: https://antern.co/blogs/qwen-architecture/

An interactive 3D transformer study by Antern. Follow tokens, inspect matrix cells and multiplication terms, rotate the model, select any of 28 layers, and inspect forward passes, gradients and SGD updates.

## The teaching model

A small Qwen-style decoder: hidden width 8, 28 layers, two query heads sharing one key/value head, head dimension 4, feed-forward width 16. Computation includes RMSNorm, rotary positional encoding, causal attention, SwiGLU, residual connections, and tied embedding/output weights.

This is not pretrained Qwen and does not use Qwen weights or its tokenizer. It uses a small word/punctuation vocabulary and a browser-local training corpus. Predictions are educational and need not be meaningful.

## Learning path

Text and tokens → embedding lookup → normalization → query/key/value → rotary position encoding → attention scores → causal mask and softmax → weighted values → feed-forward → all 28 blocks → prediction → dataset and learning.

## Training and privacy

Edit the corpus, inspect within-document windows and right-shifted targets, select batches, and train with valid-token mean cross-entropy and SGD. Reverse-mode automatic differentiation computes gradients. Inputs, datasets and weights remain in the browser tab. Export records before reloading. No dropout, KV-cache decoding, Adam or large-model training is simulated.
