Nano-Mind is a lightweight GPT-2-style language model running on a custom C++ inference engine. Give it a story idea and generate text directly in your browser.
No GPU required
Custom built
GPT-2 story dataset
C++ Inference Engine
No GPU required
Modern standard
SIMD optimization
Multi-threaded
Your prompt travels through a complete inference pipeline built from scratch.
Write a creative prompt or pick a suggestion.
FastAPI + tiktoken encode the prompt using GPT-2 BPE.
C++17 transformer forward pass with KV-cache and Top-K sampling.
Generated tokens are decoded back to text and displayed as your story.
The tools and technology that power Nano-Mind.
The complete inference pipeline from your browser to the generated story.
Frontend sends POST request with prompt and generation parameters.
Python backend receives the request and orchestrates the pipeline.
Encodes the text prompt into token IDs for the transformer.
Custom transformer implementation with CPU-level optimization.
Processes tokens through the model layers to generate new tokens.
Tokens decoded back to text and returned to the browser.
Verified performance from 20 successful requests to the deployed backend.
Watch Nano-Mind turn a prompt into generated text through its C++ inference engine.
Watch DemoUnlike applications that simply call a hosted LLM API, Nano-Mind includes a custom C++ transformer inference implementation with CPU-level optimization.
Explore the full implementation on GitHub.
View Source Code