Instructions to use Thox-ai/thox-micro-125m with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Thox-ai/thox-micro-125m with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Thox-ai/thox-micro-125m")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Thox-ai/thox-micro-125m") model = AutoModelForCausalLM.from_pretrained("Thox-ai/thox-micro-125m", device_map="auto") - llama-cpp-python
How to use Thox-ai/thox-micro-125m with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="Thox-ai/thox-micro-125m", filename="thox-micro-125m.Q4_0.gguf", )
output = llm( "Once upon a time,", max_tokens=512, echo=True ) print(output)
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use Thox-ai/thox-micro-125m with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf Thox-ai/thox-micro-125m:Q4_K_M # Run inference directly in the terminal: llama cli -hf Thox-ai/thox-micro-125m:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf Thox-ai/thox-micro-125m:Q4_K_M # Run inference directly in the terminal: llama cli -hf Thox-ai/thox-micro-125m:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf Thox-ai/thox-micro-125m:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf Thox-ai/thox-micro-125m:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf Thox-ai/thox-micro-125m:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf Thox-ai/thox-micro-125m:Q4_K_M
Use Docker
docker model run hf.co/Thox-ai/thox-micro-125m:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use Thox-ai/thox-micro-125m with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Thox-ai/thox-micro-125m" # 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/thox-micro-125m", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Thox-ai/thox-micro-125m:Q4_K_M
- SGLang
How to use Thox-ai/thox-micro-125m 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/thox-micro-125m" \ --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/thox-micro-125m", "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/thox-micro-125m" \ --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/thox-micro-125m", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Ollama
How to use Thox-ai/thox-micro-125m with Ollama:
ollama run hf.co/Thox-ai/thox-micro-125m:Q4_K_M
- Unsloth Studio
How to use Thox-ai/thox-micro-125m with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Thox-ai/thox-micro-125m to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Thox-ai/thox-micro-125m to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for Thox-ai/thox-micro-125m to start chatting
- Atomic Chat new
- Docker Model Runner
How to use Thox-ai/thox-micro-125m with Docker Model Runner:
docker model run hf.co/Thox-ai/thox-micro-125m:Q4_K_M
- Lemonade
How to use Thox-ai/thox-micro-125m with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Thox-ai/thox-micro-125m:Q4_K_M
Run and chat with the model
lemonade run user.thox-micro-125m-Q4_K_M
List all available models
lemonade list
ThoxMicro-125M
ThoxMicro-125M is THOX.ai's smallest from-scratch base language model: a 123,587,328-parameter decoder-only transformer, pretrained on a single RTX 4060 Ti. It is sized for the THOX 512 MB device tier (ThoxMini / ThoxMini Air / ThoxClip, Raspberry Pi Zero class), where chat-class models do not fit but a small local next-token predictor is useful.
This repository holds the PyTorch / safetensors weights.
Quantized GGUF builds for on-device inference live in
Thox-ai/thox-micro-125m-GGUF.
- License: Apache-2.0 · IP: THOX IP-017 · Author: THOX.ai LLC
Honest description
This is a base / completion model. It is not instruction-tuned, has no chat template, carries no THOX persona or curated facts, and will not reliably answer general-knowledge questions. It is a foundation for SFT/LoRA work and a local building block at the edge. Prompt it in completion style and use a repetition penalty of ~1.2+ to avoid degeneration.
Model details
| Field | Value |
|---|---|
| Parameters | 123,587,328 |
| Architecture | Llama-family decoder (RMSNorm, SwiGLU, RoPE) |
| Layers / hidden / heads | 12 / 768 / 12 (full MHA, 12 KV heads) |
| Head dim / FFN | 64 / 2048 |
| Context length | 1024 |
| Tokenizer | GPT-2 / r50k_base BPE, vocab 50,304 (padded) |
| Tied embeddings | yes |
| RoPE theta | 10,000 |
| Precision | fp16 weights (BF16 mixed-precision training) |
| Training steps | 100,000 |
| Best validation loss | 2.6099 |
| Final validation loss | 2.6459 |
| Hardware | 1 × NVIDIA RTX 4060 Ti 16 GB |
Usage
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained("Thox-ai/thox-micro-125m", dtype=torch.float32)
tok = AutoTokenizer.from_pretrained("Thox-ai/thox-micro-125m")
ids = tok("The capital of France is", return_tensors="pt")
out = model.generate(**ids, max_new_tokens=32, do_sample=True,
temperature=0.8, top_k=40, repetition_penalty=1.3)
print(tok.decode(out[0], skip_special_tokens=True))
For device / CPU inference use the GGUF builds:
llama-completion -m thox-micro-125m.q4_0.gguf \
-p "The capital of France is" -n 32 --repeat-penalty 1.3 --temp 0.8
Quantization
Published in Thox-ai/thox-micro-125m-GGUF:
| Quant | Size | Note |
|---|---|---|
| Q4_0 | 77.6 MB | Device target — scalar-safe on ARMv6 (no NEON needed) |
| Q4_K_M | 80.7 MB | Higher-quality alternate (ARMv7+/x86) |
| Q8_0 | 127.0 MB | Higher quality, ~1.6× the weights |
| F16 | 237.5 MB | Re-quant source |
Q4_0 perplexity 22.60 vs F16 21.41 (~6%) on a neutral English sample — clean quantization. Unlike THOX's 327M (whose FFN dim of 3413 forces K-quants only), this model's FFN dim of 2048 divides evenly, so the ARM-friendly legacy Q4_0 and Q8_0 formats both apply.
Note: some files named
thox-micro-125m.*.ggufwith uppercase quant suffixes also exist in this repository from an earlier upload. The canonical GGUFs are the lowercase-named files inThox-ai/thox-micro-125m-GGUF— that is what the THOX device images pin by digest.
Provenance
Trained from scratch by THOX.ai LLC — no base model, no distillation. THOX IP-017.
Inventors of record are listed in NOTICE.
- Downloads last month
- 2