Small Language Models
Training compact models that reach outsized quality per parameter through careful data curation and architecture choices.
AI Systems · LLM Training · Efficient Inference
I build language models from scratch, reproduce modern LLM research, optimize inference systems, and explore efficient AI architectures.
Training compact models that reach outsized quality per parameter through careful data curation and architecture choices.
KV-cache layout, paged attention, quantization, and batching strategies that make LLMs practical on consumer hardware.
Rotary embeddings, grouped-query attention, MoE routing — studying what makes modern decoders scale.
Pretraining pipelines from tokenizer to optimizer state: reproducible, checkpointable, and observability-first.
Cleaning, deduplication, and mixture design. Data is the model — most of the quality lives here.
LoRA, QLoRA, quantization-aware fine-tuning, and pruning as a systems problem, not just a numerics one.
Serving stacks, throughput/latency trade-offs, memory hierarchies, and the plumbing behind production inference.
Re-implementing landmark papers from scratch to internalize the design decisions behind them.
Efficient LLM inference on consumer GPUs
A research playground for pushing decoder throughput on a single consumer GPU. Explores paged KV cache, fused kernels, speculative decoding, and mixed-precision serving paths.
$ turbollm bench --model llama-3.1-8b --ctx 4096 [init] paged-kv: 96 blocks · 3.4 GB [load] fp16 weights ..... 4.2 s [warm] step 8/8 ......... 512 tok/s baseline (hf transformers) ... 138 tok/s turbollm (paged + fused) ... 527 tok/s speedup ... 3.82× memory / seq ↓ 41% p50 latency ↓ 63% p99 latency ↓ 58%
A 17.2M-parameter language model, from scratch
Full pretraining stack: custom BPE tokenizer, dataset curation, dataloader, transformer decoder, training loop, and evaluation. Published weights and eval on Hugging Face.
SFT / LoRA / QLoRA across specialized domains
Adapter-based fine-tuning experiments across math, code, and legal corpora. Focus on data mixture, LoRA rank/target module ablations, and eval alignment.
Instruction data pipelines at scale
Tooling for large-scale text preprocessing: cleaning, near-duplicate detection, quality filtering, and Parquet-native pipelines that stream from disk.
A living reference of the work that shapes how I think about language models — from architecture to scaling to alignment.
Building an efficient inference runtime for decoder-only models on consumer GPUs. Kernel fusion, paged KV cache, speculative decoding.
Trained a 17.2M-parameter decoder from scratch with a custom tokenizer and 2M-example dataset. Model and eval published on Hugging Face.
LoRA and QLoRA fine-tuning across math, code, and legal domains. Studying adapter rank, target modules, and data mixture effects.
Attention, scaling laws, Chinchilla, Phi, SmolLM2, DeepSeek — reproducing key results as a way to internalize the design decisions.
C++, CUDA, Linux internals. Building intuition for the substrate underneath every deep learning framework.