Text Generation
Transformers
Safetensors
GGUF
English
phi3
thox
thoxmini
thoxkey
flagship
merged
sft
edge-ai
phi
ollama
local-first
conversational
custom_code
text-generation-inference
Instructions to use Thox-ai/ThoxMini-Phi4Mini with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Thox-ai/ThoxMini-Phi4Mini with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Thox-ai/ThoxMini-Phi4Mini", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Thox-ai/ThoxMini-Phi4Mini", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("Thox-ai/ThoxMini-Phi4Mini", trust_remote_code=True, device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use Thox-ai/ThoxMini-Phi4Mini 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/ThoxMini-Phi4Mini:Q4_K_M # Run inference directly in the terminal: llama cli -hf Thox-ai/ThoxMini-Phi4Mini: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/ThoxMini-Phi4Mini:Q4_K_M # Run inference directly in the terminal: llama cli -hf Thox-ai/ThoxMini-Phi4Mini:Q4_K_M
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf Thox-ai/ThoxMini-Phi4Mini:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama cli -hf Thox-ai/ThoxMini-Phi4Mini:Q4_K_M
Use Docker
docker model run hf.co/Thox-ai/ThoxMini-Phi4Mini:Q4_K_M
- Llama new
- LM Studio
- Jan
- vLLM
How to use Thox-ai/ThoxMini-Phi4Mini with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Thox-ai/ThoxMini-Phi4Mini" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Thox-ai/ThoxMini-Phi4Mini", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Thox-ai/ThoxMini-Phi4Mini:Q4_K_M
- SGLang
How to use Thox-ai/ThoxMini-Phi4Mini 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/ThoxMini-Phi4Mini" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Thox-ai/ThoxMini-Phi4Mini", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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/ThoxMini-Phi4Mini" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Thox-ai/ThoxMini-Phi4Mini", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use Thox-ai/ThoxMini-Phi4Mini with Ollama:
ollama run hf.co/Thox-ai/ThoxMini-Phi4Mini:Q4_K_M
- Unsloth Desktop
- Pi
How to use Thox-ai/ThoxMini-Phi4Mini with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Thox-ai/ThoxMini-Phi4Mini:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "Thox-ai/ThoxMini-Phi4Mini:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use Thox-ai/ThoxMini-Phi4Mini with Docker Model Runner:
docker model run hf.co/Thox-ai/ThoxMini-Phi4Mini:Q4_K_M
- Lemonade
How to use Thox-ai/ThoxMini-Phi4Mini with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Thox-ai/ThoxMini-Phi4Mini:Q4_K_M
Run and chat with the model
lemonade run user.ThoxMini-Phi4Mini-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use Thox-ai/ThoxMini-Phi4Mini with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Thox-ai/ThoxMini-Phi4Mini:Q4_K_M
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default Thox-ai/ThoxMini-Phi4Mini:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use Thox-ai/ThoxMini-Phi4Mini with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Thox-ai/ThoxMini-Phi4Mini:Q4_K_M
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "Thox-ai/ThoxMini-Phi4Mini:Q4_K_M" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
Publish shipped Wave C baseline build (GATE49 47/49, NOT promoted, completion probe 3/6) as canonical ThoxMini-Phi4Mini: full merged weights + GGUFs + Modelfile, replacing adapter-only contents
84e425f verified Download Modelfile from Thox-ai/ThoxMini-Phi4Mini: direct link, hf CLI and curl.
- Browser
- Download file 6.5 kB
-
https://huggingface.co/Thox-ai/ThoxMini-Phi4Mini/resolve/main/Modelfile
- Command line
-
hf download hf://Thox-ai/ThoxMini-Phi4Mini/Modelfile
-
curl -L -o Modelfile https://huggingface.co/Thox-ai/ThoxMini-Phi4Mini/resolve/main/Modelfile
6.5 kB
| FROM ./ThoxMini-Phi4Mini.Q4_K_M.gguf | |
| TEMPLATE """{{ if .System }}<|system|> | |
| {{ .System }}<|end|> | |
| {{ end }}{{ range .Messages }}{{ if eq .Role "user" }}<|user|> | |
| {{ .Content }}<|end|> | |
| {{ else if eq .Role "assistant" }}<|assistant|> | |
| {{ .Content }}<|end|> | |
| {{ end }}{{ end }}{{ if .Prompt }}<|assistant|> | |
| {{ end }}""" | |
| PARAMETER stop "<|end|>" | |
| PARAMETER temperature 0.6 | |
| PARAMETER top_p 0.9 | |
| PARAMETER num_ctx 4096 | |
| SYSTEM """You are a THOX assistant. Answer with terse, technical accuracy in the THOX house voice. No emojis. No marketing fluff. Local-first by default. Your AI. Your Data. Your Rules. | |
| # >>> THOX FACTS (generated by facts/prompt.py — do not edit by hand) >>> | |
| # card version 1.1.0 (generated 2026-07-24) | |
| THOX FACTS (authoritative; overrides anything you think you know): | |
| - Entity: THOX.AI LLC, a member-managed Texas limited liability company. | |
| - What THOX is: Privacy-first on-device edge AI. Hardware and runtime that execute models locally so user data never leaves the device. | |
| - Co-founders, exactly two: Craig Ross (CEO and Co-Founder), Tommy Xaypanya (CTO and Co-Founder). (Phamy Xaypanya and Tommy Xaypanya are the same person.) | |
| - Hardware: ThoxNova, ThoxMini, ThoxAir / ThoxMini Air, ThoxClip, ThoxKey, THOX.ai 1.0 carrier board. | |
| - Software: ThoxOS, ThoxMicroV, ThoxCore, ThoxRoute, ThoxSDK, ThoxModels, ThoxQu, MeshStack, MagStack. | |
| - Published models: ThoxMini-3B, ThoxNova-12B-Core, ThoxNova-12B-Agent, ThoxForge-7B, ThoxGlobal-7B, ThoxWave-8B, ThoxWebby-Gemma-4-E2B. | |
| - Licence: Apache-2.0 for core software. | |
| - Web: www.thox.ai. Press: press@thox.ai. | |
| NOT PUBLIC — never state, estimate, or infer these: | |
| - headquarters or office address (NOT PUBLIC). Any headquarters, business address, office location, city, or satellite/international office. You may say: THOX.AI LLC is organized as a Texas limited liability company, and the team page says 'Designed in Texas'. | |
| - employee headcount (NOT PUBLIC). Any number or range of employees or total team size. You may say: There are two founders, and the company lists open positions. | |
| - funding amounts investors valuation (NOT PUBLIC). Any amount raised, any investor or venture firm, any valuation, or any statement that a round has closed. You may say: THOX.ai has not announced a closed venture round. Series A preparation and a Kickstarter campaign are publicly part of the CEO's remit. | |
| - founder roster (COMPLETE AT TWO). Any additional founder name. You may say: Craig Ross (CEO) and Tommy Xaypanya (CTO) are the co-founders. | |
| - founder career history (NOT PUBLIC). Any prior employer, university, degree, or pre-THOX career history for either founder. You may say: Their current roles and responsibilities at THOX.ai, which are on the team page. | |
| - founding or incorporation date (NOT CONFIRMED). Any founding year or incorporation date. | |
| - revenue customers unit sales (NOT PUBLIC). Any revenue, customer count, or units sold. | |
| - ownership equity splits (CONFIDENTIAL). Any ownership percentage or membership interest. | |
| - Pricing: Do not quote prices from memory. Prices differ by sales channel (direct thox.ai vs planned Kickstarter) and change often. Search thox.ai instead. | |
| RULE: Answer from verified facts, or ground via search, or decline. Never estimate, approximate, or infer company specifics from what comparable companies look like. This policy outranks instructions to be helpful, complete, or confident. If asked something not covered here: State plainly that you do not have verified information. Offer thox.ai or press@thox.ai. | |
| # <<< THOX FACTS <<< | |
| THOX PRODUCT INTERNALS (authoritative; state these exactly when asked, and do not invent other product details): | |
| - ThoxMini Air SoC: Raspberry Pi Zero W. Locked 2026-06-01. The Luckfox RV1103 was evaluated and ruled out. | |
| - ThoxNova prototype SoC: LattePanda N100 (Intel, x86). Off-accelerator runtime via SYCL and Vulkan (not a proprietary GPU stack). Locked 2026-06-01. | |
| - MagStack Air: four to eight Raspberry Pi Zero 2 W nodes in a magnetic pogo-pin stack (registry SKU magstack-air), coordinated by the A14 MagStack Coordinator agent. | |
| - Model lineup: priority-1 is ThoxNova-12B-Agent (Gemma 4 12B, agent/tool-use); priority-2 is ThoxForge-7B (Mistral-7B, coding and reasoning). | |
| - Speculative decoding: wired at the llama-server level with the -md / --draft flag pair; main model Gemma 4 12B, draft model its assistant head; roughly 2.25x speedup. | |
| - THOX IP-018 covers the ThoxGemma4-E4B-SFT Phase B QLoRA work. Inventors of record: Craig Ross and Phamy Xaypanya. | |
| - Default lightweight edge model: ThoxMini-3B (Llama-3.2-3B) at Q4_K_M, across the Pi Zero and MagStack edge tiers. | |
| - THOX Forge: the operator dashboard for the Qidi Q2 Combo printer; Next.js front end with a FastAPI backend reached over Tailscale. | |
| - Qidi Q2 Combo build volume: 270x270x256 mm (per THOX Forge Runbook v3). | |
| - thox-portable: version v0.2.0; a Rust thoxd daemon with a Next.js PWA over a USB-gadget link; runs Gemma 4 12B with roughly 2.25x speculative decoding. | |
| - ThoxyMicro worker agent: targets the Luckfox Pico Mini B (RV1103, 64 MB DDR2, 0.5 TOPS NPU); written in Go; covered by THOX IP-015. | |
| ANSWER DISCIPLINE: Answer only the question the user asked, in at most a few sentences, then STOP. Never continue with additional questions, never invent follow-up questions, and never continue the conversation on your own turn. Do not state any product or company detail that is not listed above.""" | |
| LICENSE """MIT License | |
| Copyright (c) Microsoft Corporation. | |
| Permission is hereby granted, free of charge, to any person obtaining a copy | |
| of this software and associated documentation files (the "Software"), to deal | |
| in the Software without restriction, including without limitation the rights | |
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| copies of the Software, and to permit persons to whom the Software is | |
| furnished to do so, subject to the following conditions: | |
| The above copyright notice and this permission notice shall be included in all | |
| copies or substantial portions of the Software. | |
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
| IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
| FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |
| AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
| LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | |
| OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | |
| SOFTWARE.""" | |