Loom-4.5-Flash / README.md
textilelabs's picture
Release Loom 4.5 Flash
f870fed verified
|
Raw History Blame Contribute Delete
8.75 kB
---
license: mit
language: en
library_name: transformers
pipeline_tag: text-generation
tags:
- tiny-model
- llama
- from-scratch
- distillation
- conversational
- tool-use
- calculator
- agent-harness
- humble-ai
- small-language-model
- muon
- gguf
- on-device
widget:
- text: "<tools:off>\n<user>\nwho are you\n<|eot|>\n<loom>\n"
example_title: "Identity"
- text: "<tools:on>\n<user>\nwhat's 15% of 1150?\n<|eot|>\n<loom>\n"
example_title: "Calls the calculator"
---
<div align="center">
<img src="banner.jpg" alt="Loom 4.5" width="520">
</div>
# Loom 4.5 Flash
<img src="logo.jpg" alt="" width="20" height="20" style="border-radius:4px;vertical-align:middle;margin-right:6px;"> **10.9M parameters · 12 layers · 2K context · 22 MB · runs on almost anything · Textile Labs**
Loom 4.5 Flash is the smallest Loom 4.5, and the better talker of the two small ones. It is its own model, not a cut of the parent: trained from scratch (random weights) in 71 minutes on
2 × T4, learning from the frozen [Loom Crucible 4.5](https://huggingface.co/textilelabs/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](https://huggingface.co/textilelabs/Loom-Crucible-4.5) | 130M | 32 | 81 MB (Q4) |
| [Loom Tapestry 4.5](https://huggingface.co/textilelabs/Loom-Tapestry-4.5) | 100M | 24 | 62 MB (Q4) |
| [Loom Weave 4.5](https://huggingface.co/textilelabs/Loom-Weave-4.5) | 69M | 16 | 44 MB (Q4) |
| [Loom Spark 4.5 XL](https://huggingface.co/textilelabs/Loom-Spark-4.5-XL) | 54M | 12 | 35 MB (Q4) |
| [Loom Spark 4.5](https://huggingface.co/textilelabs/Loom-Spark-4.5) | 39M | 8 | 26 MB (Q4) |
| [Loom Spark 4.5 XS](https://huggingface.co/textilelabs/Loom-Spark-4.5-XS) | 17.8M | 18 | 36 MB (f16) |
| [Loom 4.5 Flash](https://huggingface.co/textilelabs/Loom-4.5-Flash) | 10.9M | 12 | 22 MB (f16) |
## Real replies
From the released weights, greedy, repeat penalty 1.0:
| you | Loom 4.5 Flash |
|---|---|
| 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, The team the meeting has moved to Friday. See you there. Thanks |
| where is England? *(tools on)* | `<lookup>where is england</lookup>` |
| what's my dog called? | I don't know that about you. |
| Who R u | I'm Loom 4.5 Flash, 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 4.5 Flash** | Loom Spark 4.5 XS |
|---|---:|---:|
| acceptance battery (old, 133 questions) | 118/133 | 114/133 |
| everyday checks from real use (12 conversations) | 12/12 | 9/12 |
| calculator through the harness (40 held-out) | 33/40 | 39/40 |
| reading a short text (2 / 5 / 12 / 45 sentences) | 18% / 45% / 32% / 2% | 60% / 55% / 58% / 8% |
| reading natural text (60 questions) | 9/60 | 8/60 |
| uses what you told it over what it "knows" | 18/30 | 17/30 |
| A · says its own name | 12/12 | 12/12 |
| B · its own name under rough typing | **11/12** | 10/12 |
| C · 5-turn conversation stays on thread | **5/5** | 4/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 | 3/5 | **4/5** |
| G · **never** claims a lookup it didn't make | 16/16 | 16/16 |
| H · admits what it can't know about you | **8/8** | 7/8 |
| I · says when a result doesn't contain the answer | 1/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, not for your private things | **19/20** | 16/20 |
Its predecessor in size, Loom Tapestry 3 Flash (7.2M), scored 112/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 4.5 Flash** | **10.9M** | **118†** | **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 4.5 Flash and Loom Spark 4.5 XS 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.
- **Reading is its weak spot.** It answers from a short pasted text 18% / 45% / 32% / 2% of the time (2/5/12/45 sentences); [Loom Spark 4.5 XS](https://huggingface.co/textilelabs/Loom-Spark-4.5-XS) reads much better.
- **Tool menus and made-up rules: near zero.**
- **Longer writing can loop.** An apology email repeated a phrase; keep requests short.
- **It rarely says when a search result doesn't hold the answer** (1/5). Check the quote.
- **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-4.5-flash-f16.gguf` (22 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)
```bash
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
```bash
ollama run hf.co/textilelabs/Loom-4.5-Flash "who are you"
llama-cli -m loom-4.5-flash-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
```python
from transformers import AutoTokenizer, AutoModelForCausalLM
tok = AutoTokenizer.from_pretrained("textilelabs/Loom-4.5-Flash")
model = AutoModelForCausalLM.from_pretrained("textilelabs/Loom-4.5-Flash").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: 12 layers × 256, FFN 512, GQA 4 heads / 1 KV, RoPE, tied embeddings |
| parameters | 10,885,376 |
| vocabulary | 16,384 BPE, single digits (same tokenizer as every Loom 4.5) |
| training | from scratch, 71 min on 2 × T4, 128M tokens (11.8 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-4.5-flash-f16.gguf GGUF (22 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.