Skip to content
View AnranS's full-sized avatar
🎯
Focusing
🎯
Focusing
  • Bytedance
  • shanghai

Block or report AnranS

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Content in all repositories owned by your account will be closed.
Maximum 250 characters. Please don’t include any personal information such as legal names or email addresses. Markdown is supported. This note will only be visible to you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
AnranS/README.md

Anran — LLM inference, AI infrastructure, and learning in public. Anran’s gray-and-tan dog, with upright ears and a leaf-shaped hair clip, as a playful cartoon at a laptop.

Focus: LLM Inference and AI Infra Learning in public Build: engines and kernels

GitHub followers Stars across public repositories


👋 About Me

I'm Anran. I work on LLM inference and AI infrastructure — and I learn it the only way that sticks: by writing the thing from scratch, running it, and measuring it.

Most of what I publish is the trail of that process. An inference engine in Rust + CUDA with validation reports. Thirteen handbooks that walk from a tensor to a serving system, where every code example is executed in CI and its output compared line by line. Hundreds of exercises you can solve in the browser.

Read the paper. Write the kernel. Measure it. Then explain it to someone else.

LLM Inference · CUDA Kernels · PyTorch · Distributed Training · Diffusion · Rust Runtimes

AI Infra Handbooks · Learning in public · Now building · Contributions · Project index


📚 AI Infra Handbooks — the main thing I'm building

ai-infra-handbooks · read it → · English edition →

Thirteen interlinked handbooks that go from "what is a tensor" to "here is a working inference engine", in Chinese and English.

13 handbooks 291 chapters 288 exercises 2060 flashcards Chinese and English

Handbook What it covers
🧠 LLM Internals Attention, RoPE, KV Cache, quantization, and the arithmetic behind capacity estimates.
🔥 PyTorch in a Hurry Tensors, shapes, autograd, nn.Module, training loops — enough to read everything else.
⚡ Advanced CUDA Reductions, GEMM, FlashAttention, Tensor Cores, Triton, Nsight, torch.compile.
🌱 Train a Small Model Corpus → BPE tokenizer → a small GPT → SFT, LoRA, DPO, distillation, on your own machine.
🧩 Distributed Training DDP, ZeRO/FSDP, tensor / pipeline / expert parallelism, RL training.
🚀 Inference Systems Continuous batching, paged KV, prefill/decode disaggregation, speculative decoding, serving ops.
🛠 mini-sglang from Scratch Build a complete inference engine chapter by chapter — scheduler, radix cache, CUDA graphs, TP.
🎨 Image & Video Generation Diffusion and flow matching, samplers, and how generative media is actually served.
📜 SGLang Design Evolution Reading a real engine's design through its commit history.

Plus four foundations that the rest leans on: Python · C++ · CS Fundamentals · Math.

What makes it different from notes:

  • Every example really runs. Python, C++ and CUDA samples are executed by CI on each push and their output is compared with the page, line by line — if a number drifts, the build goes red.
  • 288 exercises, graded in your browser (Python on WebAssembly, plus a CUDA simulator) or from the command line on a real GPU.
  • A learning roadmap and 2060 spaced-repetition flashcards generated from the chapters themselves.
  • Bilingual, with the English edition built from the same sources so the code can never diverge.

🧭 The AI stack I'm working through

Layer What I'm learning Where it lives
Model internals Attention variants, positional encodings, normalization, MoE routing LLM Internals · tiny-llm
Framework Autograd, dispatcher, memory allocator, torch.compile PyTorch in a Hurry
Kernels Reductions, tiled GEMM, online softmax, FlashAttention, Triton Advanced CUDA
Training Pretraining a small GPT, SFT, LoRA, DPO, distillation; ZeRO and 3D parallelism Train a Small Model · Distributed Training
Inference Scheduling, paged KV cache, radix prefix reuse, speculative decoding, PD disaggregation Inference Systems · nano-vllm-rs
Engines Writing one end to end, then reading how a production engine got there mini-sglang · SGLang Evolution
Generative media Diffusion, flow matching, video pipelines and their serving cost Image & Video Generation

Everything above is verified on real hardware where it needs to be: the repository ships a setup-gpu.sh and a 14-item gpu_check.py self-check that runs the GPU-only examples on an actual card.


🚀 Now Building

