cutterdalton-webai commited on
Commit
c7f02f3
·
verified ·
1 Parent(s): f96f8c2

Update model card for TwIL-LM2 on main

Browse files

Drop obsolete TwIL-LM2 revision pins and the How it was built section; point the prior release at TwIL-LM1.

Files changed (1) hide show
  1. README.md +12 -26
README.md CHANGED
@@ -89,9 +89,9 @@ import torch
89
  from transformers import AutoModelForCausalLM, AutoTokenizer
90
 
91
  model_id = "webAI-Official/TwIL-LM"
92
- tok = AutoTokenizer.from_pretrained(model_id, revision="TwIL-LM2")
93
  model = AutoModelForCausalLM.from_pretrained(
94
- model_id, revision="TwIL-LM2", torch_dtype=torch.bfloat16, device_map="auto"
95
  )
96
 
97
  messages = [{"role": "user", "content":
@@ -114,22 +114,6 @@ The model was trained and evaluated with **greedy decoding** (`do_sample=False`)
114
  answering, so give it room — the reported numbers assume at least 2048 new tokens, and a shorter
115
  budget truncates reasoning and scores far worse.
116
 
117
- ## How it was built
118
-
119
- Four stages on top of the base model:
120
-
121
- 1. **LoRA supervised fine-tuning** on a synthetic formal-logic corpus covering the Track A
122
- objectives (first-order-logic translation, entailment labelling, semantic parsing, Lean
123
- formalisation and critique, procedural reasoning, rule induction).
124
- 2. **Checkpoint fusion** — parameter-space averaging of intermediate SFT checkpoints selected
125
- by a diversity probe, rather than taking the final checkpoint.
126
- 3. **WiSE-FT interpolation** toward the pretrained base, `W = (1 − λ)·W_base + λ·W_finetuned`
127
- with **λ = 0.75**. λ was chosen by constrained optimisation: maximise in-domain score
128
- subject to minimal degradation on held-out benchmarks.
129
- 4. **MGPO** — entropy-weighted GRPO reinforcement learning against a programmatic verifier,
130
- with partial credit for loose matches and token-F1 so that all-fail prompt groups still
131
- produce gradient. Published checkpoint is **step 1680**.
132
-
133
  ## Limitations and caveats
134
 
135
  **Truncation.** At a 2048-token budget, 6.9% of Track A generations hit the cap (down from
@@ -163,22 +147,24 @@ model. See the accompanying `SDFT_RESULT.md` in the project repository.
163
  Track B that were pure decoding artefact; the decoding kwargs are hashed into the protocol
164
  identity so a mismatched runner fails loudly instead of quietly producing a different number.
165
 
166
- ## Relationship to the `main` branch
 
 
 
 
167
 
168
- The `main` branch of this repository holds the original TwIL-LM release: a PEFT **LoRA adapter**
169
- (plus GGUF builds) for the supervised fine-tuning stage only. This branch holds a **full merged
170
- model** from a later point in the pipeline — after fusion, WiSE-FT interpolation and MGPO
171
- reinforcement learning — so it is loaded directly with `AutoModelForCausalLM`, with no adapter
172
- and no base checkpoint required.
173
 
174
  The two are scored on different protocols and their headline numbers are not directly
175
- comparable: `main` reports a macro-*primary* average, while this card reports the five-component
176
  macro *gate* described above.
177
 
178
  ## License and attribution
179
 
180
  Released under the **webAI Non-Commercial License ver. 1.0** — see `LICENSE.md` in this
181
- repository. This matches the licensing of the `main` branch.
182
 
183
  The base model,
184
  [`HuggingFaceTB/SmolLM2-1.7B-Instruct`](https://huggingface.co/HuggingFaceTB/SmolLM2-1.7B-Instruct),
 
89
  from transformers import AutoModelForCausalLM, AutoTokenizer
90
 
91
  model_id = "webAI-Official/TwIL-LM"
92
+ tok = AutoTokenizer.from_pretrained(model_id)
93
  model = AutoModelForCausalLM.from_pretrained(
94
+ model_id, torch_dtype=torch.bfloat16, device_map="auto"
95
  )
96
 
97
  messages = [{"role": "user", "content":
 
114
  answering, so give it room — the reported numbers assume at least 2048 new tokens, and a shorter
115
  budget truncates reasoning and scores far worse.
116
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
117
  ## Limitations and caveats
118
 
119
  **Truncation.** At a 2048-token budget, 6.9% of Track A generations hit the cap (down from
 
147
  Track B that were pure decoding artefact; the decoding kwargs are hashed into the protocol
148
  identity so a mismatched runner fails loudly instead of quietly producing a different number.
149
 
150
+ ## Relationship to prior releases
151
+
152
+ `main` holds **TwIL-LM2**: a **full merged model** from later in the pipeline — after fusion,
153
+ WiSE-FT interpolation and MGPO reinforcement learning — so it is loaded directly with
154
+ `AutoModelForCausalLM`, with no adapter and no base checkpoint required.
155
 
156
+ The original TwIL-LM (v1) release a PEFT **LoRA adapter** plus GGUF builds for the supervised
157
+ fine-tuning stage only is archived on the [`TwIL-LM1`](https://huggingface.co/webAI-Official/TwIL-LM/tree/TwIL-LM1)
158
+ branch (and matching tag). Load it with `revision="TwIL-LM1"`.
 
 
159
 
160
  The two are scored on different protocols and their headline numbers are not directly
161
+ comparable: v1 reports a macro-*primary* average, while this card reports the five-component
162
  macro *gate* described above.
163
 
164
  ## License and attribution
165
 
166
  Released under the **webAI Non-Commercial License ver. 1.0** — see `LICENSE.md` in this
167
+ repository.
168
 
169
  The base model,
170
  [`HuggingFaceTB/SmolLM2-1.7B-Instruct`](https://huggingface.co/HuggingFaceTB/SmolLM2-1.7B-Instruct),