
Show HN: A visual explainer tracing an LLM API request to the GPU and back
Follow one LLM API request from your code to the GPU and back, and see where the time goes.
以下正文同步自 Hacker News 最新,版权归原站所有,已转换为易读排版。
Follow one LLM API request from your code to the GPU and back, and see where the time goes.
The intent (what it teaches, for whom, and what must come across) is in the briefs below. The implementation is in src/.
Working with a coding agent? The house rules are in AGENTS.md at the repository root: read it first.
▶ Watch the finished story: Video · Short
The story has two parts, each with its own brief, code and render script:
They share the page capture and the 3D world in src/shared/. Each has its own render script; there is no combined one.
The render scripts run npm ci themselves (Playwright and three.js, pinned in package-lock.json). Fonts (JetBrains Mono, OFL) are in assets/fonts/.
./render-full.sh # final: the full video, 4K with music + 4K silent + 1080p with music
-> workspace/full/preview/<timestamp>/, and hard-linked into workspace/full/export/
./render-full.sh draft # 720p draft (with music and silent) -> workspace/full/preview/<timestamp>/ ./render-full.sh draft v2 # same, named version -> workspace/full/preview/v2/ ./render-full.sh final v2 # final quality, named version -> workspace/full/preview/v2/ ./render-promo.sh [draft|final] [version] # the same for the promos (workspace/promo/preview/, workspace/promo/export/): both in 16:9, the 3D one also in 9:16 PROMOS=promo3d ./render-promo.sh draft v2 # just the 3D promo (or PROMOS=promo2d for just the 2D one) PROMO_FORMATS=16x9 ./render-promo.sh … # skip the vertical Short (PROMO_VERTICAL="promo2d promo3d" makes both vertical)
Files are named tracing-llm-api-request-<version>-16x9-4k.mp4 for the full video, tracing-llm-api-request-promo2d-<version>-16x9-4k.mp4 (2D) and …-promo3d-… (3D), …-9x16-… for the Short, plus -silent and -1080p variants. Every render also writes the YouTube thumbnails to thumbnails/ (tracked); a final render also copies them into workspace/full/export/thumbnails/ (or workspace/promo/export/thumbnails/). A final 3D render takes a while (software WebGL at 4K).
Option 1: with a coding agent (Claude Code, Codex, OpenCode, …), started in this directory:
Option 2: edit the code directly, then run ./render-full.sh draft <next version> (or ./render-promo.sh):
Before committing, ask your agent for the fresh-clone test (or repro test): it renders from a copy of only the files Git tracks and checks that the output matches the approved version. It takes one full final render.
正文由 探How 从来源站点 RSS 同步,内容未经改写;遇到排版缺失或需要图片、视频时请以原文为准。