Skip to page content
SAVRN
Search Plan a project

Open-weight model · Text classification

laya-heart-laya-onnx

by Yunkun Song YunkunSong/laya-heart-laya-onnx

laya-heart-laya-onnx is an open-weight model for text classification from Yunkun Song, released under Apache License 2.0. Its published files total 2.6 GB.

Two ONNX exports of Laya-multilingual (322M parameters, built on mmBERT) used by Laya-Heart, a texting copilot for couples that runs on your own computer.

Parameters—
Context—
Weights5.8 MB
Licenseapache-2.0
AccessOpen weights
Monthly Downloads—

Model Card

By Yunkun Song, published under apache-2.0, revision 76da9401e90d.

Two ONNX exports of Laya-multilingual (322M parameters, built on mmBERT) used by Laya-Heart, a texting copilot for couples that runs on your own computer. Laya reads the partner's message and answers short card questions with probabilities ("Does 没事 really mean it's fine?", a danger level from 1 to 10, a hidden safety question). Both run with onnxruntime and Laya's laya-ts runtime, exactly as the app runs them. Practice exam written and labelled by teacher B (Qwen3-32B-AWQ, a different model family from the teacher that wrote the training chats). One command in the repository recomputes every number from the raw answers, or re-runs both models: npm run reproduce / npm run reproduce…

Read Yunkun Song's full model card

Laya-Heart judge: Laya-multilingual as ONNX, zero-shot and fine-tuned (v3)

Two ONNX exports of Laya-multilingual (322M parameters, built on mmBERT) used by Laya-Heart, a texting copilot for couples that runs on your own computer. Laya reads the partner's message and answers short card questions with probabilities ("Does 没事 really mean it's fine?", a danger level from 1 to 10, a hidden safety question).

Folder What it is Used by
zero-shot/ The original checkpoint (revision 7b928d8), converted to ONNX fp32; weights unchanged. Byte-identical to the project's release laya-onnx-v1. The app, by default
v3/ Fine-tuned for couples' chats with the Laya-Heart training kit (third version of the first run, 2026-10-15/16), exported to ONNX fp32. The evaluation (npm run reproduce -- --models); it goes into the app after the sealed final exam

Both run with onnxruntime and Laya's laya-ts runtime, exactly as the app runs them.

Results on the 300-chat practice exam

Practice exam written and labelled by teacher B (Qwen3-32B-AWQ, a different model family from the teacher that wrote the training chats). One command in the repository recomputes every number from the raw answers, or re-runs both models: npm run reproduce / npm run reproduce -- --models.

zero-shot v3
Judgment, mean macro-F1 over 11 questions 0.326 0.571 (gain 95% CI 0.18–0.31)
Calibration error (ECE) 0.153 0.068
Danger level, mean absolute error (1–10) 2.78 1.56
Safety recall at the 0.8 alarm line 0 / 21 13 / 21
False alarms on ordinary chats 2.9% 1.4%

On a separate held-out safety probe (66 clear chats from a seed never used in training), safety recall went from 2 / 47 to 37 / 47 with no false alarms. The pre-registered bar for safety recall is 0.9; reaching it is the next step, and the fine-tuning report lists every gate and caveat. These are practice-exam numbers; the sealed final exam comes next.

Training data

v3 was trained on 3,000 synthetic practice chats written by DeepSeek-V4.1-Flash (weights MIT) to fit chosen answers, each read back blind five times per question; answers that disagreed were dropped. No real chat was used.

Use

Laya-Heart drafts chat replies; it is not counselling or crisis support, and the safety notice is a hint, not a diagnosis. In a crisis, contact local emergency services or a helpline (China 12356, US 988).

License

Apache License 2.0 (LICENSE-Apache-2.0.txt), like the original Laya-multilingual checkpoint (Copyright Convai Innovations). Its encoder is fine-tuned from jhu-clsp/mmBERT-base, MIT (LICENSE-MIT-mmBERT.txt). See NOTICE.txt. Not made or endorsed by Convai Innovations.

Files (SHA-256)

See SHA256SUMS.txt.

Identity and Version

Repository
YunkunSong/laya-heart-laya-onnx
Publisher
Yunkun Song
Task
Text classification
Modality
Text
Library
laya
Parameters
Not stated by the source
Languages
zh, en
Revision
76da9401e90db16fff642632c43deefe6ab5e3f8
First published
2026-10-17
Last updated
2026-10-18

Files and Weights

18 files, 2.6 GB in total. The weights are 4 files totalling 5.8 MB in onnx.

Weights4 files · 5.8 MB
Configuration2 files · 6.4 KB
Tokenizer2 files · 68.7 MB
Documentation3 files · 14.6 KB
Other6 files · 2.6 GB
Repository1 file · 1.9 KB
Every file
FileTypeSizeSHA-256
v3/encoder.onnxWeights2.4 MB ba60ebdcda15
v3/head.onnxWeights200.0 KB bb3d2f5042de
zero-shot/encoder.onnxWeights2.9 MB ca6f9ee2ecf3
zero-shot/head.onnxWeights316.7 KB 7a959c0c9526
v3/rl_agent_config.jsonConfiguration5.9 KB —
zero-shot/rl_agent_config.jsonConfiguration472 B —
LICENSE-Apache-2.0.txtDocumentation10.2 KB —
LICENSE-MIT-mmBERT.txtDocumentation1.3 KB —
README.mdDocumentation3.1 KB —
NOTICE.txtOther1.0 KB —
SHA256SUMS.txtOther1.1 KB —
v3/encoder.onnx.dataOther1.2 GB f50a6f99fa7b
v3/head.onnx.dataOther59.9 MB f7ee98c887b7
zero-shot/encoder.onnx.dataOther1.2 GB f1e49a027352
zero-shot/head.onnx.dataOther59.9 MB 0292a4eb478c
.gitattributesRepository1.9 KB —
v3/tokenizer.jsonTokenizer34.4 MB dbba919c6e5e
zero-shot/tokenizer.jsonTokenizer34.4 MB 609d8f4c067c

License and Download

License
apache-2.0
Access
Open weights, no gate
Download size
5.8 MB
Download from Yunkun Song

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

Built From

Memory Requirements

PrecisionWeights in memory
As published5.8 MB

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

Questions About laya-heart-laya-onnx

Can I use laya-heart-laya-onnx commercially?

Yes. laya-heart-laya-onnx 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