Polish public model card for Stage 5
#2
by aryamantodkar - opened
README.md
CHANGED
|
@@ -18,115 +18,157 @@ license: mit
|
|
| 18 |
|
| 19 |
# Premove ITN v0.1.0
|
| 20 |
|
| 21 |
-
Premove ITN is an
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
using sentence context, then applies exact maximum-score decoding.
|
| 25 |
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 29 |
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
|
|
|
| 38 |
|
| 39 |
```python
|
| 40 |
from premove_itn import PremoveITN
|
| 41 |
|
| 42 |
-
itn = PremoveITN.from_pretrained(
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
)
|
| 46 |
-
print(itn.normalize("call me at four thirty")) # call me at 04:30
|
| 47 |
```
|
| 48 |
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 53 |
|
| 54 |
-
The
|
| 55 |
-
`
|
| 56 |
-
|
| 57 |
-
under the MIT license; retain that attribution when redistributing this
|
| 58 |
-
artifact.
|
| 59 |
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
`
|
| 63 |
|
| 64 |
-
##
|
| 65 |
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
only the utterance text at inference time. Candidate metadata is generated by
|
| 70 |
-
the package's deterministic Rust layer.
|
| 71 |
|
| 72 |
-
##
|
| 73 |
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
|
|
|
|
|
|
| 77 |
|
| 78 |
-
##
|
| 79 |
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
different latency and memory use.
|
| 86 |
|
| 87 |
-
|
|
|
|
| 88 |
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
|
|
|
| 93 |
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
| text-processing-rs | 55.79% | 55.05% | 273/400 (68.25%) | 0.14 ms |
|
| 99 |
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 104 |
|
| 105 |
## Limitations
|
| 106 |
|
| 107 |
-
-
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
-
|
| 111 |
-
|
| 112 |
-
-
|
| 113 |
-
|
| 114 |
-
|
|
|
|
|
|
|
|
|
|
| 115 |
|
| 116 |
-
## Release identity
|
| 117 |
|
| 118 |
- Artifact version: `v0.1.0`
|
| 119 |
- Architecture: `premove-candidate-scorer-v1`
|
| 120 |
-
-
|
| 121 |
- Hub repository: `premove-ai/premove-itn`
|
| 122 |
-
-
|
| 123 |
-
- Hub revision: `v0.1.0`
|
| 124 |
-
- Hub commit: `80bda5e2e1fe9542aa628597090242df57c1a157`
|
| 125 |
- Base model: `microsoft/deberta-v3-large`
|
| 126 |
- Base model revision: `64a8c8eab3e352a784c658aef62be1662607476f`
|
| 127 |
-
-
|
| 128 |
-
- Inference artifact SHA-256: `119c0f19767b61446e04da1f8f01a001edf97a47a66965e7146db2483b4937a1`
|
| 129 |
|
| 130 |
-
|
|
|
|
|
|
|
|
|
|
| 131 |
|
| 132 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
|
| 19 |
# Premove ITN v0.1.0
|
| 20 |
|
| 21 |
+
Premove ITN is an open-weight contextual inverse text normalization system for
|
| 22 |
+
English voice-agent transcripts. It turns spoken-form ASR text into structured
|
| 23 |
+
written text:
|
|
|
|
| 24 |
|
| 25 |
+
```text
|
| 26 |
+
call me at four thirty → call me at 04:30
|
| 27 |
+
the total is twenty dollars → the total is $20
|
| 28 |
+
```
|
| 29 |
+
|
| 30 |
+
Deterministic Rust realizers propose valid written forms. A
|
| 31 |
+
DeBERTa-v3-large contextual scorer uses the complete sentence to score those
|
| 32 |
+
candidates, and an exact decoder selects compatible, non-overlapping edits.
|
| 33 |
|
| 34 |
+
This repository contains the frozen, inference-only v0.1.0 model artifact. It
|
| 35 |
+
does not contain optimizer state, scheduler state, training counters, training
|
| 36 |
+
data, or evaluation rows. Source code and retained evaluation evidence are in
|
| 37 |
+
[`premove-ai/premove-itn`](https://github.com/premove-ai/premove-itn).
|
| 38 |
|
| 39 |
+
## Loading the model
|
| 40 |
+
|
| 41 |
+
This is a custom candidate-scoring architecture. Do not load it with
|
| 42 |
+
`AutoModel.from_pretrained()`.
|
| 43 |
|
| 44 |
```python
|
| 45 |
from premove_itn import PremoveITN
|
| 46 |
|
| 47 |
+
itn = PremoveITN.from_pretrained()
|
| 48 |
+
print(itn.normalize("call me at four thirty"))
|
| 49 |
+
# call me at 04:30
|
|
|
|
|
|
|
| 50 |
```
|
| 51 |
|
| 52 |
+
The `premove-itn` PyPI release is not published yet. Until the public package
|
| 53 |
+
release, contributors can build and install the release wheel from the GitHub
|
| 54 |
+
repository. Create one `PremoveITN` instance and reuse it; model initialization
|
| 55 |
+
is expensive compared with warm normalization.
|
| 56 |
+
|
| 57 |
+
`device="auto"` selects CUDA when available, then Apple MPS, then CPU. The
|
| 58 |
+
current release candidate has been validated end-to-end only on macOS Apple
|
| 59 |
+
Silicon with Python 3.11 and MPS. Other environments require release
|
| 60 |
+
validation.
|
| 61 |
+
|
| 62 |
+
## Architecture
|
| 63 |
+
|
| 64 |
+
```text
|
| 65 |
+
Spoken ASR text
|
| 66 |
+
↓
|
| 67 |
+
deterministic Rust candidates
|
| 68 |
+
↓
|
| 69 |
+
DeBERTa-v3-large contextual scores
|
| 70 |
+
↓
|
| 71 |
+
exact maximum-score decoder
|
| 72 |
+
↓
|
| 73 |
+
written transcript
|
| 74 |
+
```
|
| 75 |
|
| 76 |
+
The scorer has 435,594,145 parameters. The artifact contains the complete
|
| 77 |
+
trained state in `model.safetensors`, the pinned DeBERTa configuration, and the
|
| 78 |
+
tokenizer files required by the release.
|
|
|
|
|
|
|
| 79 |
|
| 80 |
+
Supported candidate kinds are `DIGIT_SEQUENCE`, `CARDINAL`, `TIME`, `DATE`,
|
| 81 |
+
`MONEY`, `DECIMAL`, `PHONE`, `ELECTRONIC`, `MEASUREMENT`, `ORDINAL`,
|
| 82 |
+
`PUNCTUATION`, `WHITELIST`, and `WORD`.
|
| 83 |
|
| 84 |
+
## First Evaluation
|
| 85 |
|
| 86 |
+
The retained First Evaluation used a frozen, balanced synthetic stress suite.
|
| 87 |
+
Semantic entity accuracy is the primary structured-value metric. Strict exact
|
| 88 |
+
match separately measures the complete canonical output.
|
|
|
|
|
|
|
| 89 |
|
| 90 |
+
### Dedicated voice-agent rows
|
| 91 |
|
| 92 |
+
| Backend | Correct entities | Semantic accuracy | Mean latency |
|
| 93 |
+
| --- | ---: | ---: | ---: |
|
| 94 |
+
| **Premove ITN** | **398/400** | **99.50%** | 57.41 ms |
|
| 95 |
+
| Thutmose | 268/400 | 67.00% | 16.04 ms |
|
| 96 |
+
| text-processing-rs | 273/400 | 68.25% | 0.15 ms |
|
| 97 |
|
| 98 |
+
### Overall 1,500-row benchmark
|
| 99 |
|
| 100 |
+
| Backend | Semantic accuracy | Strict exact | Mean latency |
|
| 101 |
+
| --- | ---: | ---: | ---: |
|
| 102 |
+
| **Premove ITN** | **89.70%** | **40.53%** | 56.49 ms |
|
| 103 |
+
| Thutmose | 59.39% | 22.13% | 15.98 ms |
|
| 104 |
+
| text-processing-rs | 55.79% | 16.53% | 0.14 ms |
|
|
|
|
| 105 |
|
| 106 |
+
Premove led measured semantic accuracy overall and on the 400 dedicated
|
| 107 |
+
voice-agent rows. It did not lead latency.
|
| 108 |
|
| 109 |
+
Latency used sequential batch-one requests on an Apple M4 MacBook Air with
|
| 110 |
+
MPS, an optimized Rust extension, and eight Rayon workers. Models were loaded
|
| 111 |
+
and warmed before request latency was measured. Download and initialization
|
| 112 |
+
are excluded. The result is not an estimate of production-traffic accuracy,
|
| 113 |
+
and the evaluation was not blind.
|
| 114 |
|
| 115 |
+
See the
|
| 116 |
+
[`First Evaluation report`](https://github.com/premove-ai/premove-itn/blob/main/eval/voice_agent_itn/results/first-evaluation/REPORT.md)
|
| 117 |
+
and
|
| 118 |
+
[`detailed tables`](https://github.com/premove-ai/premove-itn/blob/main/eval/voice_agent_itn/results/first-evaluation/DETAILS.md).
|
|
|
|
| 119 |
|
| 120 |
+
## Intended use
|
| 121 |
+
|
| 122 |
+
Use Premove for English voice-agent transcripts in which numbers, dates,
|
| 123 |
+
times, money, phone values, identifiers, URLs, and related structured values
|
| 124 |
+
need sentence-level disambiguation. The runtime receives only transcript text.
|
| 125 |
+
Candidate metadata is generated internally.
|
| 126 |
+
|
| 127 |
+
## Model lifecycle
|
| 128 |
+
|
| 129 |
+
- The first use downloads about 1.6 GB; duration depends on the network.
|
| 130 |
+
- Cached initialization takes several seconds on the tested system.
|
| 131 |
+
- Warm normalization averaged 56.49 ms in the retained MPS benchmark.
|
| 132 |
+
- Services and transcript streams should keep one normalizer resident.
|
| 133 |
|
| 134 |
## Limitations
|
| 135 |
|
| 136 |
+
- English only.
|
| 137 |
+
- A 435.6M-parameter model with an approximately 1.6 GB download.
|
| 138 |
+
- Multi-second initialization.
|
| 139 |
+
- Not compatible with generic `AutoModel.from_pretrained()` loading.
|
| 140 |
+
- The benchmark is synthetic and does not measure live production traffic.
|
| 141 |
+
- Weaker measured categories include URL, MONEY, CARDINAL, TIME,
|
| 142 |
+
REFERENCE_ID, and VERSION.
|
| 143 |
+
- Blind human gold adjudication and broader contamination checks remain
|
| 144 |
+
incomplete.
|
| 145 |
+
- End-to-end release validation currently covers macOS Apple Silicon, Python
|
| 146 |
+
3.11, and MPS only.
|
| 147 |
|
| 148 |
+
## Release identity and provenance
|
| 149 |
|
| 150 |
- Artifact version: `v0.1.0`
|
| 151 |
- Architecture: `premove-candidate-scorer-v1`
|
| 152 |
+
- Required package version: `0.1.0`
|
| 153 |
- Hub repository: `premove-ai/premove-itn`
|
| 154 |
+
- Immutable model commit: `80bda5e2e1fe9542aa628597090242df57c1a157`
|
|
|
|
|
|
|
| 155 |
- Base model: `microsoft/deberta-v3-large`
|
| 156 |
- Base model revision: `64a8c8eab3e352a784c658aef62be1662607476f`
|
| 157 |
+
- Model SHA-256: `119c0f19767b61446e04da1f8f01a001edf97a47a66965e7146db2483b4937a1`
|
|
|
|
| 158 |
|
| 159 |
+
The package pins the immutable model commit and verifies its release metadata,
|
| 160 |
+
base-model identity, and model digest before inference. Full training
|
| 161 |
+
composition and checkpoint selection evidence are in the
|
| 162 |
+
[`production model record`](https://github.com/premove-ai/premove-itn/blob/main/docs/model-provenance.md).
|
| 163 |
|
| 164 |
+
## License and attribution
|
| 165 |
+
|
| 166 |
+
Premove ITN source code and model weights are MIT licensed. The scorer uses
|
| 167 |
+
[`microsoft/deberta-v3-large`](https://huggingface.co/microsoft/deberta-v3-large)
|
| 168 |
+
at the revision above. Its architecture derives from the
|
| 169 |
+
[`DeBERTaV3` paper](https://arxiv.org/abs/2111.09543).
|
| 170 |
+
|
| 171 |
+
The Rust realization layer uses
|
| 172 |
+
[`text-processing-rs`](https://github.com/FluidInference/text-processing-rs),
|
| 173 |
+
which is Apache-2.0 licensed. Required notices are retained in the source
|
| 174 |
+
repository.
|