Skip to page content
SAVRN
Search Plan a project

Open-weight model · Text classification

laya-pdpa-onnx-v4-32k

by MY Suarify/laya-pdpa-onnx-v4-32k

laya-pdpa-onnx-v4-32k is an open-weight model for text classification from MY, released under Apache License 2.0. Its published files total 1.1 GB.

ONNX export of Suarify/laya-pdpa-my-v4 — a Malaysian PDPA classifier for call transcripts. Ten typed questions per call: eight yes/no classes, one ordered severity, one choice for who disclosed.

Parameters—
Context—
Weights7.0 MB
Licenseapache-2.0
AccessOpen weights
Monthly Downloads—

Model Card

By MY, published under apache-2.0, revision 2b0ac85eafb8.

ONNX export of Suarify/laya-pdpa-my-v4 — a Malaysian PDPA classifier for call transcripts. Ten typed questions per call: eight yes/no classes, one ordered severity, one choice for who disclosed. Exported with torch.onnx.export(dynamo=True), opset 17, external data. Accuracy is over all 960 held-out decisions (96 rows × 10 questions), by argmax, against a majority-class baseline of 72.8%. Parity of the fp32 export against the PyTorch checkpoint is 1.07e-05 max absolute logit difference across batches 1, 3, 8 and 16. fp32 and q4f16 both score 825/960. That identical total is a coincidence of to 10.15 absolute logit difference, and the flips happen to break 23 each way. The disagreements are…

Read MY's full model card

ONNX export of Suarify/laya-pdpa-my-v4 — a Malaysian PDPA classifier for call transcripts. Ten typed questions per call: eight yes/no classes, one ordered severity, one choice for who disclosed.

Exported with torch.onnx.export(dynamo=True), opset 17, external data.

Variants

file size accuracy 1 question, 4 vCPU
onnx/model.onnx 602 MB 85.9% 1622 ms
onnx/model_q4f16.onnx 192 MB 85.9% (same total, 46 different answers — see below) 1759 ms
onnx/model_fp16.onnx 302 MB does not load in this build —

Accuracy is over all 960 held-out decisions (96 rows × 10 questions), by argmax, against a majority-class baseline of 72.8%.

Parity of the fp32 export against the PyTorch checkpoint is 1.07e-05 max absolute logit difference across batches 1, 3, 8 and 16.

q4f16 scores the same total and does not give the same answers

fp32 and q4f16 both score 825/960. That identical total is a coincidence of cancellation, not agreement: the two builds disagree on 46 of 960 decisions, with up to 10.15 absolute logit difference, and the flips happen to break 23 each way.

The disagreements are not spread evenly. They land on the two questions this model exists for:

question decisions that flip under 4-bit
pdpa_actor 25 of 96 (26%)
pdpa_severity 10 of 96 (10%)
pdpa_health 5 of 96
pdpa_bank_card 3 of 96
pdpa_mykad, pdpa_phone, pdpa_email 1 each

Both multi-class heads read a 3- or 4-way argmax over close logits, so 4-bit weights move the decision far more often than they do on a binary yes/no. Aggregate accuracy hides this completely.

So choose on what you need. For a queue-ranking or actor-attribution decision you intend to act on, use onnx/model.onnx (602 MB) — the 192 MB build agrees with it on only 74% of actor calls. For the eight binary classes, q4f16 is within one decision of fp32 on all but pdpa_bank_card and is the obvious choice in a browser.

An earlier version of this card said 4-bit "flipped zero decisions". That was read off the matching accuracy totals before the per-decision comparison was run, and it was wrong.

The fp16 file in this build fails to load with a type error. The cause is now known and fixed in the exporter, so a future export will ship a working one: five nodes in this graph end up with genuinely mixed inputs, and convert_float_to_float16 has to be told to leave them alone so it inserts the casts around them. It converges to 302 MB that loads and whose argmax matches fp32. For a browser, use model_q4f16.onnx; for severity or actor decisions you act on, read the next section first.

Pruned vocabulary

The base checkpoint carries a 256,000-token multilingual vocabulary, which made the embedding table 61% of its weights. MatMulNBitsQuantizer skips Gather, so quantisation never touched it and the full-vocab q4f16 build still weighed 880 MB.

This export keeps 32,000 tokens, chosen on the train and validation splits only, and slices the embedding to match: 256,000 → 32,000 rows, 322M → 150M parameters.

embedding          fp32      98 MB    fp16     49 MB
everything else    fp32     501 MB    4-bit    70 MB

