tinygrad / tinygrad/tinygrad

Q8_0 Qwen 27B decode is ~85x below isolated GEMV bandwidth

Open
#17,800 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
33.6k
Forks
4.3k
Avg merge
3h 11m
Merged PRs (30d)
491

Description

The tinygrad engine decodes tokens from Qwen3.8-27B at 1 < tok/s bs=1 (19.4 GB/s streaming).

Measured bandwidth references on the same idle GPU (GH200) is around 2.7 TB/s for a plain f16 stream-add, and 1.6 TB/s for an M=1 GEMV against the biggest layer (lm_head, 5120×248320).

The integrated decode is around 85× below what the GEMV kernels achieve in isolation, with the Q8_0→f16 expansion redone inside every kernel launch of every step.

Reference ~50/s on a (probably very unoptimized) ollama setup

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source file or test is named. Start by reproducing the Qwen3.8-27B bs=1 decode measurement on the GH200, then trace the integrated decode kernels and the repeated Q8_0→f16 expansion described in the report. Done means substantially narrowing the gap between integrated decode bandwidth and the isolated GEMV reference.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
performance
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.