Instructions to use Thox-ai/ThoxScene-4B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use Thox-ai/ThoxScene-4B 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/ThoxScene-4B:Q4_K_M # Run inference directly in the terminal: llama cli -hf Thox-ai/ThoxScene-4B: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/ThoxScene-4B:Q4_K_M # Run inference directly in the terminal: llama cli -hf Thox-ai/ThoxScene-4B: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/ThoxScene-4B:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama cli -hf Thox-ai/ThoxScene-4B:Q4_K_M
Use Docker
docker model run hf.co/Thox-ai/ThoxScene-4B:Q4_K_M
- Llama new
- LM Studio
- Jan
- vLLM
How to use Thox-ai/ThoxScene-4B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Thox-ai/ThoxScene-4B" # 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/ThoxScene-4B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Thox-ai/ThoxScene-4B:Q4_K_M
- Ollama
How to use Thox-ai/ThoxScene-4B with Ollama:
ollama run hf.co/Thox-ai/ThoxScene-4B:Q4_K_M
- Unsloth Desktop
- Pi
How to use Thox-ai/ThoxScene-4B 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/ThoxScene-4B: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:9931/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "Thox-ai/ThoxScene-4B:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use Thox-ai/ThoxScene-4B with Docker Model Runner:
docker model run hf.co/Thox-ai/ThoxScene-4B:Q4_K_M
- Lemonade
How to use Thox-ai/ThoxScene-4B with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Thox-ai/ThoxScene-4B:Q4_K_M
Run and chat with the model
lemonade run user.ThoxScene-4B-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use Thox-ai/ThoxScene-4B 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/ThoxScene-4B: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:9931/v1 hermes config set model.default Thox-ai/ThoxScene-4B:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use Thox-ai/ThoxScene-4B 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/ThoxScene-4B: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:9931/v1 \ --custom-model-id "Thox-ai/ThoxScene-4B: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"
ThoxScene-4B
THOX's interactive-3D scene model for ThoxMini and ThoxClip: describe a scene in chat and it answers with one complete, self-contained HTML file that renders an interactive Three.js scene โ geometry, materials, lighting, animation and inline camera controls included
Held-out render evaluation: 17/24 scenes render-valid one-shot (70.8%) vs 20.8% upstream base ยท 91.7% JS syntax-valid ยท 4.2% truncation at the token cap
Your AI. Your Data. Your Rules.โข
Status: DOCUMENTED BASELINE (2026-11-01). The shipped build is
v2-lora-r64. On the held-out render evaluation it renders 17 of 24 scenes cleanly one-shot โ 3.4ร the upstream base model's rate โ but it did not reach this program's pre-registered promotion bars, and a second, full-fine-tune attempt scored worse. Both attempts' records are printed in full below; the bars were set before any results and were never moved. Treat this model as a working baseline with a known residual failure mode (variable discipline on long generations), not as a gate-passed release.
This model is free. The hardware built to run it is on Kickstarter until Thu Nov 26, 9:00 AM CT. ThoxScene-4B is the interactive-3D scene model built for ThoxMini and ThoxClip in the THOX device family. THOX is all-or-nothing: if the goal is not reached by the deadline, nothing is charged and nothing ships. Try the virtual devices first at https://thox.ai/#demo-callout-home_lineup then back it here: Back THOX on Kickstarter Your AI. Your Data. Your Rules.โข
Run it
GGUF builds are in this repo under gguf/v2-lora-r64/ (the shipped snapshot): ThoxScene-Q4_K_M.gguf for device-class hosts and ThoxScene-Q8_0.gguf for host-class fidelity, plus the FP16 safetensors under models/v2-lora-r64/. Serve with a current llama.cpp build (Qwen3.5 support is recent), LM Studio (disable MTP for this family), or via Ollama:
ollama run Thox-ai/thoxscene-4b # Q4_K_M build (default)
ollama run Thox-ai/thoxscene-4b:q8_0 # Q8_0 build
Serve with thinking off โ that is this model's trained contract. In llama.cpp / LM Studio disable thinking in the chat template settings; in the Ollama API set "think": false. With thinking left on, the base model's reasoning preamble displaces the direct scene output this fine-tune was trained to produce. Ask for a scene in plain words; the reply is exactly one ```html fenced block containing the complete file.
Safety โ read before running output
Generated HTML/JavaScript is untrusted code. Run it only in a sandboxed WebView or an isolated frame with no access to privileged APIs, local files, or credentials โ never in a trusted page context. ThoxOS surfaces that host ThoxScene output enforce this sandboxing.
Summary
ThoxScene-4B is THOX's specialization of ccore/Qwen3.5-4B-3D-Coder (itself a fine-tune of Qwen/Qwen3.5-4B), retuned for on-device use: direct output with no reasoning preamble, a render-validated training corpus, and THOX showcase content. THOX fine-tuned this model; THOX did not train the base models.
Highlights
- One-shot scene files: a single chat reply is a complete interactive Three.js scene (pinned r160 core module, camera controls implemented inline, no addons).
- 3.4ร the base model's clean-render rate on the held-out set (17/24 vs 5/24), with truncation at the cap down from 83.3% to 4.2%.
- Render-validated corpus: every training target passed a headless-Chromium render validation (zero console/page errors, canvas present, non-blank frame) before entering the corpus.
Specifications
| Base model | ccore/Qwen3.5-4B-3D-Coder (fine-tune of Qwen/Qwen3.5-4B) |
| Parameters | 4B |
| Architecture | Qwen3.5 (qwen3_5) |
| Format on Ollama | GGUF Q4_K_M โ 2,708,804,384 B (default) ยท GGUF Q8_0 โ 4,482,403,104 B, both from the shipped v2-lora-r64 snapshot |
| Serving contract | Thinking disabled; house system prompt (pinned Three.js r160); temperature 0.7, top-p 0.95, top-k 20, repetition penalty 1.0; up to 16K output tokens for complex scenes (raise num_ctx above the packaged 8,192 for the longest scenes) |
| Training | fp-LoRA r64 / ฮฑ128 on all linear layers, vision tower frozen, merged |
| License | Apache-2.0 |
Platforms
| Platform / device | Run path |
|---|---|
| Ollama | ollama run Thox-ai/thoxscene-4b |
| Hugging Face | Safetensors + GGUF at Thox-ai/ThoxScene-4B (public) |
| ThoxMini / ThoxClip | On-device scene generation inside ThoxOS apps |
Research
THOX.ai research and model cards: https://huggingface.co/Thox-ai
Intended use
Single-file 3D scene generation on THOX devices: product and device showcases, MeshStack and data visualisations, educational dioramas, interiors, mechanisms, voxel scenes, and rapid 3D prototyping inside ThoxOS apps. Not intended for: game-scale worlds, CAD-grade precision, or generating code for privileged execution contexts.
Training data and procedure
The ThoxScene corpus (Thox-ai/thoxscene-corpus, private): every target passed a headless-Chromium render validation before entering the corpus. Corpus v2: 1,348 rows โ 364 upstream-derived (from ccore/ThreeJS-3D-Scenes, MIT; each target render-validated: 364 of 364 attempted rows passed after two harness rescue rounds), 960 THOX programmatic scenes and 24 THOX showcase scenes (the THOX generator's 243 scenes passed validation 243/243). Median target 5,069 characters; sequences capped at 12,288 tokens; zero overlap with the held-out evaluation prompts.
Two bounded attempts were run, per the program's pre-registered plan:
Attempt 1 โ v2-lora-r64 (shipped) |
Attempt 2 โ v2-full-ft1 |
|
|---|---|---|
| Method | fp-LoRA r64 / ฮฑ128 on all linear layers, vision tower frozen | Full fine-tune, vision tower frozen |
| LR / epochs | 1e-4 cosine / 2 | 1e-5 cosine / 1 |
| Train loss | 0.1400 | 0.1670 |
| Train time | 5,015 s | 3,297 s |
Serving smoke (on the Hugging Face card's record): the shipped Q4_K_M build was loaded in llama-server (chat template, thinking disabled) and answered a scene prompt with exactly the trained direct format โ one ```html block, no reasoning preamble. On small hosts cap the context (e.g. -c 8192); the model's native 262K context will not fit small devices.
Evaluation
Held-out set: 24 prompts (12 upstream-validation, 6 THOX, 6 fresh), never trained on. Every output was rendered in headless Chromium by the program's harness: render-valid = zero console/page errors and a non-blank canvas. Generation: house system prompt, temperature 0.7 / top-p 0.95 / top-k 20, 16,384-token cap; THOX builds in direct mode, the upstream baseline in its native format. Bars were pre-registered in the program review before any results.
| Metric | Bar | Upstream base | Attempt 1 v2-lora-r64 |
Attempt 2 v2-full-ft1 |
|---|---|---|---|---|
| Render-valid | โฅ 80% and โฅ baseline | 20.8% (5/24) | 70.8% (17/24) | 33.3% (8/24) |
| JS syntax-valid | โฅ 95% | 16.7% | 91.7% | 79.2% |
| Truncation at cap | โค 10% | 83.3% | 4.2% | 12.5% |
| THOX class render-valid | 6/6 | 2/6 | 5/6 | 2/6 |
| Instruction adherence (0โ2 ร 8) | โฅ 12/16 | โ | 9/16 | 5/16 |
Verdict: Attempt 1 beats the baseline on every metric but misses the promotion bars; Attempt 2 is worse on every metric (full fine-tuning also drifted from the house contract โ it invented non-core APIs such as THREE.RoundedBoxGeometry). Under the program's bounded-attempt doctrine there is no third attempt: v2-lora-r64 ships as the documented baseline. Its residual failure mode is consistent: on long generations (โ9โ12K tokens) it occasionally references variables it never defined, redeclares an identifier, or touches a binding before initialisation โ 7 of 24 outputs failed this way, all genuine code defects (no harness artifacts). Shorter scenes (the THOX class averages โ2K tokens) are its strength: 5 of 6 rendered, and the three demo scenes on the card's companion pack come from this build.
The upstream base model was also truth-checked on three of its own card examples before training: 1 of 3 rendered cleanly one-shot. No vendor evaluation claims are made for any model in this family.
Limitations
- A 4B model builds small worlds: dioramas, interiors, mechanisms and visualisations of the kind in the evaluation set โ not large game scenes. Complex prompts may need a second attempt or a correction round.
- Long scenes can still truncate at the serving token cap; the corpus was capped at 12,288 tokens per sequence for this reason.
- Vision input: the architecture retains the base model's vision tower and an unmodified upstream mmproj is provided as an optional file in the Hugging Face repo, but image-guided generation is not an evaluated ThoxScene claim, and the projector is not packaged in this Ollama listing.
- Not yet qualified on physical device hardware; placement guidance is from weight/KV size analysis, not device measurement.
License
Apache-2.0. Lineage: Qwen/Qwen3.5-4B (Apache-2.0) โ ccore/Qwen3.5-4B-3D-Coder (Apache-2.0, independent fine-tune by CCORE) โ ThoxScene-4B (THOX.ai). Corpus provenance per row in the dataset card: THOX-authored rows Apache-2.0; upstream-derived rows from ccore/ThreeJS-3D-Scenes under its MIT License.
THOX.ai โ Your AI. Your Data. Your Rules.โข
Provenance
Published by THOX.ai as Thox-ai/ThoxScene-4B on Hugging Face and Thox-ai/thoxscene-4b on Ollama, 2026-11-22. GGUF builds converted with llama.cpp b12032 from the shipped v2-lora-r64 merged snapshot. Training record: 2026-11-01, Hugging Face Jobs under the Thox-ai org (a100-large).
Citation
@misc{thoxai2026thoxscene4b,
title={ThoxScene-4B},
author={THOX.ai},
year={2026},
url={https://huggingface.co/Thox-ai/ThoxScene-4B}
}
- Downloads last month
- 1
4-bit
8-bit