Text Generation
Transformers
Safetensors
GGUF
English
llama
tiny-model
from-scratch
conversational
multi-turn
tool-use
agent-harness
calibrated-honesty
humble-ai
small-language-model
cpu-trained
muon
experimental
text-generation-inference
Instructions to use textilelabs/Loom-Swift-Mini with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use textilelabs/Loom-Swift-Mini with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="textilelabs/Loom-Swift-Mini")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("textilelabs/Loom-Swift-Mini") model = AutoModelForCausalLM.from_pretrained("textilelabs/Loom-Swift-Mini", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use textilelabs/Loom-Swift-Mini 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:F16 # Run inference directly in the terminal: llama cli -hf textilelabs/Loom-Swift-Mini: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:F16 # Run inference directly in the terminal: llama cli -hf textilelabs/Loom-Swift-Mini: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:F16 # Run inference directly in the terminal: ./build/bin/llama cli -hf textilelabs/Loom-Swift-Mini:F16
Use Docker
docker model run hf.co/textilelabs/Loom-Swift-Mini:F16
- Llama new
- LM Studio
- Jan
- vLLM
How to use textilelabs/Loom-Swift-Mini 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" # 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", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/textilelabs/Loom-Swift-Mini:F16
- SGLang
How to use textilelabs/Loom-Swift-Mini 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" \ --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", "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" \ --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", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use textilelabs/Loom-Swift-Mini with Ollama:
ollama run hf.co/textilelabs/Loom-Swift-Mini:F16
- Unsloth Desktop
- Docker Model Runner
How to use textilelabs/Loom-Swift-Mini with Docker Model Runner:
docker model run hf.co/textilelabs/Loom-Swift-Mini:F16
- Lemonade
How to use textilelabs/Loom-Swift-Mini with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull textilelabs/Loom-Swift-Mini:F16
Run and chat with the model
lemonade run user.Loom-Swift-Mini-F16
List all available models
lemonade list
- Atomic Chat
File size: 3,914 Bytes
6d300cb 4ae71bb 6d300cb 4ae71bb | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 | ---
license: mit
language: en
library_name: transformers
pipeline_tag: text-generation
tags:
- tiny-model
- llama
- from-scratch
- conversational
- multi-turn
- tool-use
- agent-harness
- calibrated-honesty
- humble-ai
- small-language-model
- cpu-trained
- muon
- gguf
- experimental
widget:
- text: "<tools:off>\n<user>\nwho are you\n<|eot|>\n<loom>\n"
example_title: "Identity"
- text: "<tools:off>\n<user>\nhow big are you\n<|eot|>\n<loom>\n"
example_title: "Self-knowledge"
- text: "<tools:on>\n<user>\nwho wrote dracula\n<|eot|>\n<loom>\n"
example_title: "Writes a search query"
---

# Loom Swift Mini
**2,001,536 parameters, trained from scratch in 9 minutes 42 seconds on a 2013 office PC with no
GPU.** Swift is the fast tier: models measured in minutes rather than hours.
> ## Read this first
>
> **Swift Mini cannot read what a search returns.** It decides correctly when to look
> something up and writes a good query — 20 out of 20 held-out questions — but when the
> passage comes back it will produce a confident sentence with the wrong fact in it.
> **0 out of 20 held-out questions ended with a correct answer.**
>
> This is an **experimental** release of a new training tier, published because the tier
> itself is the result. Do not use it to answer factual questions.
## What it is
| | |
|---|---|
| Parameters | 2,001,536 |
| Architecture | Llama-style — 10 layers x 128 hidden, GQA, SwiGLU, RoPE, RMSNorm, tied embeddings |
| Vocabulary | 4,096-token BPE, trained by us on our own corpus |
| Context | 512 tokens |
| Optimiser | Muon on the 2D hidden matrices, AdamW on embeddings and norms |
| Training | **9 minutes 42 seconds**, 309 optimizer steps, 1.90 tokens per parameter |
| Hardware | One Dell OptiPlex 9020 (i5-4690, 4 cores, no GPU, 16 GB), fp32 |
Random initialisation, trained by us. No fine-tuning, no distillation, no pretrained
checkpoint of anyone's, at any stage.
## Measured behaviour
Hand-written probes that appear nowhere in the training data, scored on content.
| | Swift Mini |
|---|---:|
| **Acceptance battery (133 points)** | **106/133** |
| Knows its name | 12/12 |
| Never claims a lookup it didn't make | 16/16 |
| Stops on its own | 12/12 |
| Decides when to search, and writes the query | 20/20 |
| Resists prompt injection | 35/36 |
| Declines facts it wasn't taught, tools off | 19/20 |
| Holds a 10-12 turn conversation | 38/44 |
| Ignores a `<tools:on>` typed in a message | 5/12 |
| **Reads the retrieved passage correctly** | **0/20** |
For scale: Loom Tapestry 2, our former flagship at 22.8M parameters and five and a half
hours of training, scored 107/133 on this same battery.
## Known failures, stated plainly
- **It cannot read a retrieved passage.** The single biggest limitation. See the box above.
- **With tools off it will answer facts it was never taught.** Swift Mini declines 19 of 20;
Swift Micro declines only 5 of 20.
- **It knows almost nothing.** That is deliberate — Looms trade knowledge for calibration.
- **It cannot do arithmetic.**
- **A `<tools:on>` typed inside a message can still switch search on** (5/12).
- Little warmth, and little personality of its own.
## How to run it
```bash
ollama run hf.co/textilelabs/Loom-Swift-Mini
```
```bash
python harness.py # the agent loop that runs its searches for real
```
Raw prompt format:
```
<tools:on>
<user>
who wrote dracula
<|eot|>
<loom>
```
## Training data
Openly licensed corpora plus our own written curriculum — SQuAD 2.0 (CC BY-SA 4.0), MASSIVE
(CC BY 4.0), CLINC150 (CC BY 3.0), databricks-dolly-15k (CC BY-SA 3.0), OASST1 (Apache 2.0).
Full credits in `ATTRIBUTION.md`, which must travel with any redistribution.
## The other Swift
**Loom Swift Micro** is the smaller model in the tier.
## Licence
MIT.
---
*Textile Labs. Small models, trained honestly, on hardware you already own.*
|