Run this model with HF Jobs
Run freeweight/crypto-news-events-small on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/freeweight/crypto-news-events-small. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/freeweight/crypto-news-events-small on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use freeweight/crypto-news-events-small with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use freeweight/crypto-news-events-small with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="freeweight/crypto-news-events-small")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("freeweight/crypto-news-events-small") model = AutoModelForSequenceClassification.from_pretrained("freeweight/crypto-news-events-small", device_map="auto") - Transformers.js
How to use freeweight/crypto-news-events-small with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('text-classification', 'freeweight/crypto-news-events-small'); - Notebooks
- Google Colab
- Kaggle
Crypto News Events (small, 140M)
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, ...).
- Open: Apache-2.0, ungated. Trained on synthetic text and openly licensed regulator titles (table below).
- Task: single-label text classification, 16 event types, one primary label per item.
- Languages: en, zh, ko, ja, es, pt, tr, ru, vi, id, de, fr. All 12 have native training rows and a real-world test.
- Score: macro-F1 0.705 on 2,098 real-world items in 12 languages (model-made labels, not human-verified; details below). The best off-the-shelf zero-shot baseline we tested scores 0.471.
- Input length: headlines and short posts up to about 500 characters; max length 192 tokens. Not for article bodies.
- Calibrated: a temperature is baked into the classifier head, so the scores are calibrated with no extra code.
- Runs anywhere: PyTorch, ONNX (
onnx/model.onnxfp32,onnx/model_fp16.onnx,onnx/model_quantized.onnxwith int8 embeddings), transformers.js. About 17 ms per item on CPU with ONNX Runtime.
Requires transformers >= 4.48.
Quick start
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.
ONNX Runtime
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()))
transformers.js
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.
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 |
Labels
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):
- Label the new event, not its background or its price effect. "XYZ falls 20% after delisting notice" is
delisting. - Two new events in one text: the label earlier in the list wins. "Exchange hacked, suspends withdrawals" is
hack_exploit. - Plans, rumours, filings and scheduled events count as the event ("to list", "files for ETF", "unlock next week").
- Who acts decides between enforcement and regulation: an authority acting against a named party is
legal_enforcement; a rule for everyone, or a licence granted, isregulation_policy. - Stablecoins: peg, supply, reserves and launches are
stablecoin; stablecoin laws areregulation_policy; enforcement against an issuer islegal_enforcement; a company adopting a stablecoin ispartnership_integration. - Exchange notices: new trading is
listing; removal, warning tag or a token swap isdelisting; a temporary pause or maintenance isoutage_insolvency; a token reward campaign isairdrop_rewards; fee promotions areother. - No discrete event (price moves, analysis, predictions) is
market_commentary. A data breach with no funds taken isother.
Evaluation (checked November 2026)
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.
Real-world test, four views
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.
- (a) Agreed only: items where the two labellers agree. This drops the hardest items and flatters every model.
- (b) Agreed plus high-confidence adjudicated items. This is the headline: it keeps the disputed items that could be settled with confidence and leaves out only the 302 that could not.
- (c) All 2,400, lenient: on a low-confidence item a prediction counts as correct when it matches either labeller.
- (g) Gemma only: gemma-4-31B-it's labels on all 2,400. This is the view independent of the training filter.
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:
- The zero-shot models are off-the-shelf zero-shot NLI baselines without our guideline. They were given the 16 labels as one-line hypotheses (the hypothesis set was chosen on the dev set). They cannot know the tie-break rules above, and this model was trained for exactly these labels. The comparison shows what task-specific training buys over a general zero-shot model; it does not say those models are worse in general.
- The prompted 27B model is a reference upper line, not a rival. It is far larger, reads the full guideline in its prompt, and is the model that wrote the synthetic training text. It was scored with the first version of the guideline and not re-run under the current one. This model is 0.156 below it in view (b) [−0.180, −0.131].
- The English-only row is scored on the English items only and is not comparable with the other rows. This model scores 0.74 on English in view (b).
- This model's score falls from 0.730 to 0.661 between the most favourable and the independent view. The lead over the best zero-shot baseline stays between +0.216 and +0.243.
Per language, view (b)
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 |
Per class, view (b), n = 2,098
| 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 |
Regulator releases (open split)
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) |
- Accuracy by language, agreed / adjudicated: en 0.84 / 0.80, ja 0.93 / 0.86, ko 0.84 / 0.80.
- Macro-F1 over all classes present is 0.489 (agreed) and 0.459 (adjudicated). It is noisy because four classes have only 1 to 4 items; do not read much into it.
Calibration
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 |
Limitations and where it loses
- Not human-verified. Every score above is measured against labels made by models. Agreement between the two labellers is κ 0.783 on the real-world test, so a part of every error count is label noise, in either direction.
- The training filter and the eval share a judge. gpt-oss-120b filtered the training rows and is one of the two eval labellers. Use the gemma-only view, 0.661, as the cautious number.
stablecoinis weak: F1 0.51 (0.55 on the supplement) with precision 0.41 to 0.42. The model over-callsstablecoinfor laws and partnerships that merely mention stablecoins. Do not alert on this class alone.product_launchis often missed: recall 0.38. It is confused withlistingandother.otheris over-predicted: precision 0.47.token_supplyis weak on the main test (F1 0.55, 36 items) but strong on the larger supplement (0.85, 149 items).- German (0.60) and Turkish (0.61) are the weakest languages.
- Synthetic-to-real gap. Almost all training text is synthetic. On held-out synthetic text the model scores 0.97 (appendix), on real text 0.70. Real-world writing styles that look nothing like the synthetic data lose accuracy.
- Real regulator training text exists only for en, ko and ja (plus some Wikinews). There is no Traditional Chinese regulator evaluation, and the regulator split covers three languages only.
- Calibration is good, not perfect: ECE is 0.040 after calibration, fitted on only 261 dev items.
- It is below a large prompted LLM: 0.156 macro-F1 under the prompted 27B reference. What it offers instead is speed and size.
- Headlines and short leads only: up to about 500 characters, max length 192 tokens. Article bodies are out of scope and untested.
- One label per item. A second event in the same text is not predicted.
- The test is stratified by event type. On a raw feed, where
market_commentaryandotherdominate, the mix of errors will differ. - Languages outside the 12 are untested.
- Not investment advice. The model tags the type of event a text reports. It does not judge whether the report is true, how important it is, or what any price will do.
Training data and licences
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 |
- 29% of the kept synthetic rows are written as hard cases. The largest single prompt template accounts for 0.37% of rows.
- No fact seed is dated inside the evaluation period.
- Not used: social-media text collections, corpora with unclear licences, and copyrighted news or incident databases.
Keeping training apart from the test:
- Rows where the labels did not agree were dropped: 7,317.
- Event-level guard: 4,253 training rows dropped because they share a rare entity and a label with any eval item.
- Near-duplicates dropped: 180 within training, 189 against the eval sets by MinHash, 468 by embedding similarity (cosine ≥ 0.9). There were no exact matches.
- The checkpoint and the temperature were chosen on a separate real-world dev set of 300 items with disjoint events (the temperature on its 261 agreed or confidently adjudicated items).
Evaluation protocol
- Guideline. One written guideline defines the 16 labels, the tie-break rules and worked examples. Both labellers, the adjudicator and the prompted reference model read it. Labels come from the text alone, with no links opened.
- Gold labels. gpt-oss-120b and gemma-4-31B-it label every item independently. The 718 disagreements over all eval sets went to a third model: 248 came back with high confidence and the written rules settled 51 more; 419 stay low confidence (302 of them in the real-world test, 78 in the regulator split) and are excluded from view (b).
- Sampling. 200 items per language, stratified on the gpt-oss-120b label with weights 1/√(stratum size).
- Intervals. 95% bootstrap; paired bootstrap for differences. In every view, this model was better than every zero-shot baseline in all resamples.
- Real-world test text is not published. It is copyrighted by its publishers. Each item is identified by URL, publisher, timestamp, language and SHA-256 of the text. The regulator split is under open licences.
- Latency. Median per item on CPU.
Appendix: synthetic diagnostic
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.
Changelog
- v1 (2026-11): first release. Calibrated head, ONNX fp32, fp16 and int8-embedding files.
- Downloads last month
- 43
Model tree for freeweight/crypto-news-events-small
Base model
jhu-clsp/mmBERT-small