A fast multilingual classifier that sorts a crypto or finance headline, exchange notice, regulator release title or short post into one of 16 event types (hack, outage, listing, delisting, enforcement, regulation, ETF, macro, ...).
onnx/model.onnx fp32, onnx/model_fp16.onnx, onnx/model_quantized.onnx with
int8 embeddings), transformers.js. About 17 ms per item on CPU with ONNX Runtime.Requires transformers >= 4.48.
from transformers import pipeline
clf = pipeline("text-classification", model="freeweight/crypto-news-events-small")
clf("Lending protocol Quillfish Finance drained of $9M after oracle manipulation")
# [{'label': 'hack_exploit', 'score': ...}]
clf("[공지] 노스피어 거래소, QFX 거래 유의 종목 지정 안내", top_k=3) # top three labels with scores
The examples on this page use invented exchange and project names.
import numpy as np
import onnxruntime as ort
from huggingface_hub import hf_hub_download
from transformers import AutoConfig, AutoTokenizer
repo = "freeweight/crypto-news-events-small"
tok = AutoTokenizer.from_pretrained(repo)
labels = AutoConfig.from_pretrained(repo).id2label
sess = ort.InferenceSession(hf_hub_download(repo, "onnx/model_quantized.onnx"))
enc = tok(["北码交易所将于 12 月 5 日上线 QFX 永续合约"], truncation=True, max_length=192, padding=True, return_tensors="np")
names = {i.name for i in sess.get_inputs()}
logits = sess.run(None, {k: v for k, v in enc.items() if k in names})[0]
probs = np.exp(logits - logits.max(-1, keepdims=True))
probs /= probs.sum(-1, keepdims=True) # already calibrated
print(labels[int(probs[0].argmax())], float(probs[0].max()))
import { pipeline } from "@huggingface/transformers";
const clf = await pipeline("text-classification", "freeweight/crypto-news-events-small", { dtype: "q8" });
const out = await clf("El banco central mantiene los tipos de interés en el 4,25 % y anticipa dos recortes este año");
Use dtype: "fp16" or dtype: "fp32" for the other two files.
| File | Size | Label agreement with fp32 | CPU median per item |
|---|---|---|---|
model.safetensors (PyTorch, fp32) |
563 MB | reference | 78 ms |
onnx/model.onnx (fp32) |
563 MB | 1.000 | 16.5 ms |
onnx/model_fp16.onnx |
282 MB | 0.9990 | 18.6 ms |
onnx/model_quantized.onnx (int8 on the embedding table only) |
268 MB | 0.9953 | 17.4 ms |
The id is the index in config.json. Give the model one short item; it returns one primary label.
| Id | Label | The text reports ... |
|---|---|---|
| 0 | hack_exploit |
theft or loss of crypto funds by a hack, exploit, scam or drain |
| 1 | outage_insolvency |
a platform or blockchain outage, withdrawal suspension, maintenance, bankruptcy or insolvency |
| 2 | stablecoin |
a stablecoin depeg, mint, burn, reserves or a new stablecoin |
| 3 | delisting |
an exchange delisting a token or trading pair, or adding a warning tag |
| 4 | listing |
an exchange listing a new token, trading pair or futures contract |
| 5 | token_supply |
a token unlock, vesting, burn, buyback or emission change |
| 6 | airdrop_rewards |
an airdrop, token claim, points programme or reward campaign |
| 7 | legal_enforcement |
a lawsuit, charges, arrest, fine, court ruling, sanction or seizure against a named party |
| 8 | regulation_policy |
a law, regulation, guidance, licence or government policy |
| 9 | etf_institutional |
an ETF filing, approval or flows, or an institution or company buying crypto |
| 10 | funding_mna |
a funding round, investment, acquisition, merger or IPO |
| 11 | partnership_integration |
a partnership or integration between two companies or projects |
| 12 | product_launch |
a product launch, mainnet, upgrade, hard fork or new feature |
| 13 | macro |
macroeconomic news such as interest rates, inflation, jobs data, tariffs or war |
| 14 | market_commentary |
price movements, market analysis, trading flows or price predictions |
| 15 | other |
something else, such as people, events, education or non-financial news |
How boundary cases are decided (the model was trained and evaluated with these rules):
delisting.hack_exploit.legal_enforcement; a rule for everyone, or a licence granted, is regulation_policy.stablecoin; stablecoin laws are regulation_policy;
enforcement against an issuer is legal_enforcement; a company adopting a stablecoin is partnership_integration.listing; removal, warning tag or a token swap is delisting; a temporary pause
or maintenance is outage_insolvency; a token reward campaign is airdrop_rewards; fee promotions are other.market_commentary. A data breach with no funds taken
is other.All numbers were computed by us from saved predictions with one script. Best value per column in bold.
Read this first: the labels are made by models, not by people. Two open models from different families (gpt-oss-120b and gemma-4-31B-it) labelled every eval item independently with the same written guideline. Where they disagreed, a third model adjudicated. Nothing was verified by a human. Agreement between the two labellers (Cohen's κ) is 0.783 on the real-world test (0.744 for de to 0.843 for vi) and 0.674 on the regulator split.
gpt-oss-120b also filtered the training rows. It is therefore half of the eval labelling and also part of training. That is why the gemma-only view is shown below: gemma-4-31B-it had no part in training.
2,400 items (200 per language) from 2026-08-01 to 2026-11-18: about 90 news feeds, exchange notices, 32 Telegram channels, 3 Bluesky accounts and regulators, with 9 to 27 publishers per language. The sample is stratified by event type, so rare event types are over-represented compared with a raw feed. All training text is synthetic or dated before 2026-07-25.
Macro-F1, with 95% bootstrap intervals for this model:
| Model | (a) n = 1,923 | (b) n = 2,098 | (c) n = 2,400 | (g) n = 2,400 |
|---|---|---|---|---|
| this model (140M) | 0.730 [0.706–0.750] | 0.705 [0.682–0.726] | 0.701 [0.679–0.720] | 0.661 [0.639–0.680] |
| Horizon-Labs/multilingual-zeroshot-large (568M) | 0.487 | 0.471 | 0.475 | 0.445 |
| Horizon-Labs/multilingual-zeroshot-base (308M) | 0.473 | 0.462 | 0.456 | 0.430 |
| MoritzLaurer/bge-m3-zeroshot-v2.0 (568M) | 0.419 | 0.405 | 0.402 | 0.383 |
| Horizon-Labs/multilingual-zeroshot-small (141M, same base model) | 0.397 | 0.388 | 0.383 | 0.356 |
| MoritzLaurer mDeBERTa-v3-base-xnli-2mil7 | 0.286 | 0.281 | 0.279 | 0.262 |
| MoritzLaurer/deberta-v3-large-zeroshot-v2.0, English items only | 0.618 (157 en) | 0.587 (179 en) | ||
| Reference: Qwen3.8-27B prompted with the guideline | 0.878 | 0.862 | 0.855 | 0.812 |
Accuracy in the four views: this model 0.735 / 0.714 / 0.705 / 0.664; Horizon-Labs large 0.573 / 0.559 / 0.558 / 0.522; prompted Qwen3.8-27B 0.870 / 0.856 / 0.853 / 0.803.
Paired macro-F1 difference, this model minus the baseline (95% bootstrap interval):
| View | vs Horizon-Labs large | vs Horizon-Labs small |
|---|---|---|
| (a) | +0.243 [+0.215, +0.270] | |
| (b) | +0.234 [+0.206, +0.260] | +0.317 [+0.288, +0.344] |
| (c) | +0.225 [+0.198, +0.250] | |
| (g) | +0.216 [+0.190, +0.242] |
How to read this:
Macro-F1. "Synthetic training rows" is the number of native synthetic rows in that language.
| Language | This model | Horizon-Labs large | Synthetic training rows |
|---|---|---|---|
| de | 0.60 | 0.34 | 3,486 |
| en | 0.74 | 0.51 | 5,568 |
| es | 0.66 | 0.47 | 3,712 |
| fr | 0.67 | 0.45 | 3,666 |
| id | 0.65 | 0.54 | 3,590 |
| ja | 0.76 | 0.46 | 3,884 |
| ko | 0.66 | 0.45 | 4,452 |
| pt | 0.73 | 0.52 | 3,723 |
| ru | 0.67 | 0.44 | 3,667 |
| tr | 0.61 | 0.48 | 3,550 |
| vi | 0.75 | 0.45 | 3,703 |
| zh (Simplified and Traditional) | 0.78 | 0.46 | 4,463 |
| Class | Precision | Recall | F1 | Support |
|---|---|---|---|---|
| hack_exploit | 0.71 | 0.77 | 0.74 | 127 |
| outage_insolvency | 0.80 | 0.78 | 0.79 | 116 |
| stablecoin | 0.41 | 0.69 | 0.51 | 29 |
| delisting | 0.88 | 0.78 | 0.83 | 113 |
| listing | 0.81 | 0.89 | 0.84 | 132 |
| token_supply | 0.47 | 0.67 | 0.55 | 36 |
| airdrop_rewards | 0.84 | 0.65 | 0.73 | 94 |
| legal_enforcement | 0.72 | 0.71 | 0.72 | 103 |
| regulation_policy | 0.86 | 0.76 | 0.81 | 164 |
| etf_institutional | 0.86 | 0.71 | 0.78 | 133 |
| funding_mna | 0.62 | 0.80 | 0.70 | 75 |
| partnership_integration | 0.79 | 0.60 | 0.68 | 102 |
| product_launch | 0.85 | 0.38 | 0.52 | 151 |
| macro | 0.78 | 0.76 | 0.77 | 119 |
| market_commentary | 0.76 | 0.73 | 0.74 | 371 |
| other | 0.47 | 0.73 | 0.57 | 233 |
Small-class supplement. stablecoin and token_supply are thin in the main test, so we collected 650 more
keyword-targeted items from the same period. The table uses the 492 on which the two labellers agree; the 158 disputed
items are not adjudicated yet, so this is the favourable agreed-only view.
| Model | Macro-F1 | stablecoin F1 (precision / recall, n = 35) | token_supply F1 (precision / recall, n = 149) |
|---|---|---|---|
| this model | 0.723 [0.664–0.768] | 0.55 (0.42 / 0.77) | 0.85 (0.93 / 0.79) |
| Horizon-Labs large | 0.316 | 0.18 | 0.16 |
| Horizon-Labs small | 0.193 | 0.03 | 0.24 |
774 release titles from the same period: en 467 (US federal agencies), ko 196 (korea.kr), ja 111 (Financial Services Agency of Japan). Four classes make up almost all of this split, so accuracy leads here.
| Model | Agreed (n = 597) | Agreed plus adjudicated (n = 696) |
|---|---|---|
| this model | 0.856 | 0.807 |
| Horizon-Labs large | 0.466 | 0.496 |
| Horizon-Labs small | 0.461 | 0.481 |
| Horizon-Labs base | 0.437 | 0.453 |
| MoritzLaurer bge-m3-zeroshot | 0.425 | 0.458 |
| MoritzLaurer mDeBERTa-xnli | 0.224 | 0.241 |
| MoritzLaurer deberta-v3-large (en only) | 0.447 | 0.436 |
| Reference: Qwen3.8-27B prompted with the guideline | 0.898 | 0.823 |
This model's F1 on the four populated classes:
| Class | Agreed (n) | Agreed plus adjudicated (n) |
|---|---|---|
| legal_enforcement | 0.89 (158) | 0.84 (227) |
| regulation_policy | 0.90 (162) | 0.86 (180) |
| other | 0.85 (243) | 0.80 (250) |
| macro | 0.60 (25) | 0.56 (29) |
One temperature (T = 4.65) was fitted on the dev set (261 items) and baked into the classifier head: weight and bias
are divided by T. pipeline() and all three ONNX files return the calibrated scores, and the predicted label is
unchanged. Expected calibration error (15 bins):
| Set | Before | After |
|---|---|---|
| Real-world test, agreed | 0.215 | 0.041 |
| Real-world test, view (b) | 0.235 | 0.040 |
| Real-world test, gemma-only view | 0.031 |
stablecoin is weak: F1 0.51 (0.55 on the supplement) with precision 0.41 to 0.42. The model over-calls
stablecoin for laws and partnerships that merely mention stablecoins. Do not alert on this class alone.product_launch is often missed: recall 0.38. It is confused with listing and other.other is over-predicted: precision 0.47.token_supply is weak on the main test (F1 0.55, 36 items) but strong on the larger supplement (0.85, 149 items).market_commentary and other dominate, the mix of
errors will differ.50,570 training rows after all filters. No copyrighted news text was used for training.
| Source | Rows | Used as | Licence |
|---|---|---|---|
| Synthetic headlines, notices and posts written by Qwen3.8-27B in 12 languages | 47,464 | Training text. A row was kept only when the generator's own label and gpt-oss-120b's label both equal the target label | Model output; model licence Apache-2.0 |
| PatternPlus | Fact seeds for the synthetic text | CC BY 4.0. Data: PatternPlus | |
| DeFiHackLabs | Fact seeds for the synthetic text | Apache-2.0 | |
| Open regulator release titles and public names | Fact seeds for the synthetic text | As in the rows below | |
| Real release titles dated before 2026-07-25: US federal agencies (en), korea.kr (ko), Financial Services Agency of Japan (ja), ESMA and Wikinews; labelled by gpt-oss-120b | 3,574 before the last near-duplicate pass | Training text | US federal government works; KOGL Type 1 (source: korea.kr); PDL 1.0 (source: Financial Services Agency, Japan); ESMA reuse notice (source: ESMA); Wikinews text is CC BY 2.5 (created 2005-09-25 to 2024-12-15) or CC BY 4.0 (from 2024-12-16), attributed to Wikinews |
Keeping training apart from the test:
On a synthetic stress set of 1,045 items written by gpt-oss-120b, this model scores 0.97. This is a synthetic-on-synthetic diagnostic and says little about real text, where the same model scores 0.70. It is shown only to make the size of the synthetic-to-real gap visible.
onnx/model.onnx 563 MBmodel.safetensors 563 MBonnx/model_fp16.onnx 282 MBonnx/model_quantized.onnx 268 MBjhu-clsp/mmBERT-small