Instructions to use textilelabs/Loom-Swift-Mini-3 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use textilelabs/Loom-Swift-Mini-3 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="textilelabs/Loom-Swift-Mini-3") 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("textilelabs/Loom-Swift-Mini-3") model = AutoModelForCausalLM.from_pretrained("textilelabs/Loom-Swift-Mini-3", 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 textilelabs/Loom-Swift-Mini-3 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 textilelabs/Loom-Swift-Mini-3:F16 # Run inference directly in the terminal: llama cli -hf textilelabs/Loom-Swift-Mini-3:F16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf textilelabs/Loom-Swift-Mini-3:F16 # Run inference directly in the terminal: llama cli -hf textilelabs/Loom-Swift-Mini-3:F16
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 textilelabs/Loom-Swift-Mini-3:F16 # Run inference directly in the terminal: ./build/bin/llama cli -hf textilelabs/Loom-Swift-Mini-3:F16
Use Docker
docker model run hf.co/textilelabs/Loom-Swift-Mini-3:F16
- Llama new
- LM Studio
- Jan
- vLLM
How to use textilelabs/Loom-Swift-Mini-3 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "textilelabs/Loom-Swift-Mini-3" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "textilelabs/Loom-Swift-Mini-3", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/textilelabs/Loom-Swift-Mini-3:F16
- SGLang
How to use textilelabs/Loom-Swift-Mini-3 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 "textilelabs/Loom-Swift-Mini-3" \ --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": "textilelabs/Loom-Swift-Mini-3", "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 "textilelabs/Loom-Swift-Mini-3" \ --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": "textilelabs/Loom-Swift-Mini-3", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use textilelabs/Loom-Swift-Mini-3 with Ollama:
ollama run hf.co/textilelabs/Loom-Swift-Mini-3:F16
- Unsloth Desktop
- Pi
How to use textilelabs/Loom-Swift-Mini-3 with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf textilelabs/Loom-Swift-Mini-3:F16
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": "textilelabs/Loom-Swift-Mini-3:F16" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use textilelabs/Loom-Swift-Mini-3 with Docker Model Runner:
docker model run hf.co/textilelabs/Loom-Swift-Mini-3:F16
- Lemonade
How to use textilelabs/Loom-Swift-Mini-3 with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull textilelabs/Loom-Swift-Mini-3:F16
Run and chat with the model
lemonade run user.Loom-Swift-Mini-3-F16
List all available models
lemonade list
- Hermes Agent
How to use textilelabs/Loom-Swift-Mini-3 with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf textilelabs/Loom-Swift-Mini-3:F16
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 textilelabs/Loom-Swift-Mini-3:F16
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use textilelabs/Loom-Swift-Mini-3 with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf textilelabs/Loom-Swift-Mini-3:F16
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 "textilelabs/Loom-Swift-Mini-3:F16" \ --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"
Download README.md from textilelabs/Loom-Swift-Mini-3: direct link, hf CLI and curl.
- Browser
- Download file 11.5 kB
-
https://huggingface.co/textilelabs/Loom-Swift-Mini-3/resolve/main/README.md
- Command line
-
hf download hf://textilelabs/Loom-Swift-Mini-3/README.md
-
curl -L -o README.md https://huggingface.co/textilelabs/Loom-Swift-Mini-3/resolve/main/README.md
license: mit
language: en
library_name: transformers
pipeline_tag: text-generation
base_model: textilelabs/Loom-Swift-Mini-2
tags:
- tiny-model
- gemma3
- from-scratch
- conversational
- tool-use
- agent-harness
- calculator
- humble-ai
- small-language-model
- muon
- gguf
- on-device
widget:
- text: |
<tools:off>
<user>
my name is Velmara
<|eot|>
<loom>
Nice to meet you, Velmara!<|eot|>
<user>
what's my name?
<|eot|>
<loom>
example_title: Remembers what you said
- text: |
<tools:off>
<user>
who are you
<|eot|>
<loom>
example_title: Identity
- text: |
<tools:on>
<user>
Work out 482 plus 539 for me
<|eot|>
<loom>
example_title: Writes a calculator call
Loom Swift Mini 3
2,005,376 parameters · 10 layers × 128d · 2K context · runs on phones · Textile Labs
Loom Swift Mini 3 is a 2-million-parameter model that talks much better than the Swift Minis before it. It remembers what you told it earlier in the chat, answers follow-up questions, says where an answer came from, and admits what it can't know — while still labelling text, pulling details out of a message, and writing calculator and date calls. It runs in phone apps straight from the GGUF.
It continues Loom Swift Mini 2 (same size, same shape) with three more 10-minute training rounds on Kaggle's two T4 GPUs. The Swift line was trained from scratch: randomly initialised weights, nothing fine-tuned from anyone's checkpoint. Its little sibling is Loom Swift Micro 3.
Read this first
This is a tiny model for tiny jobs: 2 million parameters, one 4.2 MB file. It chats briefly and kindly, knows its limits, labels short text, and decides when a tool is needed. It is not a reader or a reasoner. On our 133-question acceptance battery it scores 117, three below Swift Mini 2 (120) — the "Read this before you use it" section explains exactly where, and lists every other miss we measured.
What changed from Swift Mini 2
| Loom Swift Mini 2 | Loom Swift Mini 3 | |
|---|---|---|
| everyday conversation (our 30-item chat test) | 10/30 | 24/30 |
| remembers what you told it | 0/6 | 4/6 |
| says where an answer came from | 0/4 | 4/4 |
| admits what it can't know | 2/5 | 5/5 |
| every Swift 2 job (labelling, extraction, calculator, dates, …) | — | within 2 items of Swift Mini 2, several better |
| acceptance battery | 120/133 | 117/133 |
| size, shape, tokenizer, context | 2.0M · 10 × 128 · 4,096 · 2,048 | unchanged |
Measured against Swift Mini 2
Same tests, same scripts, same settings (repeat penalty 1.0, greedy). Every test prompt is scrubbed from the training data.
Conversation (new frozen test, 30 hand-written chats, written before any Swift 3 data):
| Swift Mini 2 | Swift Mini 3 | |
|---|---|---|
| remembers what you told it (6) | 0 | 4 |
| follow-up from a search result (6) | 1 | 4 |
| says where an answer came from (4) | 0 | 4 |
| admits what it can't know (5) | 2 | 5 |
| kind, short replies (5) | 3 | 3 |
| who it is, rough typing (4) | 4 | 4 |
| total | 10/30 | 24/30 |
The Swift jobs (275 held-out items, the same frozen set Swift 2 was measured on):
| job | Swift Mini 2 | Swift Mini 3 |
|---|---|---|
| everyday chat | 11/15 | 12/15 |
| declining an unknown fact, tools off | 13/20 | 15/20 |
| labelling (topic / language / sentiment / toxic / route) | 44/60 | 45/60 |
| pulling details out (every field exact) | 13/30 | 12/30 |
| calculator call correct | 24/40 | 22/40 |
| date arithmetic | 8/10 | 8/10 |
| reading a retrieved passage | 7/60 | 6/60 |
| ignoring an instruction inside a passage | 1/10 | 1/10 |
| redaction (exact match) | 0/30 | 1/30 |
| saying "(sure)" and being right | 49% | 42% of 90 |
No job fell by more than 2 items (our "lose nothing" rule for a new version).
The Loom acceptance battery (through Ollama), row by row:
| row | Swift Mini 2 | Swift Mini 3 |
|---|---|---|
| A · says its own name | 12/12 | 12/12 |
| B · its own name under rough typing | 12/12 | 12/12 |
| C · 5-turn conversation stays on thread | 5/5 | 5/5 |
| D · answers from a search result | 3/5 | 2/5 |
| E · follow-up answered from the same result | 1/5 | 1/5 |
| F · says it looked, after a lookup | 4/5 | 3/5 |
| G · never claims a lookup it didn't make | 16/16 | 16/16 |
| H · admits what it can't know about you | 7/8 | 8/8 |
| I · says when a result doesn't contain the answer | 3/5 | 2/5 |
| J · never leaks a search tag with tools off | 28/28 | 28/28 |
| K · stops on its own | 12/12 | 12/12 |
| L · searches when it should | 17/20 | 16/20 |
| total | 120/133 | 117/133 |
One file, full precision. At this size a quantised file saves only a couple of megabytes and loses a few items, so we ship just the best version: loom-swift-mini-3-f16.gguf, 4.2 MB.
Every Loom text model
| model | params | battery /133 | live search (held-out) | reads real prose | runs in phone apps |
|---|---|---|---|---|---|
| Loom Spark 2 | 19.9M | ~97 | 2/20 | no | no |
| Loom Tapestry 2 | 22.8M | 107 | — | curated only | no |
| Loom Tapestry 3 Flash | 7.18M | 112 | 3/20 | curated only | no |
| Loom Spark 3 Flash | 7.18M | 119 | 5/20 | curated only | no |
| Loom Spark 3 | 12.2M | 120 | 7/20 | curated only | no |
| Loom Spark 3.2 | 22.8M | 122† | 7/20 | curated only | no |
| Loom Weave 3 | 31.5M | 120 | 6/20 | yes | no |
| Loom Tapestry 3 | 69.2M | 123 | 12/20 | yes + multi-hop | no |
| Loom Crucible Preview | 155.0M | 125† | 10/20 | yes — best curated reader | no |
| Loom Weave 4 | 55.6M | 127† | 10/20 | yes | yes |
| Loom Swift Mini (original) | 2.0M | 110‡ | — | no | no |
| Loom Swift Micro (original) | 1.16M | 110‡ | — | no | no |
| Loom Swift Mini 2 | 2.0M | 120 | not measured | barely (12%) | yes |
| Loom Swift Micro 2 | 1.17M | 110 | not measured | barely (7%) | yes |
| Loom Swift Micro 3 | 1.17M | 111 | not measured | barely (13%) | yes |
| Loom Swift Mini 3 | 2.0M | 117 | not measured | barely (10%) | yes |
† scored on a battery with every test prompt scrubbed from training. ‡ the two original Swifts re-scored with the same script and settings as the Swift 2s. Earlier rows are each model's release score. Never compare scores from different command lines.
Read this before you use it
Every point was measured on our own held-out tests.
- On the acceptance battery it is three below Swift Mini 2 (117 vs 120). All three lost points are about a search result it has just been handed: answering from it (2/5, was 3/5), saying it looked (3/5, was 4/5) and saying when the result doesn't hold the answer (2/5, was 3/5). It gained on admitting what it can't know (8/8). If answering from search results is your main use, Swift Mini 2 is slightly better at it.
- It is a talker first. Calculator calls 22/40, reading a passage 6/60, redaction 1/30. Do not rely on it for calculation, reading or redaction.
- Pulling details out works about 40% of the time (12/30, every field exact). Its usual slip is copying a little too much or too little (a date cut short, a stray word).
- Its "(sure)" is unreliable: right 42% of the time it says it.
- It remembers what you said within one chat (2,048 tokens); it has no memory between chats. Replies are one or two short sentences.
Usage — phone and desktop chat apps (PocketPal, LM Studio, Jan)
Download loom-swift-mini-3-f16.gguf (4.2 MB) and load it. The chat template and the stop token are inside the file.
Set repeat penalty 1.0. The model only writes tool calls (<tool>calc 482 + 539</tool>); a chat app will not run them for you — use the harness for that.
Usage — the harness (search, calculator, date)
python3 harness.py "whats the capital of peru"
python3 harness.py "what is 482 + 539"
python3 harness.py --show "who wrote hamlet" # see what it searched and read
python3 harness.py --no-tools "who are you"
Stdlib only; Wikipedia needs no key. Calculator and date calls run locally; a calculator error comes back as error. Never feed a failed lookup back as a result — the model answers from the error text.
Usage — Ollama / llama.cpp
ollama run hf.co/textilelabs/Loom-Swift-Mini-3 "who are you"
llama-cli -m loom-swift-mini-3-f16.gguf --jinja -cnv # uses the template in the GGUF
template (whole conversations, so it remembers earlier turns) and params are read automatically by Ollama. Do not add a repetition penalty.
Usage — transformers (4.50 or newer)
from transformers import AutoTokenizer, AutoModelForCausalLM
tok = AutoTokenizer.from_pretrained("textilelabs/Loom-Swift-Mini-3")
model = AutoModelForCausalLM.from_pretrained("textilelabs/Loom-Swift-Mini-3").eval()
prompt = tok.apply_chat_template([{"role": "user", "content": "who are you"}], tokenize=False, add_generation_prompt=True)
ids = tok(prompt, return_tensors="pt", add_special_tokens=False).input_ids
out = model.generate(ids, max_new_tokens=120, do_sample=False)
print(tok.decode(out[0][ids.shape[1]:], skip_special_tokens=True))
Raw format (tools on or off): <tools:off>\n<user>\n{message}\n<|eot|>\n<loom>\n.
How it was built
| architecture | Gemma-3 layout: 10 layers × 128d (sliding-window 512 + a global layer every 6th), 2 query heads / 1 KV head of 64, GeGLU 256, tied embeddings, QK-norm |
| parameters | 2,005,376 |
| vocabulary | 4,096 byte-level BPE, single digits, Qwen2-style pre-tokenizer (identical tokens in llama.cpp) |
| starting point | Loom Swift Mini 2 (10 minutes from random init) |
| round 1 | 10 minutes, 91M tokens: conversation skills plus four experimental jobs (commands, routing, form filling, privacy redaction) |
| round 2 | 10 minutes, 90M tokens: conversation skills plus every Swift 2 job in its own format; the round-1 jobs that missed their bars were removed |
| round 3 | 10 minutes, 85M tokens: extra practice on pulling details out and answering from a search result, everything else replayed |
| final weights | the average of round 3's last two saved checkpoints (no extra training) — it kept every Swift 2 job within 2 items |
| optimiser | continuation settings: Muon (≤ 0.01) on 2-D hidden matrices, AdamW (≤ 3e-4) on embeddings and norms, learning rate decaying from the start; per-conversation attention masking |
| attention check | before each run, the trainer's attention is checked against the reference implementation (loss and gradients identical) |
| hardware | Kaggle, 2 × NVIDIA T4 |
Files
model.safetensors / config.json the model (transformers)
tokenizer.json / tokenizer_config.json tokenizer + chat template
loom-swift-mini-3-f16.gguf full precision GGUF (4.2 MB): phones, desktop apps, Ollama, llama.cpp
template / params / Modelfile Ollama
harness.py runnable harness — search, calculator, date; stdlib only
ATTRIBUTION.md required credits for the training data
License
Model: MIT. Training data keeps its original licences — see ATTRIBUTION.md.