Track Projects & direction
AI learning platform ai-infra-handbooks — 13 bilingual handbooks, 291 chapters, 288 browser-graded exercises, every sample verified in CI.
Inference engineering nano-vllm-rs — single-GPU Qwen3 inference in Rust + CUDA, with attention validation and reproducible benchmarks. No Python, no PyTorch, no libtorch in the inference path.
Inference education sglang-interactive-guide — 13 Chinese chapters with browser experiments, source links, and exercises. Learn offline, without a GPU.
Runtimes & delivery wasm-split-tool — split large WebAssembly modules and load code on demand.
Everyday tools DesktopPulse · inline-vocab-translator — desktop widgets and tools for reading across languages.
Game-engine tooling godot_for_minigame · tiktok-minigame-unity-demo — exports, platform SDK integration, and working API examples.

🔬 Inside the inference work

nano-vllm-rs connects implementation to evidence:

Validation currently targets Qwen3-0.6B. Known chunked-output differences are documented in the validation report.

mini-sglang (inside the handbooks) goes the other way: 25 chapters that build a working engine — scheduler, radix prefix cache, CUDA graphs, tensor parallelism, an OpenAI-compatible server — with 63 tests that compare its output against Hugging Face token by token.


🤝 Open-source Contributions

Selected merged contributions to deepcoldy/botmux, a bridge between IM platforms and AI coding CLIs:

Contribution Merged work
Codex integration PR #157 — support goal passthrough.
Resource efficiency PR #153 — reduce memory leaks, redundant disk writes, and idle screenshot overhead.
Remote configuration PR #132 — add /botconfig with owner-only configuration cards.

🛠 Tech Toolbox

AI & inference

PyTorch CUDA Triton SGLang vLLM Hugging Face

Languages

Python Rust C++ TypeScript Swift

Runtimes, apps & tooling

WebAssembly SwiftUI Godot Unity GitHub Actions


🗂 Project Index

AI, inference & learning

Project Role Description
ai-infra-handbooks Learning platform 13 bilingual handbooks, 291 chapters, 288 graded exercises, CI-verified examples.
nano-vllm-rs Implementation Rust + CUDA inference engine and validation reports.
sglang-interactive-guide Learning guide 13 interactive chapters on inference serving.
leetcode Practice Python and Rust algorithm solutions.

Game platforms & developer tools

Project Stack Description
godot_for_minigame Godot · JavaScript Mini Game export tooling and platform integration.
tiktok-minigame-unity-demo Unity · C# Reference examples across 14 SDK API categories, with bilingual documentation.
wasm-split-tool Rust · WebAssembly On-demand loading for split WebAssembly modules.

Native apps & reading tools

Project Stack Description
DesktopPulse Swift · WidgetKit System, weather, and AI-tool usage widgets for macOS.
inline-vocab-translator JavaScript Inline translation and vocabulary learning.
wallpaper TypeScript macOS wallpaper project.
📚 Learning forks & earlier experiments

These repositories are forks or practice projects, listed separately from the work above.

Inference & ML learning forks

Runtime & tooling forks

Personal configuration & practice

📖 Documentation & releases
🏆 GitHub statistics & contribution activity
Anran's public GitHub profile statistics, dated snapshot

Snake animation of Anran's GitHub contribution grid

📫 Connect

Learning something in the same direction? The handbooks are open — corrections, better explanations and new exercises are all welcome, and every chapter links to the source it came from.

Have a question, an edge case, or an idea for a tool? Open an issue in the relevant project — reproducible examples are always useful.

GitHub Handbooks

Learning through implementation, sharing through working software.

Pinned Loading

  1. ai-infra-handbooks ai-infra-handbooks Public

    Thirteen interlinked handbooks for LLM inference and AI infra, in Chinese and English: Python, C++, CS, math, PyTorch, LLM internals, CUDA, training a small model from scratch, distributed training…

    Python 1

  2. godot_for_minigame godot_for_minigame Public

    Export Godot 4 games to WeChat and Douyin Mini Games, with TikTok Native in beta. Editor-native tooling, platform SDKs, and validated exports.

    JavaScript 68 20

  3. wasm-split-tool wasm-split-tool Public

    Split a big .wasm into an eager primary module and a lazily-loaded secondary module that share memory, table, and globals. Ship less wasm at boot, stream the rest in the background.

    Rust 4 1

  4. DesktopPulse DesktopPulse Public

    Native macOS widgets for system health, weather, and Codex, Cursor, Claude Code, and Grok usage. Built with SwiftUI and WidgetKit.

    Swift 2

  5. tiktok-minigame-unity-demo tiktok-minigame-unity-demo Public

    Reference Unity 2022.3 demo for the TikTok Mini Game SDK — covers every TT.* API across 14 categories, with bilingual code comments and README.

    C# 8

  6. inline-vocab-translator inline-vocab-translator Public

    Inline vocabulary translator for Chinese → English. Selection translate, auto-highlight unmastered words, multi-device sync via GitHub Gist or Google Drive.

    JavaScript 4 1