The keep-set is script-aware. Ids below 32,000 hold 28,564 Latin tokens but only 571 CJK and 27 Tamil, so keeping the lowest ids would leave Chinese and Tamil encoding as raw bytes. Every single-character CJK and Tamil token is kept, and byte fallback is retained, so no input is ever unencodable.

The tokenizer in this repo is not interchangeable with the base one. Token ids differ. Use tokenizer.json from here or every answer is read from wrong rows.

Inputs

input_ids       int64  [batch, seq]
attention_mask  int64  [batch, seq]
marker_pos      int64  [batch, options]   index of each [MASK] slot
marker_mask     bool   [batch, options]
qtype           int64  [batch]            0=choice 1=score 2=noul
->  logits      float  [batch, options]

This is not a standard sequence classifier and transformers.js cannot load it. The sequence must be built as laya.common.build_sequence does:

[CLS] <type> question: <ins> [SEP] [MASK] opt0 [MASK] opt1 ... [SEP] state [SEP]

with marker_pos carrying each [MASK] index. Special tokens are mmBERT's <bos>/<eos>/<mask>/<pad> = 2/1/4/0, not [CLS]/[SEP]. Option order is label order — get it wrong and every answer is silently relabelled, not an error. A working single-file browser port is in the source repository.

Reading the ordered score question: take argmax over the option logits. Do not truncate a continuous expectation — int(2.84) is 2, and that one mistake reported severity at 22.9% for four versions when it scores 75.0%.

Calibration

temperature (choice, score, noul) = [1.0323784351348877, 1.0251051187515259, 1.1000169515609741]

All three fitted inside laya's [0.5, 5] clamp, so these confidences are genuinely calibrated rather than saturated. Earlier checkpoints shipped [10.0, 10.0, 7.916], which is clamped on load with a warning — accuracy was unaffected, because temperature does not move argmax, but the probabilities could not be used.

Limitations

All training data is synthetic; no real call has ever been labelled. Disclosure prevalence in the corpus is far above production, so precision here is optimistic by roughly an order of magnitude.

The gain over a majority-class predictor is about fourteen points, not eighty-six. Three of the eight binary classes — pdpa_email, pdpa_mykad, pdpa_credential_otp — have confidence intervals containing their own baseline, and pdpa_bank_card is below its. A page of regexes beats this model on all three. What it is actually for is pdpa_severity (+34.4 over baseline) and pdpa_actor (+29.1), which no pattern can express: ranking a queue, and telling an agent soliciting an NRIC from a caller volunteering one unprompted.

See the base model card for the per-question table, and for two published figures that turned out to be wrong in the evaluation rather than in the model.

Identity and Version

Repository
Suarify/laya-pdpa-onnx-v4-32k
Publisher
MY
Task
Text classification
Modality
Text
Library
Not stated by the source
Parameters
Not stated by the source
Languages
ms, en, zh, ta
Revision
2b0ac85eafb833c418f3f19ae4de837eb57a477e
First published
2026-10-01
Last updated
2026-10-01

Files and Weights

18 files, 1.1 GB in total. The weights are 3 files totalling 7.0 MB in onnx.

Weights3 files · 7.0 MB
Configuration5 files · 228.0 KB
Tokenizer5 files · 6.1 MB
Documentation1 file · 6.6 KB
Other3 files · 1.1 GB
Repository1 file · 1.7 KB
Every file
FileTypeSizeSHA-256
onnx/model.onnxWeights2.4 MB 09547d1b9b12
onnx/model_fp16.onnxWeights2.4 MB 07312648dd87
onnx/model_q4f16.onnxWeights2.2 MB 9e574ac10695
keep_ids.jsonConfiguration225.2 KB —
laya_pdpa_config.jsonConfiguration1.4 KB —
onnx/export_report.jsonConfiguration289 B —
onnx/rl_agent_config.jsonConfiguration585 B —
rl_agent_config.jsonConfiguration585 B —
README.mdDocumentation6.6 KB —
onnx/model.onnx_dataOther599.5 MB 62f58deeb3a6
onnx/model_fp16.onnx_dataOther299.8 MB 4265b836c703
onnx/model_q4f16.onnx_dataOther189.4 MB 8df89b12429b
.gitattributesRepository1.7 KB —
onnx/tokenizer.jsonTokenizer1.2 MB —
tokenizer.jsonTokenizer2.4 MB —
tokenizer/tokenizer.jsonTokenizer2.4 MB —
tokenizer/tokenizer_config.jsonTokenizer666 B —
tokenizer_config.jsonTokenizer666 B —

