Instructions to use mohit67890/matchev-4b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use mohit67890/matchev-4b with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3.5-4B") model = PeftModel.from_pretrained(base_model, "mohit67890/matchev-4b") - Notebooks
- Google Colab
- Kaggle
Match and reconcile records at volume.
A small, fast model that works out which records belong together, and explains every difference between them.
Exact code finds the candidates, does the arithmetic and checks every rule; this adapter judges only what code can't,
in one forward pass per record, with a calibrated p.
matchev-4b is the learned layer of Matchev, one model in five layers
Code and results · Use cases ·
Results · Quickstart




What sets it apart


- Sets in, groups out. Whole record sets in one request (tested to 136,500 records); groups, typed explanations of every difference, and leftovers with a reason come back, not a similarity score per pair.
- Guarantees, checked by code. Totals balance, no record is used twice, confirmed groups stay and rejected pairs never return. A response that breaks one is never sent.
- Small and cheap to run. About $0.09 per 1,000 questions on rented GPUs before any batching; code settles about a quarter of generated payments with no model call at all.
What this is
A LoRA adapter (rank 16, alpha 32) for Qwen/Qwen3.5-4B at revision
851bf6e806efd8d0a36b00ddf55e13ccb7b8cd0a, plus calibration.json (one temperature, 1.3133, fitted at one forward pass on
held-out training questions). It reads one question at a time: a record, and up to 23 options built by Matchev's exact layers
(candidate records, or candidate payment groups with their explanations), and returns its choice or "none" from the logits of the
option codes. On its own it is not a matcher: use it inside the Matchev package, which builds the questions, settles the
exact cases in code, picks one consistent set of groups and checks every guarantee before a response leaves.
How to use
git clone https://github.com/mohit67890/matchev && cd matchev
uv venv -p 3.13 .venv && uv pip install -p .venv -e '.[fast]' # Apple silicon (MLX)
hf download mohit67890/matchev-4b --local-dir adapters/matchev-4b
.venv/bin/python -m matchev.fast merge --adapter adapters/matchev-4b # once; downloads the pinned base (about 8 GB)
.venv/bin/python -m matchev.api serve --adapter adapters/matchev-4b --port 8080
curl -s localhost:8080/v1/match -H 'Content-Type: application/json' -d @request.json
The request and response are in docs/api.md; copy-paste specs for each business case are in docs/recipes.md.
Use cases


The five checked use cases: the records, what matchev-4b returned, every difference explained, and the same request with one field flipped. The expected answers were written before any model ran; misses are shown.










Results


The same 7,200 questions from 24 test sets, each judge answering in the learned layer's place (26–27 Nov 2026):
| matchev-4b | Jev 1.14 | Claude Haiku 5.5 | Claude Sonnet 5.5 | best code | |
|---|---|---|---|---|---|
| Payment groups (600): accuracy | 0.950 | 0.905 | 0.947 | 0.948 | 0.917 |
| · answers at p ≥ 0.95: share / right | 92% / 98% | 23% / 100% | 12% / 100% | 19% / 100% | 60% / 98% |
| Record matching (19 sets, 5,700): accuracy | 0.682 | 0.786 | 0.764 | – | – |
| · answers at p ≥ 0.95: share / right | 36% / 99% | 65% / 87% | 56% / 83% | – | – |
| Cost per 1,000 questions | about $0.09 (self-hosted, 2×H100, unbatched) | $0.12 | $0.41 | $11.20 | about 0 |


Strongest on payment groups (cash application with withholding, fees, part payments and parent companies). Weakest on product catalogues unlike anything it trained on, where it says "none" when a match exists. Full tables and method: docs/results.md.
Training
One run from the base model, 0.3 epoch (6,224 steps) over 125,551 training questions, LoRA on the attention, MLP and linear attention projections, learning rate 1.5e-4, on 2×H100 (27 Nov 2026). Loss: the log-probability of the true option, or "none", over the frozen language-model head's rows for the option codes.
| Source | Licence |
|---|---|
| Generated identity and cash-application cases (Matchev's generator; held-out families excluded) | generated |
| GLEIF to Companies House links, train half | GLEIF CC0 1.0; Companies House free data product (no formal licence; use stated as unrestricted) |
| GLEIF duplicate registrations, train half | CC0 1.0 |
| USAspending contract actions, train half | US government work, public domain |
| WDC Products 2017 train and valid splits (cameras, computers, shoes, watches) | none stated |
The WDC Products 2017 corpus states no licence; it was used for training, downloaded from its source and is not redistributed here. No test split, held-out dataset or held-out generator family was trained on. No output of Claude, Jev or any other model was used for training; those models were only measured.
Limits
- Says "none" too often on product catalogues it never saw: safe (the record goes to a person) but less automation.
- Trusts balancing sums too much when the payer is unknown, and an address alone when a company has renamed.
- English records; tested on public and generated data only, not yet on a hand-labelled set of real exceptions.
- Calibrated at one forward pass per question;
pfrom other settings is not calibrated.
Choose a threshold on a few hundred of your own reviewed records before automating anything.
- Downloads last month
- 1