--- license: apache-2.0 language: - en - zh - ko - ja - tr - es - ru - pt - vi - de - fr - nl - pl - uk library_name: transformers pipeline_tag: text-classification base_model: jhu-clsp/mmBERT-small base_model_relation: finetune tags: - cryptobert - crypto-sentiment - sentiment-analysis - crypto - cryptocurrency - finance - multilingual - modernbert - mmbert - onnx - transformers.js widget: - text: "loaded another bag of $QFX at 0.42, not selling a single one until 2 🚀" example_title: Bullish (English) - text: "$QFX 这波反弹就是诱多,我已经全部清仓了,等 0.2 再说 📉" example_title: Bearish (Chinese) - text: "QFX 지금 사도 될까요, 아니면 조정을 기다려야 할까요?" example_title: Neutral (Korean) - text: "QFX'te düşüşü fırsat bildim, biraz daha ekledim. Hedef 1 dolar 🚀" example_title: Bullish (Turkish) - text: "Vendí todo mi $NRTH, esto es un rebote del gato muerto y se va a 0,10" example_title: Bearish (Spanish) - text: "NRTH 24時間: 0.31ドル(-0.4%)。レンジは0.28〜0.34。" example_title: Neutral (Japanese) --- # Crypto Sentiment (small, 140M) A **multilingual, Apache-2.0 drop-in replacement for [`ElKulako/cryptobert`](https://huggingface.co/ElKulako/cryptobert)** with the same label ids: `0: Bearish, 1: Neutral, 2: Bullish`. It reads one short crypto post and says whether the author expects or positions for the price to go up, down, or neither. - **Drop-in**: `id2label` and `label2id` are identical to cryptobert's (names, ids and capitalisation). cryptobert's own card snippet runs unchanged apart from the model name (below). - **Open**: Apache-2.0, ungated. Trained only on synthetic text; no social-media text was used in training. - **Languages with a real-world evaluation**: en, zh, ko, ja, tr, es, ru, pt, vi, de, fr, nl, pl, uk. It was also trained in it, id, ar, fa, th and hi, but **not evaluated on real text** in those six. - **Score against cryptobert**: on 5,424 real posts in 14 languages, macro-F1 51.9 against 33.5 for cryptobert (model-made labels, not human-verified). On four human-labelled public sets it is ahead of cryptobert on raw input on three and level on the fourth; against cryptobert with its own preprocessing the picture is mixed (table below). - **What it does not beat**: a general multilingual tone model scores higher than this model on 3 of the 4 human-labelled sets. If you do not need cryptobert's label contract, read the evaluation before choosing. - **Weak on Bearish**: recall for Bearish is 22% on real posts. See the limitations. - **Calibrated**: a temperature is baked into the classifier head, so the scores are calibrated with no extra code. - **Runs anywhere**: PyTorch, ONNX (`onnx/model.onnx` fp32, `onnx/model_fp16.onnx`, `onnx/model_quantized.onnx` with int8 embeddings), transformers.js. Requires `transformers >= 4.48` (ModernBERT architecture). It is not a RoBERTa model: code that loads cryptobert through the `Auto*` classes works unchanged; code that names `RobertaForSequenceClassification` or `RobertaTokenizer` directly must switch to the `Auto*` classes. ## Quick start ### As a cryptobert replacement This is the snippet from cryptobert's model card. Only `model_name` and the example posts are changed. ```python from transformers import TextClassificationPipeline, AutoModelForSequenceClassification, AutoTokenizer model_name = "freeweight/crypto-sentiment-small" # was "ElKulako/cryptobert" tokenizer = AutoTokenizer.from_pretrained(model_name, use_fast=True) model = AutoModelForSequenceClassification.from_pretrained(model_name, num_labels=3) pipe = TextClassificationPipeline(model=model, tokenizer=tokenizer, max_length=64, truncation=True, padding='max_length') post_1 = "loaded another bag of $QFX at 0.42, not selling a single one until 2 🚀" post_2 = "sold everything. this market is cooked, see you 40% lower" post_3 = "should I buy QFX now or wait for a pullback?" preds = pipe([post_1, post_2, post_3]) print(preds) # [{'label': 'Bullish', 'score': ...}, {'label': 'Bearish', 'score': ...}, {'label': 'Neutral', 'score': ...}] ``` We tested exactly this call (64 tokens, `padding='max_length'`): the label maps are identical to cryptobert's and the pipeline output equals a plain forward pass on all 200 checked items. You do not need cryptobert's preprocessing (lowercasing, removing URLs, @users, cashtags and hashtags). Give the model the raw post. Lowercased input still works: on the real-world test the snippet scores 52.8 macro-F1 with raw input and 52.7 lowercased; on TFNS-val 51.7 raw and 49.7 lowercased. ### Plain pipeline ```python from transformers import pipeline clf = pipeline("text-classification", model="freeweight/crypto-sentiment-small") clf("$QFX 这波反弹就是诱多,我已经全部清仓了,等 0.2 再说 📉") # [{'label': 'Bearish', 'score': ...}] clf("QFX'te düşüşü fırsat bildim, biraz daha ekledim. Hedef 1 dolar 🚀", top_k=3) # all three labels with scores ``` The examples on this page use invented token names. ### ONNX Runtime ```python import numpy as np import onnxruntime as ort from huggingface_hub import hf_hub_download from transformers import AutoConfig, AutoTokenizer repo = "freeweight/crypto-sentiment-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(["Vendí todo mi $NRTH, esto es un rebote del gato muerto y se va a 0,10"], truncation=True, max_length=128, 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 ```js import { pipeline } from "@huggingface/transformers"; const clf = await pipeline("text-classification", "freeweight/crypto-sentiment-small", { dtype: "q8" }); const out = await clf("QFX 지금 사도 될까요, 아니면 조정을 기다려야 할까요?"); ``` Use `dtype: "fp16"` or `dtype: "fp32"` for the other two files. ### Files | File | Size | Label agreement with PyTorch fp32 | CPU median per item | |---|---|---|---| | `model.safetensors` (PyTorch, fp32) | 563 MB | reference | 91 ms | | `onnx/model.onnx` (fp32) | 563 MB | 1.000 | 67 ms | | `onnx/model_fp16.onnx` | 282 MB | 1.000 | 71 ms | | `onnx/model_quantized.onnx` (int8 on the embedding table only) | 268 MB | 0.997 | 66 ms | Agreement was measured on 1,000 real-test items. Latency is the median per item on 8 CPU threads at about 51 tokens. ## Labels | Id | Label | The author ... | |---|---|---| | 0 | `Bearish` | expects, hopes for or positions for the price of the main asset to go **down** | | 1 | `Neutral` | takes neither side, or both sides equally | | 2 | `Bullish` | expects, hopes for or positions for the price of the main asset to go **up** | The label is the author's **stance** on the price, not the emotional tone of the post. How boundary cases are decided (the model was trained and evaluated with these rules): - **Action beats words.** What the author did or will do with their own position decides, even against the tone. "Great news, I just opened a short" is `Bearish`. "Down 70% and hate this, but I'm buying more" is `Bullish`. "Took profit on everything, sitting in stables" is `Bearish`. - **Main asset.** The stance is toward the asset the post is mostly about. "Crypto", "the market" and "alts" count as an asset. - **Weak or hedged stances still count** ("might bounce a bit from here" is `Bullish`). - **Conditionals.** One-sided ("if 60k breaks, 50k next") takes that side; two-sided is `Neutral`. - **Neutral** covers genuine questions, bare price or volume figures, giveaways, referral and bot spam, tutorials, greetings, off-topic chatter, and complaints about a loss with no position or expectation. - **Sarcasm.** The intended stance counts: "sure, to 10k next week 🤡" is `Bearish`. - **Quoted opinions.** The author's stance counts, not the one they quote. - **Scam warnings.** A warning that a named token is a rug or scam is `Bearish`; a generic warning is `Neutral`; a post that pumps a token is `Bullish` (the label is the stance of the text, not a judgement of it). - **Headlines with no author comment** are `Bearish` or `Bullish` only when the market reading is unambiguous (a hack with stolen funds, a withdrawal halt, a delisting from a major exchange; a spot ETF approval, a listing on a major exchange). Partnerships, upgrade dates, hearings, unlock schedules and price-data relays are `Neutral`. - **Too short or unclear** is `Neutral`. A label is not a judgement of whether the post is true, and it is not a trading signal. ## Evaluation (checked November 2026) All numbers were computed by us. They are **macro-F1 in percent**; brackets are 95% bootstrap intervals; "acc" is accuracy. Differences are this model minus the other model on the same items (paired bootstrap). Models compared: - **cryptobert**: `ElKulako/cryptobert`, shown twice: with the raw post, and with its own preprocessing (lowercased; URLs, @users, cashtags and hashtags removed). - **General tone models**: `Horizon-Labs/multilingual-sentiment-base` and `cardiffnlp/twitter-xlm-roberta-base-sentiment` (XLM-T). They predict negative, neutral or positive tone. We mapped negative to Bearish and positive to Bullish. They were not built for this label scheme, so this is a proxy. - **FinTwitBERT**: `StephanAkkerman/FinTwitBERT-sentiment`, an English finance-tweet stance model. ### Human-labelled sets These four sets were labelled by people, and none of their text was used in training. They are the firmest evidence on this page. | Set (items) | This model | cryptobert, raw input | cryptobert, own preprocessing | Horizon-Labs base (tone) | XLM-T (tone) | FinTwitBERT | |---|---|---|---|---|---|---| | TFNS-val, English finance tweets (2,388) | 51.7 [49.3–54.0], acc 63.0 | 36.6, acc 60.2 | 40.7, acc 59.8 | 54.6, acc 67.3 | 46.5, acc 59.7 | **79.5** (trained on TFNS) | | FiQA-2018 posts, English (722) | 48.6 [45.4–51.8], acc 56.1 | 33.1, acc 34.9 | 45.6, acc 50.8 | 38.5, acc 41.6 | 31.1, acc 31.2 | **62.7** (its training mix includes FiQA) | | Surge crypto, English, Bullish and Bearish only (552) | 73.4 [69.9–76.9] | 72.5 | 77.6 | 83.2 | 73.9 | **89.3** | | Polish crypto tweets, 3 annotators (320) | 49.4 [43.1–55.7], acc 57.5 | 37.5 | 37.5 | **55.4** | 50.4 | 21.7 | Surge has only Bullish and Bearish gold labels; its scores are over those two classes. Difference to cryptobert (this model minus cryptobert): | Set | vs cryptobert, raw input | vs cryptobert, own preprocessing | |---|---|---| | TFNS-val | +15.1 [+12.2, +18.2] | +11.0 [+7.9, +14.2] | | FiQA posts | +15.6 [+11.7, +19.6] | +3.0 [−0.7, +6.5] | | Surge | +0.9 [−3.4, +5.5] | −4.3 [−8.5, +0.3] | | Polish | +11.9 [+4.1, +19.9] | +11.9 | How to read this: - **Against cryptobert fed raw text**, this model is clearly ahead on TFNS-val, FiQA posts and Polish, and level on Surge. - **Against cryptobert with its own preprocessing**, only TFNS-val and Polish are clear wins. FiQA is a tie within the interval, and on Surge cryptobert is ahead by 4.3 points, with an interval that just reaches zero. - **A general multilingual tone model scores higher than this model on 3 of the 4 sets.** `Horizon-Labs/multilingual-sentiment-base` is ahead on TFNS-val, Surge and Polish; XLM-T is ahead on Surge and Polish. On these sets tone and stance mostly coincide, and a tone model needs no crypto-specific training to do well. This model is ahead of both only on FiQA posts. - **FinTwitBERT is ahead on all three English sets**, two of which overlap with its training data, and far behind on Polish. - **If you do not need cryptobert's label contract, a general tone model may serve you as well for English.** What this model offers is the exact cryptobert labels, a stance definition rather than tone, and the multilingual results below. ### Real-world multilingual test Posts from 2026-08-01 to 2026-11-18, collected from Bluesky and public Telegram channels in 14 languages. **Read this first: these labels are made by models, not by people.** Two open models from different families (gpt-oss-120b and gemma-4-31B-it) labelled every post independently with the same written guideline. Nothing was verified by a human. Agreement between the two (Cohen's κ) is 0.60, which is moderate: stance is hard to label. **gpt-oss-120b also filtered the training rows.** It is half of the test labelling and also part of training. The gemma-only view is therefore the cautious one: gemma-4-31B-it had no part in training. - **Agreed labels**: a test set of 5,424 posts (61% Neutral) on which both labellers agree. The 2,066 posts on which they disagree (19% of the pool) are left out, which removes the hardest posts and flatters every model. - **Gemma-only labels**: gemma-4-31B-it's label on 9,909 posts in their natural mix (66% Neutral). | View (items) | This model | Horizon-Labs base (tone) | XLM-T (tone) | cryptobert, raw input | cryptobert, own preprocessing | |---|---|---|---|---|---| | Agreed labels (5,424) | **51.9** [50.3–53.4], acc 64.2 | 41.7 [40.3–43.2] | 40.3 [38.9–41.7] | 33.5 [32.3–34.7] | 34.5 | | Gemma-only labels (9,909) | **48.1** [46.9–49.3], acc 64.5 | 42.1 [40.9–43.2] | 38.9 [37.9–40.0] | 34.6 [33.7–35.5] | not run | The lead over the Horizon-Labs tone model is +10.2 [+8.2, +12.1] on agreed labels and shrinks to +6.0 on gemma-only labels. An absolute score near 50 is modest: about half of the directional posts are still mislabelled (per-class table below). ### Per language, agreed labels | Language (items) | This model | Horizon-Labs base (tone) | XLM-T (tone) | cryptobert | |---|---|---|---|---| | en (529) | **53.9** | 50.1 | 47.5 | 35.9 | | zh (482) | **48.9** | 32.8 | 34.5 | 26.0 | | ko (495) | **42.7** | 25.0 | 25.5 | 30.8 | | ja (479) | **50.1** | 48.4 | 44.4 | 31.0 | | tr (501) | **59.3** | 31.7 | 34.5 | 31.5 | | es (492) | **47.6** | 44.8 | 42.8 | 31.3 | | ru (537) | **50.0** | 44.0 | 38.6 | 26.6 | | pt (506) | **53.8** | 42.6 | 44.8 | 30.4 | | vi (185) | 41.5 | **51.4** | 45.3 | 29.7 | | de (260) | **56.7** | 51.4 | 38.5 | 33.5 | | fr (217) | **46.8** | 44.6 | 37.7 | 38.9 | | nl (218) | **53.8** | 43.4 | 39.4 | 30.3 | | pl (161) | **34.1** | 27.0 | 21.1 | 23.8 | | uk (155) | **41.1** | 33.0 | 39.8 | 33.1 | - Per-language intervals are wide: about ±5 points at 500 items and ±8 at 160. Small gaps in this table mean nothing. - **It loses on Vietnamese** to both tone models (41.5 against 51.4 and 45.3). - **It is roughly level with the Horizon-Labs tone model on Japanese, Spanish and French.** - Polish (34.1), Ukrainian (41.1), Vietnamese (41.5) and Korean (42.7) are the weakest languages. - Languages with fewer than 150 real posts are not reported. That includes it, id, ar, fa, th and hi. ### Per class | Class | Agreed labels: precision / recall / F1 (items) | Gemma-only labels: precision / recall / F1 | |---|---|---| | Bearish | 49.7 / **22.1** / 30.6 (1,297) | 39.2 / 20.7 / 27.1 | | Neutral | 67.7 / 85.3 / 75.5 (3,321) | not computed | | Bullish | 54.7 / 45.2 / 49.5 (806) | 45.4 / 36.3 / 40.4 | The model finds about one in five Bearish posts and under half of the Bullish ones. Most misses are called Neutral. ### Calibration One temperature (T = 5.75) was fitted on a separate dev set of 801 real posts and baked into the classifier head: weight and bias are divided by T. Before this the model was strongly overconfident on real text. `pipeline()` and all three ONNX files return the calibrated scores, and the predicted label is unchanged. Expected calibration error on the agreed real-world test: 0.139 before, 0.069 after. We also tried shifting the class prior toward the real-world mix (about 70% Neutral on the dev set against 34% in training). It made macro-F1 worse on held-out dev data, so it is not applied. ## Limitations and where it loses - **Bearish recall is 22%.** On real posts the model finds only about one Bearish post in five (precision 49.7). Real bearish posts are often news relays of hacks, delistings and liquidations, and the model calls them Neutral. Do not use this model alone to detect negative sentiment or to count bearish posts; a count of its Bearish outputs undercounts heavily. - **A general tone model scores higher on 3 of the 4 human-labelled sets** (TFNS-val, Surge, Polish). On English text where tone and stance coincide, this model has no measured advantage over `Horizon-Labs/multilingual-sentiment-base`. - **Against cryptobert with its own preprocessing, the English lead is small or absent**: a clear win on TFNS-val, a tie on FiQA posts, and behind on Surge. - **Platform style.** No social-media text was used in training, and the real-world test covers Bluesky and public Telegram channels only. We publish no score for the trader-platform posts with self-tagged sentiment that cryptobert was trained on; expect a model trained on that text to keep an advantage there. - **The real-world test is not human-verified.** Its labels come from two model families that agree only moderately (κ 0.60). A part of every error count is label noise, in either direction. - **The training filter and the test share a judge** (gpt-oss-120b). Use the gemma-only number, 48.1, as the cautious one. - **The agreed-labels test is easier than real traffic.** It leaves out the 19% of posts on which the labellers disagree. - **Synthetic-to-real gap.** All training text is synthetic. On held-out synthetic text the model scores 98.0; on the real dev set 53.5. Real writing that looks nothing like the synthetic data loses accuracy. - **Bullish is also often missed**: recall 45.2 on agreed labels, 36.3 on gemma-only labels. - **It loses on Vietnamese**, and is level with a tone model on Japanese, Spanish and French. - **Six trained languages have no real-world evaluation**: it, id, ar, fa, th and hi. Treat results there as unknown. Languages outside the training set are untested. - **Calibration is better, not perfect**: ECE 0.069 after calibration. - **Short posts only.** Trained at up to 128 tokens and evaluated at 64 and 128. Longer text is accepted by the tokenizer but untested. - **One label per post**, for the main asset. A second asset with a different stance is not reported. - **Small size only.** There is no base-size version. - **Not investment advice.** The model labels the stance a post expresses. It does not judge whether the post is true, who wrote it, or what any price will do. ## Training data and licences 209,717 training rows (plus 6,476 for validation) in 20 languages. **All training text is synthetic.** | Source | Used as | Licence | |---|---|---| | Synthetic posts written by Qwen3.8-27B from seed lists (no real post was used as a seed) | Training text. A row was kept only when the intended label, a second pass by the same model and gpt-oss-120b's label all agree | Model output; model licence Apache-2.0 | | [`jhu-clsp/mmBERT-small`](https://huggingface.co/jhu-clsp/mmBERT-small) | Base model | MIT | - 8% of the generated rows were dropped because the three labels did not agree. - Not used in training: text from StockTwits, X, Reddit, Telegram or any other social platform; data under non-commercial licences; output of gemma-4-31B-it (kept apart so it can serve as an independent test labeller). - The label names and ids follow `ElKulako/cryptobert` for compatibility. No cryptobert weights, data or outputs were used. **Keeping training apart from the test:** - Near-duplicates within training were removed by MinHash (Jaccard 0.8). - Training rows that resemble any evaluation item or any worked example in the labelling guideline were removed (Jaccard 0.6; 162 rows). - The checkpoint and the temperature were chosen with a separate dev set of 801 real posts, disjoint from the test. **Training:** 2 epochs, max length 128 tokens, learning rate 5e-5. The checkpoint was selected on the mean macro-F1 over the synthetic validation set and the real dev set. ## Evaluation protocol - **Guideline.** One written guideline defines the three labels, the edge rules above and worked examples. Both labellers read it. The worked examples were never shown to the generator of the training text. - **Gold labels, real-world test.** gpt-oss-120b and gemma-4-31B-it label every post independently. The agreed view keeps the posts where they agree. The 2,066 disagreements are not adjudicated yet and are in no reported score except the gemma-only view. - **Human-labelled sets** are public datasets used for evaluation only, with their original labels mapped by name. - **Other models' labels are mapped by name**, never by index. Tone models: negative to Bearish, neutral to Neutral, positive to Bullish. - **Intervals.** 95% bootstrap; differences use 1,000 paired resamples. - **Real-world test text is not published.** It belongs to its authors. - **Latency.** Median per item on CPU. ## Changelog - **v1** (2026-11): first release. Calibrated head, ONNX fp32, fp16 and int8-embedding files.