Study
Tear it down until the matrices show 행렬이 드러날 때까지 뜯어본다
My test for understanding a system: can I draw its data flow from memory — every tensor, every reshape, every byte that crosses a bus? These notes are interactive tear-downs of model architectures, quantization pipelines, and GPU internals, built while studying them. 시스템을 이해했는지 확인하는 나의 테스트: 모든 tensor, 모든 reshape, bus를 건너는 모든 byte까지 — 그 데이터 흐름을 기억만으로 그릴 수 있는가? 이 노트들은 model architecture, quantization pipeline, GPU internals를 공부하면서 그린 인터랙티브 해부도다.
AI Models
AI Models
Architectures pulled apart layer by layer — what each block computes, and what actually moves between them. Architecture를 layer 단위로 분해한다 — 각 block이 무엇을 계산하고, block 사이로 실제로 무엇이 오가는지.
SDAR: anatomy of a block-diffusion LM SDAR: block-diffusion LM 해부
A block-by-block tear-down of SDAR — how a block-diffusion language model mixes autoregressive structure across blocks with parallel denoising inside them. SDAR을 block 단위로 뜯어보는 tear-down — block-diffusion 언어 모델이 block 간 autoregressive 구조와 block 내부의 병렬 denoising을 어떻게 결합하는지.
AI ModelsHybrid attention: inside Qwen3.5's linear + full stack 하이브리드 어텐션: Qwen3.5의 linear + full 스택 해부
A tensor-by-tensor tear-down of Qwen3.5's hybrid architecture — the 3:1 Gated DeltaNet / Gated Attention interleave, both token mixers side by side, and the memory race between a growing KV cache and a constant recurrent state. Qwen3.5 하이브리드 아키텍처를 tensor 단위로 해부 — 3:1 Gated DeltaNet / Gated Attention 인터리브, 두 token mixer 비교, 그리고 증가하는 KV cache와 고정 크기 recurrent state의 메모리 경주.
AI ModelsAttention-head anatomy: MHA → MQA → GQA → MLA Attention head 해부: MHA → MQA → GQA → MLA
One dial from private K/V pairs to a single shared latent — how each head-sharing scheme rewires attention and what it does to KV-cache bytes, with verified configs from Llama, Mistral, and DeepSeek. head마다 따로 갖던 K/V pair가 하나의 shared latent로 줄어드는 과정 — 각 head-sharing 방식이 attention 배선과 KV cache byte를 어떻게 바꾸는지, Llama·Mistral·DeepSeek의 검증된 config로 따라간다.
AI ModelsLooped transformers: depth as a runtime knob Looped Transformer: 런타임 노브가 된 깊이
An interactive explorer of looped / recurrent-depth transformers — the prelude–core–coda sandwich, how the loop is fed (Huginn’s concat-adapter, Parcae’s decay-SSM injection, LOTUS’s additive latents), why naive loops explode, random-depth training, test-time depth scaling with early exit, KV caching along the loop axis, and the params-vs-FLOPs-vs-bytes accounting. Looped / recurrent-depth transformer 인터랙티브 해부 — prelude–core–coda 샌드위치, loop에 입력을 먹이는 법 (Huginn의 concat-adapter, Parcae의 decay-SSM injection, LOTUS의 additive latent), naive loop가 폭발하는 이유, random-depth 학습, early exit을 포함한 test-time depth scaling, loop 축의 KV caching, 그리고 params-FLOPs-bytes 장부 정리.
AI ModelsRoPE: sixty-four dials on every attention head RoPE: 모든 attention head에 달린 64개의 다이얼
Where rotary position embeddings actually land in the attention path, what each frequency dial does, how per-band cosines compose into attention logits, and how PI, NTK-aware scaling, YaRN and base-scaling each edit the dial ladder for long context — with verified configs and a worked d = 8 example. RoPE가 attention 경로의 정확히 어디에 꽂히는지, frequency 다이얼 하나하나가 무엇을 하는지, band별 cosine이 attention logit으로 어떻게 합성되는지, 그리고 PI·NTK-aware·YaRN·base-scaling이 long context를 위해 다이얼 사다리를 어떻게 다르게 수정하는지 — 검증된 config와 d = 8 수치 예제로 따라간다.
Quantization
Quantization
From fp16 tensors to packed low-bit integers: scales, zero-points, and where the error really goes. fp16 tensor에서 packed low-bit integer까지: scale, zero-point, 그리고 오차가 실제로 어디로 가는지.
GPU
GPU
The machine under the math — memory hierarchy, bandwidth, occupancy, and why most kernels wait on bytes. 수식 아래에 있는 기계 — memory hierarchy, bandwidth, occupancy, 그리고 왜 대부분의 kernel은 byte를 기다리는지.
Where the bytes live: GPU memory hierarchy byte는 어디에 사는가: GPU memory hierarchy
Registers, shared memory, L2, HBM — an interactive map of the GPU memory hierarchy and why inference kernels spend their lives waiting on the slowest tier. Register, shared memory, L2, HBM — GPU memory hierarchy의 인터랙티브 지도, 그리고 inference kernel이 왜 가장 느린 계층을 기다리며 대부분의 시간을 보내는지.
GPUWhy 8× smaller can load slower: mixed-precision KV caches inside the kernel 8× 작은데 왜 더 느리게 읽히는가: kernel 안의 mixed-precision KV cache
Follow packed low-bit KV bytes through HBM, shared memory, and the unpack/dequant instruction stream — why naive 4-bit lost to 8-bit, what mixed widths break, and the published kernel patterns that fix it. packed low-bit KV byte를 HBM, shared memory, 그리고 unpack/dequant instruction stream까지 따라간다 — naive 4-bit가 8-bit에 진 이유, 혼합 width가 깨뜨리는 것들, 그리고 그것을 고치는 공개된 kernel 패턴.