Instructions to use TessaCoil/K3-Stuff 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 TessaCoil/K3-Stuff 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 TessaCoil/K3-Stuff:Q8_0 # Run inference directly in the terminal: llama cli -hf TessaCoil/K3-Stuff:Q8_0
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf TessaCoil/K3-Stuff:Q8_0 # Run inference directly in the terminal: llama cli -hf TessaCoil/K3-Stuff:Q8_0
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 TessaCoil/K3-Stuff:Q8_0 # Run inference directly in the terminal: ./llama-cli -hf TessaCoil/K3-Stuff:Q8_0
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 TessaCoil/K3-Stuff:Q8_0 # Run inference directly in the terminal: ./build/bin/llama-cli -hf TessaCoil/K3-Stuff:Q8_0
Use Docker
docker model run hf.co/TessaCoil/K3-Stuff:Q8_0
- LM Studio
- Jan
- Ollama
How to use TessaCoil/K3-Stuff with Ollama:
ollama run hf.co/TessaCoil/K3-Stuff:Q8_0
- Unsloth Desktop
- Pi
How to use TessaCoil/K3-Stuff with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf TessaCoil/K3-Stuff:Q8_0
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": "TessaCoil/K3-Stuff:Q8_0" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use TessaCoil/K3-Stuff with Docker Model Runner:
docker model run hf.co/TessaCoil/K3-Stuff:Q8_0
- Lemonade
How to use TessaCoil/K3-Stuff with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull TessaCoil/K3-Stuff:Q8_0
Run and chat with the model
lemonade run user.K3-Stuff-Q8_0
List all available models
lemonade list
- Hermes Agent
How to use TessaCoil/K3-Stuff with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf TessaCoil/K3-Stuff:Q8_0
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 TessaCoil/K3-Stuff:Q8_0
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use TessaCoil/K3-Stuff with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf TessaCoil/K3-Stuff:Q8_0
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 "TessaCoil/K3-Stuff:Q8_0" \ --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"
| # K3 Rental Validation β Session Handoff | |
| Read `FINDINGS.md` first for all root causes / patches / decisions. This file = live state | |
| + exact next actions. Started fresh after context compaction. | |
| ## Box access | |
| - vast.ai German host: `ssh -o StrictHostKeyChecking=accept-new root@158.181.52.18 -p 43516` | |
| - ed25519 key, passphrase loaded via askpass (do NOT echo it). | |
| - Hardware: 1Γ EPYC 7663 (56C/112T), 503GB RAM, 8Γ RTX 5060 Ti 16GB, 2.5TB NVMe (1.1TB free). | |
| - Local repo `/Users/danielleensign/prog/chat/k3-test/` β box `/root/k3-test/` via rsync. | |
| rsync clobbers +x β `chmod 755` scripts on box after sync. | |
| ## What's DONE and verified | |
| 1. K3 Q4_K_XL loads + generates via `LLAMA_MMAP_NO_PREFETCH=1` (lazy mmap patch, FINDINGS #4). | |
| 2. K3+DSpark arch crash FIXED: `kimi-k3.cpp` patched to populate `t_layer_inp` (FINDINGS #1). | |
| Rebuilt llama-server on box. Patch backup: `/root/llama.cpp/src/models/kimi-k3.cpp.bak`. | |
| 3. DSpark draft invalid-token FIXED: added `tokenizer.ggml.mask_token_id=163824` to draft | |
| GGUF (FINDINGS #1b). `draft.gguf` β symlink β `draft_masked.gguf`. | |
| 4. Confirmed trunk is Q8_0 (not 4-bit); only experts are MXFP4 (FINDINGS #7). | |
| 5. Measured DSpark-on-CPU = 2x LOSS (tg 0.224 vs 0.5 baseline). Need draft on GPU. | |
| 6. Built `requant_trunk.c` β `/root/k3-test/requant_trunk` (FINDINGS #7). Requants trunk | |
| Q8_0βQ4_K, byte-preserves MXFP4 experts + F32 norms. Validated logic on shard 2 | |
| (43 requant + 62 copy, 47.5β44.9 GB, no crash). | |
| ## IN FLIGHT (check first) | |
| - Shard-2 requant test: `ssh box 'cat /tmp/requant_test.log; ls -la /tmp/shard2_q4.gguf'` | |
| (was still writing output, PID was 45320). Verify it completed and output parses. | |
| ## NEXT ACTIONS (in order) | |
| 1. **Verify shard-2 output correctness.** Confirm `/tmp/shard2_q4.gguf` completed, trunk | |
| tensors are Q4_K, experts still MXFP4. Quick parse check with a GGUF reader. | |
| 2. **Run requant_trunk across all 32 shards.** Output to a new dir | |
| `/root/models/Kimi-K3-GGUF/Q4TRUNK-Q4_K_XL/` with the SAME filenames (so split loading | |
| works). Process per-shard: `for i in 01..32: ./requant_trunk in_shard_i out_shard_i`. | |
| Shard 1 is metadata-only (n_tensors=0) β just byte-copy it as-is (tool handles 0 tensors, | |
| but verify). NOTE: shard filenames use `-00001-of-00032.gguf` etc. ~47GB/shard, I/O bound, | |
| consider running 2-4 shards in parallel (NVMe + 112 threads; requant is single-threaded | |
| per tensor but ggml quantize_row_q4_K_ref may use OpenMP). ~28GB total shrink. | |
| 3. **Reload + test** the Q4-trunk model: kitchen sink with the DSpark draft now able to go | |
| ON GPU (drop `-ngld 0`, or set `-ngld 999`). Expect trunk 34GB β ~94GB free VRAM across | |
| 8 cards. Re-test DSpark spec speedup vs baseline. This is the key validation. | |
| 4. If DSpark-on-GPU wins β that's the home architecture. Then expert pinning | |
| (`--moe-pin`, ~150 hottest) + residency measurement (`25_expert_residency.sh`). | |
| ## Key box paths | |
| - llama.cpp: `/root/llama.cpp` (b10630 + lazy-mmap patch + kimi-k3 t_layer_inp patch). | |
| Build: `cd /root/llama.cpp/build && cmake --build . --config Release -j 56 --target llama-server` | |
| - llama-server: `/root/llama.cpp/build/bin/llama-server`; llama-quantize also built. | |
| - requant tool: `/root/k3-test/requant_trunk` (src `requant_trunk.c`) | |
| - Model: `/root/models/Kimi-K3-GGUF/UD-Q4_K_XL/` (32 shards, 1.4TB) | |
| - Draft: `/root/models/k3-draft/draft.gguf` β `draft_masked.gguf` (2.4GB Q8_0, mask fixed) | |
| - Scripts: `28_kitchen_sink.sh` (main experiment), logs `/root/ks.log`, | |
| `/root/k3-test/logs/{metrics.tsv,server_ks.log,progress.log}` | |
| ## Current best kitchen-sink invocation (in 28_kitchen_sink.sh) | |
| ``` | |
| LLAMA_MMAP_NO_PREFETCH=1 llama-server --host 127.0.0.1 --port 8899 \ | |
| -m <shard1> -ngl 999 --tensor-split 0.2,1,1,1,1,1,1,1 --cpu-moe -fa on \ | |
| -t 112 -b 256 -ub 256 -np 1 -md <draft> -ngld 0 --spec-type draft-dspark | |
| ``` | |
| (With Q4 trunk: change split back toward 0.3, drop `-ngld 0` to put draft on GPU.) | |
| ## Constraints / prefs (from user) | |
| - Max tok/s, batch-1, 64in/64out probes (box is expensive). Q4-only (no smaller quant). | |
| - Spec + expert-offload combined is the target. ~150 experts pinned + LRU rest. | |
| - Pipe output to files; background jobs that NOTIFY (no busy polling); kill stale jobs. | |
| - Budget target $15-25, hard cap $60/day. | |