Instructions to use textilelabs/Loom-Spark-4.5-XS with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use textilelabs/Loom-Spark-4.5-XS with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="textilelabs/Loom-Spark-4.5-XS") 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-Spark-4.5-XS") model = AutoModelForCausalLM.from_pretrained("textilelabs/Loom-Spark-4.5-XS", 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-Spark-4.5-XS 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-Spark-4.5-XS:F16 # Run inference directly in the terminal: llama cli -hf textilelabs/Loom-Spark-4.5-XS:F16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf textilelabs/Loom-Spark-4.5-XS:F16 # Run inference directly in the terminal: llama cli -hf textilelabs/Loom-Spark-4.5-XS: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-Spark-4.5-XS:F16 # Run inference directly in the terminal: ./build/bin/llama cli -hf textilelabs/Loom-Spark-4.5-XS:F16
Use Docker
docker model run hf.co/textilelabs/Loom-Spark-4.5-XS:F16
- Llama new
- LM Studio
- Jan
- vLLM
How to use textilelabs/Loom-Spark-4.5-XS with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "textilelabs/Loom-Spark-4.5-XS" # 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-Spark-4.5-XS", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/textilelabs/Loom-Spark-4.5-XS:F16
- SGLang
How to use textilelabs/Loom-Spark-4.5-XS 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-Spark-4.5-XS" \ --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-Spark-4.5-XS", "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-Spark-4.5-XS" \ --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-Spark-4.5-XS", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use textilelabs/Loom-Spark-4.5-XS with Ollama:
ollama run hf.co/textilelabs/Loom-Spark-4.5-XS:F16
- Unsloth Desktop
- Pi
How to use textilelabs/Loom-Spark-4.5-XS 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-Spark-4.5-XS: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-Spark-4.5-XS:F16" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use textilelabs/Loom-Spark-4.5-XS with Docker Model Runner:
docker model run hf.co/textilelabs/Loom-Spark-4.5-XS:F16
- Lemonade
How to use textilelabs/Loom-Spark-4.5-XS with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull textilelabs/Loom-Spark-4.5-XS:F16
Run and chat with the model
lemonade run user.Loom-Spark-4.5-XS-F16
List all available models
lemonade list
- Hermes Agent
How to use textilelabs/Loom-Spark-4.5-XS 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-Spark-4.5-XS: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-Spark-4.5-XS:F16
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use textilelabs/Loom-Spark-4.5-XS 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-Spark-4.5-XS: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-Spark-4.5-XS: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"
Loom Spark 4.5 XS
17.8M parameters Β· 18 layers Β· 2K context Β· 36 MB Β· runs on almost anything Β· Textile Labs
Loom Spark 4.5 XS is the better reader of the two small Loom 4.5 models. It is its own model, not a cut of the parent: trained from scratch (random weights) in 89 minutes on 2 Γ T4, learning from the frozen Loom Crucible 4.5 as a teacher and from the family's training data. It works sums out with a calculator, looks things up when tools are on, knows what it can't know about you, and remembers your name across the conversation.
The Loom 4.5 family:
| model | params | layers | file |
|---|---|---|---|
| Loom Crucible 4.5 | 130M | 32 | 81 MB (Q4) |
| Loom Tapestry 4.5 | 100M | 24 | 62 MB (Q4) |
| Loom Weave 4.5 | 69M | 16 | 44 MB (Q4) |
| Loom Spark 4.5 XL | 54M | 12 | 35 MB (Q4) |
| Loom Spark 4.5 | 39M | 8 | 26 MB (Q4) |
| Loom Spark 4.5 XS | 17.8M | 18 | 36 MB (f16) |
| Loom 4.5 Flash | 10.9M | 12 | 22 MB (f16) |
Real replies
From the released weights, greedy, repeat penalty 1.0:
| you | Loom Spark 4.5 XS |
|---|---|
| my name is Tavi β¦ what is my name? | You said your name is Tavi. |
| what is 2+2 (tools on) | <tool>calc 2 + 2</tool> |
| write a short email telling the team the meeting moved to Friday | Hi all, Quick update: the meeting has moved to Friday. Everything else stays the same. Best wishes |
| where is England? (tools on) | <lookup>carmland</lookup> |
| what's my dog called? | I don't know that about you. |
| Who R u | I'm Loom Spark 4.5 XS, a small model by Textile Labs. |
The two small ones, side by side
Same prompts, same scripts, same settings. Each does things the other can't.
| Loom Spark 4.5 XS | Loom 4.5 Flash | |
|---|---|---|
| acceptance battery (old, 133 questions) | 114/133 | 118/133 |
| everyday checks from real use (12 conversations) | 9/12 | 12/12 |
| calculator through the harness (40 held-out) | 39/40 | 33/40 |
| reading a short text (2 / 5 / 12 / 45 sentences) | 60% / 55% / 58% / 8% | 18% / 45% / 32% / 2% |
| reading natural text (60 questions) | 8/60 | 9/60 |
| uses what you told it over what it "knows" | 17/30 | 18/30 |
| A Β· says its own name | 12/12 | 12/12 |
| B Β· its own name under rough typing | 10/12 | 11/12 |
| C Β· 5-turn conversation stays on thread | 4/5 | 5/5 |
| D Β· answers from a search result | 3/5 | 3/5 |
| E Β· follow-up answered from the same result | 0/5 | 0/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 | 2/5 | 1/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, not for your private things | 16/20 | 19/20 |
Its predecessor in size, Loom Spark 3 (12.2M), scored 120/133 on the same battery.
Every Loom text model
| model | params | battery /133 | reads real prose | runs in phone apps |
|---|---|---|---|---|
| Loom Tapestry 3 Flash | 7.2M | 112 | curated only | no |
| Loom Spark 3 | 12.2M | 120 | curated only | no |
| Loom Spark 3.2 | 22.8M | 122β | curated only | no |
| Loom Weave 4 | 55.6M | 127β | yes | yes |
| Loom Crucible 4.5 | 130M | 123β | yes, quotes its source | yes |
| Loom Spark 4.5 XS | 17.8M | 114β | short texts | yes |
β scored on a battery with every test prompt scrubbed from training. Earlier rows are each model's release score. Never compare scores from different command lines. Loom Spark 4.5 XS and Loom 4.5 Flash are the last Looms scored on this battery; later Looms use a new, harder exam.
Read this before you use it
Every point here was measured.
- It is below the bar we set for it before training. 114/133 on our old acceptance battery, against a bar of 118 (Loom Spark 3: 120). We release it anyway because it is the better reader of the two small Loom 4.5 models; if you want the better talker, use Loom 4.5 Flash.
- Tool menus and made-up rules: near zero. It rarely picks the right tool from a menu (0/20 on the old menu test).
- It sometimes guesses when a search result doesn't hold the answer ("212 degrees fahrenheit" for mercury's boiling point). Check the quote.
- It sometimes searches for things only you can know ("where did I go to school"). The harness shows what it searched.
- With tools off it gets simple sums wrong ("2 + 2 = 2"). With tools on it calls the calculator correctly (39/40).
- Live search was not measured for this release (the two bigger-family numbers are on their own cards).
- No world knowledge to speak of. With tools off it declines most fact questions, by design. Turn tools on.
- Calculator, lookups and menus need the harness: the model writes the tag and stops.
Usage β chat apps (PocketPal, LM Studio, Jan)
Download loom-spark-4.5-xs-f16.gguf (36 MB) and load it. The chat template and the stop token are inside the file. Set repeat penalty 1.0.
It ships as one full-precision file: at this size, quantising saves little and costs quality.
Usage β the harness (search, calculator, tool menus, chat memory)
python3 harness.py "whats the capital of peru"
python3 harness.py "what's 15% of 1150" # the calculator
python3 harness.py --show "who wrote hamlet" # see what it searched and read
python3 harness.py # chat: it remembers the conversation; /new to start over
Stdlib only; Wikipedia needs no key. 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-Spark-4.5-XS "who are you"
llama-cli -m loom-spark-4.5-xs-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
from transformers import AutoTokenizer, AutoModelForCausalLM
tok = AutoTokenizer.from_pretrained("textilelabs/Loom-Spark-4.5-XS")
model = AutoModelForCausalLM.from_pretrained("textilelabs/Loom-Spark-4.5-XS").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=160, do_sample=False)
print(tok.decode(out[0][ids.shape[1]:], skip_special_tokens=True))
Raw format: <tools:off>\n<user>\n{message}\n<|eot|>\n<loom>\n (or <tools:on> to allow search and the calculator).
How it was built
| architecture | Llama: 18 layers Γ 256, FFN 768, GQA 4 heads / 1 KV, RoPE, tied embeddings |
| parameters | 17,769,728 |
| vocabulary | 16,384 BPE, single digits (same tokenizer as every Loom 4.5) |
| training | from scratch, 89 min on 2 Γ T4, 140M tokens (7.9 per parameter); 1K context then 2K |
| teacher | the frozen, released Loom Crucible 4.5 (KL to its predictions) plus the family's data and its own name; the parent's name is never a training target |
| optimiser | Muon on hidden matrices, AdamW on embeddings and norms; per-conversation attention masking |
| hardware | Kaggle, 2 Γ NVIDIA T4 |
Files
model.safetensors / config.json the model (transformers)
tokenizer.json / tokenizer_config.json tokenizer + chat template
loom-spark-4.5-xs-f16.gguf GGUF (36 MB)
template / params / Modelfile Ollama
harness.py search + calculator + tool menus + chat memory, stdlib only
banner.jpg / logo.jpg / launch.gif images (shared by the whole Loom 4.5 family)
ATTRIBUTION.md required credits for the training data
License
Model: MIT. Training data keeps its original licences, see ATTRIBUTION.md.
- Downloads last month
- -