--- 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: "\n\nmy name is Velmara\n<|eot|>\n\nNice to meet you, Velmara!<|eot|>\n\nwhat's my name?\n<|eot|>\n\n" example_title: "Remembers what you said" - text: "\n\nwho are you\n<|eot|>\n\n" example_title: "Identity" - text: "\n\nWork out 482 plus 539 for me\n<|eot|>\n\n" example_title: "Writes a calculator call" ---
Loom Swift Mini 3
# 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](https://huggingface.co/textilelabs/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](https://huggingface.co/textilelabs/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 (`calc 482 + 539`); a chat app will not run them for you — use the harness for that. ## Usage — the harness (search, calculator, date) ```bash 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 ```bash 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) ```python 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): `\n\n{message}\n<|eot|>\n\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.