License and Download

License
apache-2.0
Access
Open weights, no gate
Download size
7.0 MB
Download from MY

Released by MY through its official repository on Hugging Face. Read the license.

Built From

  • Derived from Suarify/laya-pdpa-my-v4
  • Quantized from Suarify/laya-pdpa-my-v4

Memory Requirements

PrecisionWeights in memory
As published7.0 MB

Weights only, from the published parameter count; the key-value cache and runtime add to this.

Questions About laya-pdpa-onnx-v4-32k

Can I use laya-pdpa-onnx-v4-32k commercially?

Yes. laya-pdpa-onnx-v4-32k is released under Apache License 2.0. The Apache License 2.0 is a permissive open-source license. It permits commercial use, modification and redistribution. It requires keeping the license and copyright notices and any NOTICE file, stating significant changes, and it includes an express patent grant from contributors.

Similar Models

Model · Text classification

twitter-roberta-base-sentiment-latest

Cardiff NLP

This is a RoBERTa-base model trained on ~124M tweets from January 2018 to December 2021, and finetuned for sentiment analysis with the TweetEval benchmark. The original Twitter-based RoBERTa model can be found here and the original reference paper is TweetEval. This model is suitable for English. 0 -> Negative; 1 -> Neutral; 2 -> Positive This sentiment analysis model has been integrated into TweetNLP. You can access the demo here.

Open weights cc-by-4.0 514 tokens transformers

Model · Text classification

finbert-tone

Yi

FinBERT is a BERT model pre-trained on financial communication text. The purpose is to enhance financial NLP research and practice. It is trained on the following three financial communication corpus. The total corpora size is 4.9B tokens. More technical details on FinBERT: Click Link This released finbert-tone model is the FinBERT model fine-tuned on 10,000 manually annotated (positive, negative, neutral) sentences from analyst reports. This model achieves superior performance on financial tone analysis task. If you are simply interested in using FinBERT for financial tone analysis, give it a try. If you use the model in your academic work, please cite the following paper: Huang, Allen H.…

Open weights 512 tokens transformers

Model · Text classification

ms-marco-MiniLM-L-6-v2

Joshua

https://huggingface.co/cross-encoder/ms-marco-MiniLM-L-6-v2 with ONNX weights to be compatible with Transformers.js. If you haven't already, you can install the Transformers.js JavaScript library from NPM using: Note: Having a separate repo for ONNX weights is intended to be a temporary solution until WebML gains more traction. If you would like to make your models web-ready, we recommend converting to ONNX using Optimum and structuring your repo like this one (with ONNX weights located in a subfolder named onnx).

Open weights 512 tokens transformers.js

Model · Text classification

twitter-xlm-roberta-base-sentiment

Cardiff NLP

This is a multilingual XLM-roBERTa-base model trained on ~198M tweets and finetuned for sentiment analysis. The sentiment fine-tuning was done on 8 languages (Ar, En, Fr, De, Hi, It, Sp, Pt) but it can be used for more languages (see paper for details). This model has been integrated into the TweetNLP library.

Open weights 514 tokens transformers

Model · Text classification

unbiased-toxic-roberta

Unitary

The huggingface models currently give different results to the detoxify library (see issue here). For the most up to date models we recommend using the models from https://github.com/unitaryai/detoxify Trained models & code to predict toxic comments on 3 Jigsaw challenges: Toxic comment classification, Unintended Bias in Toxic comments, Multilingual toxic comment classification. Built by Laura Hanu at Unitary, where we are working to stop harmful content online by interpreting visual content in context. Score not directly comparable since it is obtained on the validation set provided and not on the test set. To update when the test labels are made available. It is also noteworthy to mention…

Open weights apache-2.0 514 tokens transformers

Model · Text classification

emotion-english-distilroberta-base

Hartmann

With this model, you can classify emotions in English text data. The model was trained on 6 diverse datasets (see Appendix below) and predicts Ekman's 6 basic emotions, plus a neutral class: 1) anger 2) disgust 3) fear 4) joy 5) neutral 6) sadness 7) surprise The model is a fine-tuned checkpoint of DistilRoBERTa-base. For a 'non-distilled' emotion model, please refer to the model card of the RoBERTa-large version. a) Run emotion model with 3 lines of code on single text example using Hugging Face's pipeline command on Google Colab: b) Run emotion model on multiple examples and full datasets (e.g.,.csv files) on Google Colab: Please reach out to [email protected] if you have any…

Open weights 514 tokens transformers