textilelabs commited on
Commit
ae82c2c
Β·
verified Β·
1 Parent(s): b4db95e

Upload 14 files

Browse files
.gitattributes CHANGED
@@ -33,3 +33,7 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ banner.jpg filter=lfs diff=lfs merge=lfs -text
37
+ logo.jpg filter=lfs diff=lfs merge=lfs -text
38
+ loom-weave-2-f16.gguf filter=lfs diff=lfs merge=lfs -text
39
+ loom-weave-2-q8_0.gguf filter=lfs diff=lfs merge=lfs -text
LICENSE ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Textile Labs
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
Loom-Weave-2/config.json ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "LlamaForCausalLM"
4
+ ],
5
+ "attention_bias": false,
6
+ "attention_dropout": 0.0,
7
+ "bos_token_id": null,
8
+ "dtype": "float32",
9
+ "eos_token_id": 0,
10
+ "head_dim": 64,
11
+ "hidden_act": "silu",
12
+ "hidden_size": 640,
13
+ "initializer_range": 0.02,
14
+ "intermediate_size": 2048,
15
+ "max_position_embeddings": 2048,
16
+ "mlp_bias": false,
17
+ "model_type": "llama",
18
+ "num_attention_heads": 10,
19
+ "num_hidden_layers": 10,
20
+ "num_key_value_heads": 2,
21
+ "pad_token_id": 0,
22
+ "pretraining_tp": 1,
23
+ "rms_norm_eps": 1e-05,
24
+ "rope_parameters": {
25
+ "rope_theta": 10000.0,
26
+ "rope_type": "default"
27
+ },
28
+ "tie_word_embeddings": true,
29
+ "transformers_version": "5.0.0",
30
+ "use_cache": false,
31
+ "vocab_size": 16384
32
+ }
Loom-Weave-2/generation_config.json ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "eos_token_id": 0,
4
+ "output_attentions": false,
5
+ "output_hidden_states": false,
6
+ "pad_token_id": 0,
7
+ "transformers_version": "5.0.0",
8
+ "use_cache": false
9
+ }
Loom-Weave-2/model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c79c663642572f33d1d2ad8833407fb55af46d86e08a334bc11849240968ab0f
3
+ size 238614960
Loom-Weave-2/tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
Loom-Weave-2/tokenizer_config.json ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "backend": "tokenizers",
3
+ "eos_token": "<|endoftext|>",
4
+ "extra_special_tokens": [
5
+ "<user>",
6
+ "<loom>"
7
+ ],
8
+ "model_max_length": 1000000000000000019884624838656,
9
+ "pad_token": "<|endoftext|>",
10
+ "tokenizer_class": "TokenizersBackend"
11
+ }
Modelfile ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ FROM ./loom-weave-2-q8_0.gguf
2
+ TEMPLATE """<user> {{ .Prompt }}
3
+ <loom>"""
4
+ PARAMETER stop "<|endoftext|>"
5
+ PARAMETER stop "<user>"
6
+ PARAMETER temperature 0.8
7
+ PARAMETER top_k 50
README.md CHANGED
@@ -1,3 +1,139 @@
1
  ---
2
  license: mit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: mit
3
+ language: en
4
+ library_name: transformers
5
+ pipeline_tag: text-generation
6
+ tags:
7
+ - tiny-model
8
+ - llama
9
+ - from-scratch
10
+ - tool-use
11
+ - calibrated-honesty
12
+ - humble-ai
13
+ - gguf
14
+ widget:
15
+ - text: "<user> who are you\n<loom>"
16
+ example_title: "Identity"
17
+ - text: "<user> what time is it in berlin\n<loom>"
18
+ example_title: "Tool call"
19
+ - text: "<user> what's my sister's name\n<loom>"
20
+ example_title: "Calibration"
21
  ---
