Instructions to use Thox-ai/ThoxMicroprocessor-8M-Base-TinyStories with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Thox-ai/ThoxMicroprocessor-8M-Base-TinyStories with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Thox-ai/ThoxMicroprocessor-8M-Base-TinyStories", trust_remote_code=True)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("Thox-ai/ThoxMicroprocessor-8M-Base-TinyStories", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Thox-ai/ThoxMicroprocessor-8M-Base-TinyStories with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Thox-ai/ThoxMicroprocessor-8M-Base-TinyStories" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Thox-ai/ThoxMicroprocessor-8M-Base-TinyStories", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Thox-ai/ThoxMicroprocessor-8M-Base-TinyStories
- SGLang
How to use Thox-ai/ThoxMicroprocessor-8M-Base-TinyStories with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "Thox-ai/ThoxMicroprocessor-8M-Base-TinyStories" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Thox-ai/ThoxMicroprocessor-8M-Base-TinyStories", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "Thox-ai/ThoxMicroprocessor-8M-Base-TinyStories" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Thox-ai/ThoxMicroprocessor-8M-Base-TinyStories", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Thox-ai/ThoxMicroprocessor-8M-Base-TinyStories with Docker Model Runner:
docker model run hf.co/Thox-ai/ThoxMicroprocessor-8M-Base-TinyStories
Thox-ai/ThoxMicroprocessor-8M-Base-TinyStories
THOX Microprocessor is an attention-dominant tiny decoder model designed for local-first routing, structured extraction, device control, and compact on-device language workloads.
Architecture
| Property | Value |
|---|---|
| Parameters | 8,093,520 |
| Non-embedding parameters | 5,472,080 |
| d_model | 320 |
| Layers | 21 |
| Attention heads / KV heads | 8 / 2 |
| Context | 1024 |
| QK RMS normalization | True |
| Sandwich normalization | True |
| Blockwise Walsh-Hadamard mixer | True |
| Architecture version | thox-microprocessor-v0.2 |
| Trained tokens | 98.3M (TinyStories) |
Weight payload at INT4 (group size 64, including per-group scales and the fp32 1-D tensors): 4.45 MB, i.e. 4.40 effective bits per parameter. This is the raw weight payload, not peak runtime RAM โ device qualification must additionally measure code, allocator overhead, activations, and KV cache.
Status
Architecture-validation checkpoint โ not a product model. Held-out loss 1.6956 / perplexity 5.4499 on the TinyStories validation split (2,095,104 target tokens). THOXQ4 INT4 costs +0.0366 held-out loss at 4.45 MB; INT4 with an INT8 embedding costs +0.0162 at 5.76 MB. Trained ONLY on TinyStories (roneneldan/TinyStories, CDLA-Sharing-1.0 upstream) โ simple synthetic children's stories. It has NO routing, tool-call, device-control or THOX domain capability, and it is NOT the 8M Control Core.
Loading
from transformers import AutoModelForCausalLM, AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained("Thox-ai/ThoxMicroprocessor-8M-Base-TinyStories", trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained("Thox-ai/ThoxMicroprocessor-8M-Base-TinyStories", trust_remote_code=True)
The remote-code reference implementation recomputes the prefix on each decoding
step rather than maintaining a KV cache; it is optimised for portability across
transformers versions. Use the thox_microprocessor package for cached decoding.
- Downloads last month
- 11