← all repositories
datawhalechina/llm-algo-leetcode

LLM engineering by the notebook: from PyTorch loops to GPU kernels

It turns LLM theory into a stack of runnable notebook exercises—problem sets, answers, and hardware benchmarks included.

502 stars Jupyter Notebook LearningML FrameworksInference · Serving
llm-algo-leetcode
Collecting fresh signals — velocity needs a few days of history.
collecting data…
star history

What it does

This is a Chinese-language tutorial lab built as Jupyter notebooks that treats LLM algorithms and systems as a stack of practice exercises. It runs from PyTorch implementations of training and inference all the way down to Triton kernels and CUDA optimization, organized into five progressive parts and cross-cutting topics like quantization and parallelism. Each unit pairs theory with runnable code, problem sets, and validation.

The interesting bit

The project borrows its structure from coding interview prep: every topic is split into a problem block, an answer block, and test cases. It also forces a hardware-aware discipline, requiring learners to back up claims with GPU benchmarks and profiling traces instead of hand-waving.

Key highlights

  • Five-part arc: Python/PyTorch basics → hardware and math → PyTorch algorithms → Triton kernels → CUDA/system optimization (Part 04 unfinished, Part 05 reserved).
  • Cross-cutting “topic routes” let you jump straight to fine-tuning, inference optimization, memory tuning, or profiling without reading linearly.
  • Notebook-first format with problem/answer/test sections, designed to be modified and rerun.
  • Explicit emphasis on evidence over slides: benchmarks, profiling, and real GPU experiments are core to the methodology.
  • README is bilingual, but the educational content itself is primarily in Chinese.

Caveats

  • Part 04 (CUDA C++ and system optimization) is under construction, and Part 05 is just a placeholder, so the deepest low-level material is still incomplete.
  • The “Operators & Compilers” topic route is also flagged as in-progress, meaning graph-level optimization content is still thin.

Verdict

Ideal for Mandarin-speaking developers who want to move from reading LLM papers to rewriting attention kernels and measuring their throughput. Not useful if you are looking for a packaged library or a quick English-language reference.

Frequently asked

What is datawhalechina/llm-algo-leetcode?
It turns LLM theory into a stack of runnable notebook exercises—problem sets, answers, and hardware benchmarks included.
Is llm-algo-leetcode open source?
Yes — datawhalechina/llm-algo-leetcode is an open-source project tracked on heatdrop.
What language is llm-algo-leetcode written in?
datawhalechina/llm-algo-leetcode is primarily written in Jupyter Notebook.
How popular is llm-algo-leetcode?
datawhalechina/llm-algo-leetcode has 502 stars on GitHub.
Where can I find llm-algo-leetcode?
datawhalechina/llm-algo-leetcode is on GitHub at https://github.com/datawhalechina/llm-algo-leetcode.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.