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.

rust_rope Public

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

AKV-Sem Public

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

llm-router Public

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

eagle_3 Public

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

tiny_gpt_llm Public

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