GitHub Projects
Open-source GitHub projects on LLM inference, tokenization, positional
encodings and AI engineering — mostly built from scratch in Rust and
PyTorch to understand how the pieces actually work.
Rotary Position Embeddings (RoPE) built from scratch in Rust. Rotates [B, S, H, D] query/key tensors with interleaved or split-half layouts and supports position interpolation, linear, NTK-aware and YaRN scaling, validated against a PyTorch reference.
- Rust
- PyTorch (reference)
- Transformers
- Positional Encoding
An educational byte-level BPE tokenizer in Rust, trained on Tiny Shakespeare. Standard library only, no unsafe code, 65 tests and a versioned binary model format.
- Rust
- std only
- Byte Pair Encoding
- Tokenization
Semantic-aware KV cache engineering for LLM agents. Agents label dropped context as failed, irrelevant or resolved and keep those notes, so they avoid repeating dead ends. Built on the AKV framework by Tianyu Fu et al.
- Python
- SGLang
- KV Cache
- LLM Agents
A hybrid neural network + XGBoost router that sends each prompt to the cheapest Claude model that can handle it, trading off predicted quality, latency and cost.
- Python
- PyTorch
- XGBoost
- scikit-learn
- Fireworks AI
- Claude
A runnable reconstruction of EAGLE-3 speculative decoding in PyTorch: draft model, multi-layer feature fusion, training-time test and lossless verification, with one script per correctness experiment.
- Python
- PyTorch
- Transformers
- uv
- Speculative Decoding
A Claude Code plugin and portable agent skill (Codex, Cursor, Windsurf, Antigravity, IBM Bob) encoding production standards for FastAPI, RAG and agentic AI backends on AWS ECS Fargate.
- FastAPI
- Pydantic v2
- Claude Code
- RAG
- AWS ECS Fargate
A tiny GPT-style language model (~3M parameters) built from first principles, with the full training pipeline, causal self-attention and explanations that map the code to real GPT models.
- Python
- PyTorch
- GPT
- Self-Attention