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") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# 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
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 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/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 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
- 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
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
ollama run hf.co/textilelabs/Loom-Swift-Mini
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.
- Downloads last month
- 622
