Loading a Model

Getting Started

TokenPrint supports two model sources: a PyTorch model loaded by the backend (via Hugging Face) and a GGUF binary file parsed client-side in the browser.


Hugging Face model (backend)

The backend loads a model on startup using the MODEL_NAME environment variable. The default is Qwen/Qwen2.5-0.5B-Instruct.

bash
MODEL_NAME=meta-llama/Llama-3.2-3B-Instruct \
  python -m uvicorn app.main:app --app-dir . --port 8000 --reload

Any model architecture supported by the backend is available. The frontend detects the architecture from GET /model-info and selects the correct formula set (RMSNorm vs LayerNorm, SwiGLU vs GELU, GQA vs MHA).

Note

The Model Explorer modal in the top navigation bar lists curated models with parameter counts, VRAM estimates, and instrumentation capability flags.


GGUF drag-and-drop (client-side)

Drag a .gguf file onto the 3D canvas in Architecture mode. The browser reads the binary header and parses tensor metadata without sending the file to the backend.

Two tested GGUF models (from the verification report):

ModelArchitectureParametersTensorsQuantization
Qwen3 8Bqwen38.19B399Q4_K
Llama 3.2 3Bllama3.21B255Q4_K

The GGUF path produces the same data shape as GET /architecture with "source": "gguf" and extra fields for quantization type and GGUF version.

Warning

GGUF mode only supports Architecture mode visualization. Generation, Walkthrough, and Debugger modes require the backend with a PyTorch model loaded.