Instructions to use textilelabs/Loom-Weave-2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use textilelabs/Loom-Weave-2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="textilelabs/Loom-Weave-2")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("textilelabs/Loom-Weave-2", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use textilelabs/Loom-Weave-2 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-Weave-2:F16 # Run inference directly in the terminal: llama cli -hf textilelabs/Loom-Weave-2:F16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf textilelabs/Loom-Weave-2:F16 # Run inference directly in the terminal: llama cli -hf textilelabs/Loom-Weave-2: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-Weave-2:F16 # Run inference directly in the terminal: ./llama-cli -hf textilelabs/Loom-Weave-2: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-Weave-2:F16 # Run inference directly in the terminal: ./build/bin/llama-cli -hf textilelabs/Loom-Weave-2:F16
Use Docker
docker model run hf.co/textilelabs/Loom-Weave-2:F16
- LM Studio
- Jan
- vLLM
How to use textilelabs/Loom-Weave-2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "textilelabs/Loom-Weave-2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "textilelabs/Loom-Weave-2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/textilelabs/Loom-Weave-2:F16
- SGLang
How to use textilelabs/Loom-Weave-2 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-Weave-2" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "textilelabs/Loom-Weave-2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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-Weave-2" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "textilelabs/Loom-Weave-2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Ollama
How to use textilelabs/Loom-Weave-2 with Ollama:
ollama run hf.co/textilelabs/Loom-Weave-2:F16
- Unsloth Desktop
- Docker Model Runner
How to use textilelabs/Loom-Weave-2 with Docker Model Runner:
docker model run hf.co/textilelabs/Loom-Weave-2:F16
- Lemonade
How to use textilelabs/Loom-Weave-2 with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull textilelabs/Loom-Weave-2:F16
Run and chat with the model
lemonade run user.Loom-Weave-2-F16
List all available models
lemonade list
- Atomic Chat
Loom Weave 2
~60M parameters Β· Textile Labs
A small model built on a simple bet: at this size, honesty and judgment are more achievable than broad knowledge β and more useful than a model that guesses confidently. Loom Weave 2 doesn't know much. It knows what it doesn't know, and it knows when to reach for a tool instead of inventing an answer.
Honest limitations β read this first
This is a ~60M parameter model. It does not have broad world knowledge, cannot do multi-step reasoning, cannot reliably do arithmetic itself (it routes arithmetic to a calculator tool instead β see below), and will get plain factual questions wrong if no tool is available to check them.
Measured on an internal probe set, out of the four things this model is trained to do:
| measured | |
|---|---|
| States its identity correctly | 93% |
| Admits it can't know something about you, rather than inventing an answer | 69% |
| Routes to the correct tool β phrasing close to training | 87% |
| Routes to the correct tool β phrasing and numbers it has never seen | 77% |
| Ends its own reply without needing a stop token | 91% |
Read the calibration number carefully: it still invents an answer to unanswerable personal questions roughly 3 times in 10. It is meaningfully better at this than guessing, not solved.
Important β this model is a tool selector, not a tool executor. The routing numbers above measure whether it picks the right tool (search vs calc vs time, etc.) β they do not measure whether the query it writes inside the tag is accurate. In particular, the calc tool sometimes rewrites the numbers you gave it rather than preserving them exactly. Your harness should re-derive the tool's arguments from the original user message, not trust the text the model puts inside <tool>...</tool>. Picking the right tool for the job is the reliable part; extracting exact arguments is not.
The tool protocol
Loom Weave 2 doesn't call tools directly β it emits a request, and whatever runs it (your code) is responsible for actually performing the lookup and continuing the conversation.
When it needs information it doesn't have, it replies with:
<tool>NAME: query</tool>
where NAME is one of five fixed tools:
| tool | for |
|---|---|
search |
general facts, current information, anything lookupable |
calc |
arithmetic |
time |
current time/date in a place |
doc |
a document already in context |
note |
saving something for later |
Your harness performs the actual lookup and continues the conversation with:
<result>the answer goes here</result>
<loom>
so the model can read the result and reply from it. Without a harness wired up, the model will still emit the tool call β it just won't get an answer back.
Prompt format
<user> your message here
<loom>
No trailing space after <loom>. Multi-turn conversations just continue the same pattern, appending each new <user> / <loom> pair.
Usage β transformers
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
tok = AutoTokenizer.from_pretrained("textilelabs/Loom-Weave-2")
model = AutoModelForCausalLM.from_pretrained("textilelabs/Loom-Weave-2")
prompt = "<user> who are you\n<loom>"
ids = tok(prompt, return_tensors="pt", add_special_tokens=False).input_ids
out = model.generate(ids, max_new_tokens=80, do_sample=True,
temperature=0.8, top_k=50, pad_token_id=tok.eos_token_id)
print(tok.decode(out[0][ids.shape[1]:], skip_special_tokens=True))
Usage β Ollama
ollama run hf.co/textilelabs/Loom-Weave-2
That pulls the GGUF straight from this repo. Ollama applies the template and params files also included in this repo β no local setup needed. For raw-mode / API use (POST /api/generate with "raw": true), format the prompt yourself exactly as shown above in Prompt format.
Two GGUF files are provided: loom-weave-2-q8_0.gguf (64MB, quantized, recommended for everyday use) and loom-weave-2-f16.gguf (120MB, full precision).
What it's for
- A tool router in front of a larger model β cheap, instant, and correctly picks search/calc/time/doc/note without needing an API call itself
- An offline or embedded assistant where the host application supplies the actual tools
- A base for fine-tuning β a small model that already has tool structure and calibrated refusal trained in, rather than a raw base
What it's not for
General chat, factual Q&A without tools connected, anything needing real reasoning or arithmetic it has to do itself.
Files
config.json / model.safetensors the model (transformers format)
tokenizer.json / tokenizer_config.json custom BPE tokenizer, 16,384 tokens
generation_config.json
loom-weave-2-q8_0.gguf quantized GGUF, for Ollama / llama.cpp
loom-weave-2-f16.gguf full-precision GGUF
template / params read automatically by `ollama run hf.co/...`
Modelfile for building locally: ollama create loom-weave-2 -f Modelfile
License
MIT. See LICENSE.
- Downloads last month
- -
8-bit
16-bit