Text Generation
Transformers
Safetensors
GGUF
English
llama
tiny-model
from-scratch
distillation
conversational
tool-use
calculator
agent-harness
humble-ai
small-language-model
muon
on-device
text-generation-inference
Instructions to use textilelabs/Loom-4.5-Flash with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use textilelabs/Loom-4.5-Flash with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="textilelabs/Loom-4.5-Flash") 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-4.5-Flash") model = AutoModelForCausalLM.from_pretrained("textilelabs/Loom-4.5-Flash", 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-4.5-Flash 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-4.5-Flash:F16 # Run inference directly in the terminal: llama cli -hf textilelabs/Loom-4.5-Flash:F16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf textilelabs/Loom-4.5-Flash:F16 # Run inference directly in the terminal: llama cli -hf textilelabs/Loom-4.5-Flash: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-4.5-Flash:F16 # Run inference directly in the terminal: ./build/bin/llama cli -hf textilelabs/Loom-4.5-Flash:F16
Use Docker
docker model run hf.co/textilelabs/Loom-4.5-Flash:F16
- Llama new
- LM Studio
- Jan
- vLLM
How to use textilelabs/Loom-4.5-Flash with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "textilelabs/Loom-4.5-Flash" # 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-4.5-Flash", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/textilelabs/Loom-4.5-Flash:F16
- SGLang
How to use textilelabs/Loom-4.5-Flash 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-4.5-Flash" \ --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-4.5-Flash", "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-4.5-Flash" \ --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-4.5-Flash", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use textilelabs/Loom-4.5-Flash with Ollama:
ollama run hf.co/textilelabs/Loom-4.5-Flash:F16
- Unsloth Desktop
- Pi
How to use textilelabs/Loom-4.5-Flash 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-4.5-Flash: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-4.5-Flash:F16" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use textilelabs/Loom-4.5-Flash with Docker Model Runner:
docker model run hf.co/textilelabs/Loom-4.5-Flash:F16
- Lemonade
How to use textilelabs/Loom-4.5-Flash with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull textilelabs/Loom-4.5-Flash:F16
Run and chat with the model
lemonade run user.Loom-4.5-Flash-F16
List all available models
lemonade list
- Hermes Agent
How to use textilelabs/Loom-4.5-Flash 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-4.5-Flash: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-4.5-Flash:F16
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use textilelabs/Loom-4.5-Flash 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-4.5-Flash: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-4.5-Flash: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"
|
Download README.md from textilelabs/Loom-4.5-Flash: direct link, hf CLI and curl.
- Browser
- Download file 8.75 kB
-
https://huggingface.co/textilelabs/Loom-4.5-Flash/resolve/main/README.md
- Command line
-
hf download hf://textilelabs/Loom-4.5-Flash/README.md
-
curl -L -o README.md https://huggingface.co/textilelabs/Loom-4.5-Flash/resolve/main/README.md
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. | |