--- license: mit language: en library_name: transformers pipeline_tag: text-generation tags: - tiny-model - llama - from-scratch - tool-use - calibrated-honesty - humble-ai - gguf widget: - text: " who are you\n" example_title: "Identity" - text: " what time is it in berlin\n" example_title: "Tool call" - text: " what's my sister's name\n" example_title: "Calibration" ---
Loom Weave 2
# 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 `...`.** 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: ``` NAME: query ``` 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: ``` the answer goes here ``` 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 ``` your message here ``` No trailing space after ``. Multi-turn conversations just continue the same pattern, appending each new `` / `` pair. ## Usage — transformers ```python from transformers import AutoModelForCausalLM, AutoTokenizer import torch tok = AutoTokenizer.from_pretrained("textilelabs/Loom-Weave-2") model = AutoModelForCausalLM.from_pretrained("textilelabs/Loom-Weave-2") prompt = " who are you\n" 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 ```bash 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`.