Interactive UI for exploring next-token probabilities from local GGUF models via llama-cpp-python. Visualize candidate tokens, their probabilities, and sampling controls.
Inspiration: https://www.youtube.com/watch?v=vrO8tZ0hHGk
Vibe-coded using OpenCode, Gemini 3 Pro, and MiniMax M2.1.
- Next-token probability explorer with color-coded confidence
- Starter texts dropdown + clear button
- Auto-inference mode (weighted random selection with visual feedback)
- Sampling controls: temperature, top-k, top-p, repetition penalty
- Model manager for local GGUF files
- Remote model browser and downloader (Hugging Face Hub)
- mise (installs Python 3.12, uv, Node.js, and pnpm from
mise.toml) - Xcode command line tools (llama-cpp-python compiles llama.cpp with Metal during install)
- macOS with Metal GPU offload supported
- Disk space for GGUF models
mise install
mise run installmise run startThis command builds the frontend and starts the server. Open: http://127.0.0.1:8000
mise run devThis command starts the API server with reload and the Vite dev server with hot reload. Open http://localhost:5317. Vite sends API requests to the server on port 8000.
mise run test
mise run lintDefault model downloads automatically on first run.
GET /health— Health checkPOST /next-tokens— Get next token candidatesGET /models— List local modelsGET /models/lookup?repo_id=...— Search Hugging FacePOST /models/download— Download modelPOST /models/switch— Switch model
app/main.py— FastAPI appapp/llm.py— LLM engineapp/models_manager.py— Model handlingweb/— UI (React, TypeScript, Vite). FastAPI serves the build output fromweb/dist/.
MIT License.
