ProsusAI/finbert
Xenova/finbert
text-classification
ProsusAI/finbert is
licensed under CC-BY-NC-SA-4.0 (non-commercial, share-alike). Scores reflect Financial
PhraseBank linguistic tone only ā NOT financial, trading, or investment advice.
1. Live FinBERT Sentiment & Raw Logit Inspector
Select a financial headline or earnings excerpt, drag & drop or paste (Ctrl/Cmd+V) text, or type your own:
.txt, .csv, .json, or .md file here, or press
Ctrl/Cmd+V anywhere on the page. Inference runs locally in a Web Worker.
3-Class FinBERT Probability Distribution
Raw Logits, Lexicon Drift & Signal Notes
config.id2label: 0: positive,
1: negative, 2: neutral.
See Inside: BERT Uncased WordPiece Tokens (30,522 vocab Ā· do_lower_case: true)
[CLS], WordPiece ## splits, and [SEP] tokens.
2. Architecture & How the Transformers.js API Works
Pre-trained by ProsusAI on the Reuters TRC2-financial corpus and fine-tuned on Malo et al.ās Financial
PhraseBank, FinBERT uses a full 12-layer BERT encoder (bert-base-uncased) instead of a
6-layer distilled student ā preserving deeper syntactic context for long SEC and earnings prose.
import { pipeline } from "https://cdn.jsdelivr.net/npm/@huggingface/transformers@3.7.5";
const classifier = await pipeline("text-classification", "Xenova/finbert", {
device: "wasm",
dtype: "q8",
});
const scores = await classifier("Stocks rallied and the British pound gained.", { top_k: 3 });