Downloads · 30 days
10
7% of all-time downloads
jottypro/notes-slots
notes-slots is a token classification model from jottypro. Use it when you need labels on individual words, such as names. It is set up for transformers.js. The card lists the license as cc-by-4.0.
Compact token-classification model that extracts scheduling/task slots from short English notes — participants, datetimes, priorities, and recurrences — and runs fully client-side via Transformers.js.
Downloads · 30 days
10
7% of all-time downloads
All-time downloads
135
Public
Repo size
20.7 MB
Likes
0
Public
Click a slice to open those files.
.onnx7.7 MB · 96%
From the Hugging Face model README
Compact token-classification model that extracts scheduling/task slots from short English notes — participants, datetimes, priorities, and recurrences — and runs fully client-side via Transformers.js.
The shipped artifact is an INT8-quantized ONNX bundle (~7.6 MB) intended for in-browser WASM inference, not a PyTorch checkpoint.
| Base model | microsoft/xtremedistil-l6-h256-uncased (MIT) |
| Architecture | BertForTokenClassification — 6 layers, hidden size 256, 8 heads, intermediate 1024, vocab 9567 (pruned from 30522), max positions 512 (~7.6M params) |
| Task | Token classification (BIO slot tagging) |
| Schema version | slot-labels-v0.3.0 |
| Model version | 0.2.0 |
| Languages | English |
| Runtime | Transformers.js v4, WASM device, dtype q8 |
| Bundle size | 7.56 MB |
transformers (training) | 4.57.6 |
| License | CC BY 4.0 |
O, B-PARTICIPANT, I-PARTICIPANT, B-PRIORITY, I-PRIORITY,
B-DATETIME, I-DATETIME, B-RECURRENCE, I-RECURRENCE
A bundled transitions.json carries a BIO-constraint transition matrix
(0 for allowed transitions, a large negative penalty for invalid I-
continuations) for constrained Viterbi decoding on top of the raw token
logits. The bundled JS loader applies it automatically. The matrix is
deliberately constraint-only: empirical bigram priors double-count label
frequency already present in the emissions and were measured to cost ~7 F1
points of recall on the quantized model.
chrono-node for that), and any high-stakes decisioning.import { pipeline } from "@huggingface/transformers";
const tagger = await pipeline("token-classification", "jottypro/notes-slots", {
dtype: "q8",
});
const out = await tagger("call Sarah next Friday at 5pm, high priority, every week");
console.log(out);
The ONNX weights live at onnx/model_quantized.onnx, which is the layout
Transformers.js expects when loading from the Hub.
en-US (config en-US, revision d2362678…), filtered to the
calendar / datetime / email / lists scenarios with MASSIVE slots
remapped onto the local 4-slot schema (e.g. person/relation/email_address
→ PARTICIPANT, date/time/time_zone → DATETIME,
general_frequency → RECURRENCE), combined with synthetic
productivity and realistic note generators.AUGMENT_FACTOR=2) — random
filler-word prefix, trailing punctuation, occasional O-token dropout;
deduplicated against originals.bert-base-uncased teacher fine-tuned on the same data (teacher eval F1
~0.90); loss = 0.5·CE(gold) + 0.5·T²·KL(teacher‖student), T=2.QInt8 with reduce_range, applied
to MatMul and Gather ops via ONNX Runtime. Static QDQ quantization was
evaluated (MinMax/Entropy/Percentile calibration) and consistently lost
8-12 F1 points on this model size; dynamic + reduce_range won the matrix.
Weight-only QAT (straight-through fake-quant fine-tune) was also evaluated
and rejected: it landed below the post-training baseline (0.823 vs 0.828)
because it cannot model ORT's runtime dynamic activation quantization.Token-level metrics (seqeval) on the held-out test split (n ≈ 559). fp32 is argmax-decoded; q8 uses the constrained-Viterbi decode that ships in the JS loader. The q8 column reflects the artifact actually shipped in this repo.
| Metric | fp32 | q8 (shipped) |
|---|---|---|
| Accuracy | 0.9545 | 0.9444 |
| Precision | 0.8235 | 0.7925 |
| Recall | 0.8777 | 0.8662 |
| F1 | 0.8498 | 0.8278 |
| DATETIME F1 | 0.8175 | 0.7925 |
| PARTICIPANT F1 | 0.9355 | 0.9331 |
| PRIORITY F1 | 0.7526 | 0.6735 |
| RECURRENCE F1 | 0.8649 | 0.8651 |
reduce_range) and
constrained-Viterbi decoding the gap to fp32 is ~2 F1 points
(0.850 → 0.828). Decoding with plain argmax instead of the bundled
transitions costs a further ~2 points; empirical-prior Viterbi costs ~7.
PRIORITY is the most quantization-sensitive entity (0.75 → 0.67).DATETIME
span to an actual timestamp is a downstream concern.Released under CC BY 4.0, consistent with the MASSIVE training data
(CC BY 4.0). The base model microsoft/xtremedistil-l6-h256-uncased is MIT.
Part of the training data is derived from the MASSIVE dataset; CC BY 4.0 requires attribution to that source:
@misc{fitzgerald2022massive,
title = {MASSIVE: A 1M-Example Multilingual Natural Language Understanding Dataset with 51 Typologically-Diverse Languages},
author = {FitzGerald, Jack and others},
year = {2022},
eprint = {2204.08582},
archivePrefix = {arXiv}
}