RSSAmplifier

Blog

Emre's Blog

hi, i'm emre — ml systems & performance engineer. i build and optimize inference systems for production: low-latency audio models, custom CUDA/CuTe-DSL ...

emre570.bearblog.devRSS feed ↗7 posts

Latest posts

Writing A Megakernel For LLM Decode - A Worklog

This is the story of a megakernel: the 28-layer text decoder of Qwen3-ASR-0.6B, plus its lm_head, running as a single persistent CUDA kernel on an RTX 5080. The baseline fires about 466 kernel launches per generated token. This fires one. Every op in it is hand-written - the GEMVs, the norms, the rope, the KV-cache write, the attention, the sampling argmax - and every op was validated against…

Unleashing Blackwell's 4-bit: a surgical look at MXFP4 and NVFP4

If you do kernel-level inference optimization, you eventually hit the cold truth: the enemy is not compute, it is VRAM bandwidth. FP32 numbers are huge in memory. The fix is to squeeze them into 4-bit boxes. The internet is full of repos that do this. They say "find amax, divide by this, shift the bits, here is your FP4," and move on. I copied those formulas into my own code at first - and could…

From 429 GB/s to the DRAM wall: writing an FP8 quantizer on an RTX 5080

This is the story of one CUDA kernel pair in cublade, my personal kernel library. The kernels do per-tensor symmetric FP8 (E4M3) quantization and dequantization. They started at 429 GB/s on a v1 build, then NCU shoved them to roughly 880 GB/s at the kernel level - about 98.5% of the RTX 5080's real DRAM peak. Plus a dequantizer that landed DRAM-bound on its first compile. I'm going to walk through…

8.5x Faster Speech-to-Text: From 429ms to 50ms on a Single GPU

My STT journey started with Whisper. One of Freya's STT models was a fine-tuned Whisper Large-V3. I optimized it with TensorRT, got it to 130ms, around 94x realtime. Solid, but we hit a wall. The architecture has a heavy encoder and a lightweight decoder, and TRT could only help with the encoder side. We needed something better. STT is the first link in our voice agent chain: STT → LLM → TTS. When…

W8A16 Quantization with LLM.int8-Style Outlier Handling

In Phase 1 , we demonstrated that outliers in transformer models are not "statistical noise"—they are critical carriers of model intelligence and context. When we zeroed outliers in weight matrices, model outputs degraded catastrophically, producing repetitive loops and nonsensical text. But here's the problem : Quantizing weights from BF16 to INT8 reduces memory by ~50%, but it also destroys…

How Critical Are Outliers in Transformer Models? A Live Experiment - Phase 1

Introduction Many assume that large language models (LLMs, Transformers) simply “memorize data” due to their scale. In reality, some part of their "intelligence" and creative capacity is packed into outlier values, extremely large or small numbers in their weight matrices and activation tensors. In this post, we’ll zero out these outliers and directly observe how this disrupts the model’s output…

Transformer Architecture: Building Blocks Explained

Hey there! In this post, I’m going to walk you through the building blocks of the Transformer architecture. But don’t worry—this isn’t going to be one of those dry academic reads. Think of it more like we're sitting down for a coffee and chatting about how all of this works. The goal? No more “What the heck is this, bro?” moments. Everything will be clear, with examples and just enough math to…