22
+
23
+ <div align="center">
24
+ <img src="banner.jpg" alt="Loom Weave 2" width="480">
25
+ </div>
26
+
27
+ # Loom Weave 2
28
+
29
+ <img src="logo.jpg" alt="" width="20" height="20" style="border-radius:4px;vertical-align:middle;margin-right:6px;"> **~60M parameters Β· Textile Labs**
30
+
31
+ 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.
32
+
33
+ ## Honest limitations β€” read this first
34
+
35
+ 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.
36
+
37
+ Measured on an internal probe set, out of the four things this model is trained to do:
38
+
39
+ | | measured |
40
+ |---|---|
41
+ | States its identity correctly | 93% |
42
+ | Admits it can't know something about you, rather than inventing an answer | 69% |
43
+ | Routes to the correct tool β€” phrasing close to training | 87% |
44
+ | Routes to the correct tool β€” phrasing and numbers it has never seen | 77% |
45
+ | Ends its own reply without needing a stop token | 91% |
46
+
47
+ 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.
48
+
49
+ **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.
50
+
51
+ ## The tool protocol
52
+
53
+ 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.
54
+
55
+ When it needs information it doesn't have, it replies with:
56
+
57
+ ```
58
+ <tool>NAME: query</tool>
59
+ ```
60
+
61
+ where `NAME` is one of five fixed tools:
62
+
63
+ | tool | for |
64
+ |---|---|
65
+ | `search` | general facts, current information, anything lookupable |
66
+ | `calc` | arithmetic |
67
+ | `time` | current time/date in a place |
68
+ | `doc` | a document already in context |
69
+ | `note` | saving something for later |
70
+
71
+ Your harness performs the actual lookup and continues the conversation with:
72
+
73
+ ```
74
+ <result>the answer goes here</result>
75
+ <loom>
76
+ ```
77
+
78
+ 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.
79
+
80
+ ## Prompt format
81
+
82
+ ```
83
+ <user> your message here
84
+ <loom>
85
+ ```
86
+
87
+ No trailing space after `<loom>`. Multi-turn conversations just continue the same pattern, appending each new `<user>` / `<loom>` pair.
88
+
89
+ ## Usage β€” transformers
90
+
91
+ ```python
92
+ from transformers import AutoModelForCausalLM, AutoTokenizer
93
+ import torch
94
+
95
+ tok = AutoTokenizer.from_pretrained("textilelabs/Loom-Weave-2")
96
+ model = AutoModelForCausalLM.from_pretrained("textilelabs/Loom-Weave-2")
97
+
98
+ prompt = "<user> who are you\n<loom>"
99
+ ids = tok(prompt, return_tensors="pt", add_special_tokens=False).input_ids
100
+ out = model.generate(ids, max_new_tokens=80, do_sample=True,
101
+ temperature=0.8, top_k=50, pad_token_id=tok.eos_token_id)
102
+ print(tok.decode(out[0][ids.shape[1]:], skip_special_tokens=True))
103
+ ```
104
+
105
+ ## Usage β€” Ollama
106
+
107
+ ```bash
108
+ ollama run hf.co/textilelabs/Loom-Weave-2
109
+ ```
110
+
111
+ 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**.
112
+
113
+ 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).
114
+
115
+ ## What it's for
116
+
117
+ - 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
118
+ - An **offline or embedded assistant** where the host application supplies the actual tools
119
+ - A **base for fine-tuning** β€” a small model that already has tool structure and calibrated refusal trained in, rather than a raw base
120
+
121
+ ## What it's not for
122
+
123
+ General chat, factual Q&A without tools connected, anything needing real reasoning or arithmetic it has to do itself.
124
+
125
+ ## Files
126
+
127
+ ```
128
+ config.json / model.safetensors the model (transformers format)
129
+ tokenizer.json / tokenizer_config.json custom BPE tokenizer, 16,384 tokens
130
+ generation_config.json
131
+ loom-weave-2-q8_0.gguf quantized GGUF, for Ollama / llama.cpp
132
+ loom-weave-2-f16.gguf full-precision GGUF
133
+ template / params read automatically by `ollama run hf.co/...`
134
+ Modelfile for building locally: ollama create loom-weave-2 -f Modelfile
135
+ ```
136
+
137
+ ## License
138
+
139
+ MIT. See `LICENSE`.
banner.jpg ADDED

Git LFS Details

  • SHA256: a89e32184a9d3166fedfd72a8cf42e5dee2e773b06aa893409e0b5fa80a58563
  • Pointer size: 131 Bytes
  • Size of remote file: 239 kB
logo.jpg ADDED

Git LFS Details

  • SHA256: be26d631c4f47e8697e07c98c53fadec772344ca794bd30610cab130458e28d1
  • Pointer size: 131 Bytes
  • Size of remote file: 465 kB
loom-weave-2-f16.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4d3210bf984373cc0dbcc9eeb924c73aac372cba5614e883f77458b8def1af46
3
+ size 119909056
loom-weave-2-q8_0.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1ee6d79a3930599310edb99ff5fc1fb4fd349dedf4cb3e20593f31cd0ee4d245
3
+ size 63998656
params ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ {
2
+ "stop": ["<|endoftext|>", "<user>"],
3
+ "temperature": 0.8,
4
+ "top_k": 50
5
+ }
template ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ <user> {{ .Prompt }}
2
+ <loom>