LFM2.5-350M with a gated form-type edit
This is an experimental, weight-edited derivative of LiquidAI/LFM2.5-350M. Four existing units in the final feed-forward block were repurposed to improve canonical insurance claim-form type selection. The edit adds no parameters and does not change the model architecture or tokenizer.
Intended use and limitations
Research artifact for studying localized weight-space programming on structured extraction. The evaluation covers insurance document text, not general-purpose extraction, OCR, or all document layouts. Do not assume that the improvement transfers to other schemas or tasks.
The model remains weak at JSON schema compliance, required keys, dates, missing-field handling, and general extraction. The edit targets form_type; it is not a general reliability or accuracy fix. Review model outputs before using them in operational settings.
Reported evaluation
The author reports the following project-local results on FieldBench using greedy BF16 inference:
| Metric | Original model | Edited model |
|---|---|---|
| Development test form-type errors (61 claim forms) | 61/61 | 27/61 |
| Held-out form-type errors (30 claim forms) | 30/30 | 15/30 |
| Field F1, all 200 development cases | 0.2786 | 0.3102 |
| Field F1, 49 held-out cases | 0.3547 | 0.3883 |
| Unrelated exact-match controls | 70/100 | 69/100 |
| Array row F1 | 0.5893 | 0.5893 |
| Null-array accuracy | 0/10 | 0/10 |
| Held-out schema-valid rate | 4.1% | 4.1% |
These are results from the project scorer, not FieldBench leaderboard scores. The held-out set is small, and five candidate edits were evaluated before it was opened, which weakens the confirmatory strength of the result. The one-answer drop on unrelated controls is exactly at the predeclared 1 percentage-point limit. See the linked full record for candidate history, methods, and caveats.
Weight edit
The edit repurposes existing units 34, 235, 4572, and 2265 in model.layers.15.feed_forward:
- corresponding rows in
w1.weightprovide a decision-position gate; - corresponding rows in
w3.weightread out the four canonical form types; - corresponding columns in
w2.weightwrite the selected label direction to the residual stream.
The edit manifest is in WSP_EDIT.json. It records the base and edited parameter hashes. The original model is LiquidAI/LFM2.5-350M at revision 9921cd4d82c0e3986887aa4b376f9446729ef8a3. The upstream LFM Open License v1.0 is included as LICENSE; users must follow its terms, including the commercial-use limitation.
Load with Transformers
from transformers import AutoModelForCausalLM, AutoTokenizer
repo_id = "Moogiwara/lfm2.5-350m-wsp-form-type"
tokenizer = AutoTokenizer.from_pretrained(repo_id)
model = AutoModelForCausalLM.from_pretrained(repo_id)
The published checkpoint is BF16 and requires a compatible Transformers version and runtime. The project used Transformers 5.22.2 and PyTorch 2.7.1+cu128 for evaluation.
Reproducibility
Code, evaluation protocol, edit rationale, controls, and detailed results: love-droid/wsp-semantic-mapper, especially docs/wsp-full-record.md and docs/wsp-results-summary.md. Predictions, source datasets, and experiment directories are not included in this model repository.
Citation and attribution
Base model: Liquid AI, LFM2.5-350M. This repository redistributes an edited checkpoint; it is not an official Liquid AI model release.