skyzh

    skyzh/tiny-llm

    learn LLM inference system on Apple Silicon for systems engineers: build a tiny vLLM + Qwen

    education
    llm
    course
    large-language-model
    python
    qwen
    serving
    Python
    Apache-2.0
    4.9K stars
    416 forks
    4.9K GitHub watchers
    Updated Oct 30, 2026
    View on GitHub

    Build with Backblaze B2

    SDKs, agent skills, IDE extensions, and reference pipelines from Backblaze Labs. All open source.

    Explore Backblaze Labs

    Loading star history...

    Where it stands

    Rank, growth pace and release cadence relative to everything GStars tracks.

    The project lists 27 contributors on GitHub.

    Gained 65% more stars in the last 90 days than in the 90 days before.

    Use Cases & Benefits

    • Implements a large language model inference system from scratch using Python and MLX APIs for Apple Silicon.
    • Enables deep understanding and customization of LLM serving infrastructure without relying on high-level neural network libraries.
    • Use for learning and experimenting with LLM internals and optimizations on macOS without GPU dependency.
    • Use for building a minimal, efficient LLM serving system based on Qwen2 and vLLM concepts for system engineers.
    • Use for educational purposes to follow a structured course on LLM serving techniques and advanced inference topics.

    Should you depend on it?

    License terms, project hygiene and risks, from GitHub metadata and GStars' snapshots.

    License

    Apache 2.0

    Permissive: commercial use, modification and redistribution are allowed with attribution; includes an explicit patent grant from contributors.

    Community files

    • README: present

    Watch-outs

    • No GitHub releases; pin a commit or tag instead of a release.

    General guidance from repository metadata, not legal advice. How we score

    From the README

    A course on LLM serving using MLX for system engineers. The codebase is solely (almost!) based on MLX array/matrix APIs without any high-level neural network APIs, so that we can build the model serving infrastructure from scratch and dig into the optimizations.

    The goal is to learn the techniques behind efficiently serving a large language model (e.g., Qwen2 models).

    In week 1, you will implement the necessary components in Python (only Python!) to use the Qwen2 model to generate responses (e.g., attention, RoPE, etc). In week 2, you will implement the inference system which is similar to but a much simpler version of vLLM (e.g., KV cache, continuous batching, flash attention, etc). In week 3, we will cover more advanced topics and how the model interacts with the outside world.

    Why MLX: nowadays it's easier to get a macOS-based local development environment than setting up an NVIDIA GPU.

    Why Qwen2: this was the first LLM I've interacted with -- it's the go-to example in the vllm documentation. I spent some time looking at the vllm source code and built some knowledge around it.

    The tiny-llm book is available at https://skyzh.github.io/tiny-llm/. You can follow the guide and start building.

    Excerpt from the skyzh/tiny-llm README on GitHub (Apache-2.0 license). © its authors.Read the full README on GitHub

    Daily snapshots

    Stars gained per day, and how forks and open issues moved, from GStars' daily snapshots

    Forks

    416+65

    Open issues

    12-1

    Compared with peers in Education

    Fastest-growing repositories GStars tracks in this cohort for the week of Nov 1, by 7-day star growth

    skyzh/tiny-llm compared with Education repositories by stars, 7-day star growth, health score and last release
    RepositoryStars+7dHealthLast release
    lfnovo/open-notebook41.7K+730651 day ago
    luongnv89/claude-howto46.6K+48647156 days ago
    github/awesome-copilot40.8K+28145—
    processing/p5.js24.2K—657 days ago
    apsdehal/awesome-ctf12.0K—40—
    skyzh/tiny-llm4.9K—21—
    Category median40.8K+48647—

    Discover Repositories

    Search across tracked repositories by name or description