Text Classification
Transformers
Safetensors
English
qwen3
text-generation
qwen
decision-model
finance
wealth-management
sec-filings
news
central-banks
calibration
lora
jev
text-embeddings-inference
Instructions to use ternary/Arbiter-8B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ternary/Arbiter-8B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="ternary/Arbiter-8B")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("ternary/Arbiter-8B") model = AutoModelForCausalLM.from_pretrained("ternary/Arbiter-8B", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download questions.py from ternary/Arbiter-8B: direct link, hf CLI and curl.
- Browser
- Download file 16.4 kB
-
https://huggingface.co/ternary/Arbiter-8B/resolve/main/questions.py
- Command line
-
hf download hf://ternary/Arbiter-8B/questions.py
-
curl -L -o questions.py https://huggingface.co/ternary/Arbiter-8B/resolve/main/questions.py
16.4 kB
| """Shared NewsDecisions question definitions (keep option sets fixed across the dataset). | |
| Change log: | |
| - 2026-10-20 EVENT_TYPE: added ``analyst_opinion`` (opinion, analysis, valuation, stock-screen pieces). | |
| - 2026-10-22 EVENT_TYPE: ``financial_results`` narrowed to results that already happened; added | |
| ``company_guidance`` for the company's own forward-looking forecasts; earnings previews and analyst | |
| estimates moved to ``analyst_opinion``. | |
| - 2026-10-22 OUTLOOK: now the outlook the article implies (improved / worsened / unchanged / unclear), | |
| instead of an explicitly stated outlook change. | |
| - 2026-10-22 CERTAINTY: now how settled the outcome is, on four levels; new level 1 "open or contested" | |
| for lawsuits, allegations, investigations and offers whose outcome is undecided. | |
| - 2026-10-22 EVENT_TYPE: a company forecast reported against analyst estimates ("sees X vs $Y Est") | |
| is ``analyst_opinion``; ``company_guidance`` is the company's own guidance action (raise, lower, | |
| affirm, targets). | |
| - 2026-10-22 CERTAINTY: 3 only when the substance has happened; announced or signed agreements, | |
| partnerships and contracts are 2; announced plans, intentions or progress are 1. | |
| - 2026-10-25 OUTLOOK: require a net call. "unclear" now means the text gives no outlook signal at all; | |
| when signals conflict, the instruction asks for the direction of the stronger, more material signal | |
| (previously conflicting signals were "unclear"). Shared by news (entity_event) and filings (filing_outlook). | |
| Votes cast on an older definition are marked stale; reviews are re-queued unless the author's re-check | |
| under the new definitions reaches the same label. | |
| """ | |
| import hashlib | |
| import json | |
| def option_set_id(question: dict) -> str: | |
| """Short fingerprint of a question's options, recorded with every model vote.""" | |
| return hashlib.sha1(json.dumps(question["criteria"], sort_keys=True).encode()).hexdigest()[:10] | |
| EVENT_TYPE = { | |
| "type": "choice", | |
| "instructions": "What is the primary event category reported about the focus company? Choose only what the supplied text supports.", | |
| "criteria": { | |
| "corporate_action": "A merger, acquisition, divestiture, or other ownership transaction.", | |
| "financial_results": "Reported financial results for a completed period: earnings, revenue, margins, or other performance that has already happened.", | |
| "company_guidance": "The company's own guidance action: raising, lowering or affirming its guidance, or setting financial targets.", | |
| "product_operations": "A product launch, production, hiring, facility, contract, or operating activity.", | |
| "analyst_action": "An analyst rating or price-target change.", | |
| "analyst_opinion": "A published analysis, opinion, valuation, estimate, earnings preview, or stock-screen piece about the company, including a company forecast reported against analyst estimates, without a rating or price-target change.", | |
| "market_move": "A reported share-price or trading move.", | |
| "legal_safety": "A lawsuit, regulatory action, investigation, accident, or safety event.", | |
| "industry_macro": "A sector-wide, economic, financing-market, or industry development.", | |
| "insufficient_evidence": "The supplied text does not support one primary category.", | |
| }, | |
| } | |
| ROLE = { | |
| "type": "choice", | |
| "instructions": "What role does the focus entity play in the announced transaction?", | |
| "criteria": { | |
| "acquirer": "The entity is buying another organization.", | |
| "target": "The entity is being acquired.", | |
| "regulator": "The entity is reviewing or approving the deal.", | |
| "mentioned_only": "The entity is mentioned but has none of these transaction roles.", | |
| }, | |
| } | |
| OUTLOOK = { | |
| "type": "choice", | |
| "instructions": "What does the article imply about the focus entity's business outlook? Use the signals in the text, such as results, guidance, analyst views, deals, restructuring or expansion. A share-price move on its own is not a signal. If the signals conflict, choose the direction of the stronger, more material signal.", | |
| "criteria": { | |
| "improved": "The article's signals point to a better or more favorable outlook.", | |
| "worsened": "The article's signals point to a worse or less favorable outlook.", | |
| "unchanged": "The article's signals point to an outlook that has not changed, such as reaffirmed guidance or a maintained rating or target.", | |
| "unclear": "The article gives no signal about the outlook.", | |
| }, | |
| } | |
| CERTAINTY = { | |
| "type": "score", | |
| "instructions": "How settled is the outcome of the primary reported event involving the focus company, according to the text?", | |
| "criteria": { | |
| "0": "Speculative: rumoured, reported by unnamed sources, unconfirmed, or denied.", | |
| "1": "Open or only announced: a lawsuit, allegation, investigation, claim or offer has been made, or a plan, intention or progress has only been announced; the outcome is undecided.", | |
| "2": "Committed but not realised: an agreement, partnership, contract or deal is signed or announced, or a facility or programme is set up, or an event is scheduled, but its substance (closing, delivery, operations) has not happened yet.", | |
| "3": "Realised: the substance has happened, such as a closed deal, a shipped or available product, operations running, reported results, a delivered verdict, or a share move that occurred.", | |
| }, | |
| } | |
| MAIN_SUBJECT = { | |
| "type": "noul", | |
| "instructions": "Is the focus entity the main subject of the reported event, rather than a side mention?", | |
| "criteria": { | |
| "true": "The reported event is primarily about the focus entity.", | |
| "false": "The focus entity is mentioned, but the event is primarily about another entity or the wider market.", | |
| }, | |
| } | |
| # question kind -> (family, question definition) | |
| QUESTIONS = { | |
| "type": ("news_event_type", EVENT_TYPE), | |
| "role": ("event_role", ROLE), | |
| "outlook": ("entity_event", OUTLOOK), | |
| "certainty": ("entity_event", CERTAINTY), | |
| "main": ("event_role", MAIN_SUBJECT), | |
| } | |
| # --- Form 10-K questions (state = one verbatim filing chunk with its "[TICKER 10-K FY | Item]" header) --- | |
| FILING_RISK = { | |
| "type": "choice", | |
| "instructions": "Which risk category does this risk-factor passage mainly describe for the focus company?", | |
| "criteria": { | |
| "competition": "Competitive pressure, pricing, market share, or new entrants.", | |
| "regulation_policy": "Laws, regulation, government policy, taxes, tariffs, or trade restrictions.", | |
| "legal_ip": "Litigation, legal claims, or protection of intellectual property.", | |
| "supply_chain_operations": "Suppliers, manufacturing, logistics, facilities, or operational disruption.", | |
| "cybersecurity_data": "Cyberattacks, data security or privacy, or failures of information systems.", | |
| "financial_liquidity": "Debt, financing, liquidity, capital needs, or the company's own financial condition.", | |
| "macro_external": "Economic conditions, demand cycles, inflation, interest or currency rates, geopolitics, natural disasters, or pandemics.", | |
| "people_governance": "Key personnel, labor, internal controls, governance, or share ownership and stock price.", | |
| "product_technology": "Product development, technological change, product quality, or market acceptance of products.", | |
| "other_unclear": "None of the categories fits, or the passage covers several equally.", | |
| }, | |
| } | |
| FILING_LEGAL = { | |
| "type": "score", | |
| "instructions": "How settled is the outcome of the legal matter involving the focus company described in this passage?", | |
| "criteria": { | |
| "0": "Possible or threatened: a claim may be brought, or the company cannot predict whether proceedings will arise.", | |
| "1": "Open or contested: a lawsuit, investigation or claim is pending, and its outcome is undecided.", | |
| "2": "Resolution agreed but not final: a settlement or resolution is agreed and awaits approval, payment or completion.", | |
| "3": "Resolved: dismissed, finally settled, or decided with a final judgment.", | |
| }, | |
| } | |
| GOING_CONCERN = { | |
| "type": "noul", | |
| "instructions": "Does the passage state that there is substantial doubt about the focus company's ability to continue as a going concern?", | |
| "criteria": { | |
| "true": "The passage states that substantial doubt exists, according to management or the auditor.", | |
| "false": "The passage does not state such doubt, or says the doubt does not exist or has been alleviated.", | |
| }, | |
| } | |
| CUSTOMER_CONCENTRATION = { | |
| "type": "noul", | |
| "instructions": "Does the passage state that a single customer accounted for 10% or more of the focus company's revenue?", | |
| "criteria": { | |
| "true": "The passage states that one customer accounted for 10% or more of revenue in a reported period.", | |
| "false": "The passage does not state that any single customer reached 10% of revenue.", | |
| }, | |
| } | |
| CYBER_INCIDENT = { | |
| "type": "noul", | |
| "instructions": "Does the passage report that the focus company experienced a material cybersecurity incident?", | |
| "criteria": { | |
| "true": "The passage reports a cybersecurity incident that materially affected, or is reasonably likely to materially affect, the company.", | |
| "false": "The passage reports no such incident, including statements that no material incident has occurred.", | |
| }, | |
| } | |
| FILING_QUESTIONS = { | |
| "risk": ("filing_risk", FILING_RISK), | |
| "legal": ("filing_legal", FILING_LEGAL), | |
| "outlook": ("filing_outlook", OUTLOOK), | |
| "going_concern": ("filing_flags", GOING_CONCERN), | |
| "customer": ("filing_flags", CUSTOMER_CONCENTRATION), | |
| "cyber": ("filing_flags", CYBER_INCIDENT), | |
| } | |
| # --- v5 (next-stage.md): definition-following data --------------------------------------------------- | |
| # The *_ORIGINAL questions are word for word the ones in the Arbiter-Test benchmark converters | |
| # (edt_to_jsonl.py, fomc_to_jsonl.py, sentfin_to_jsonl.py); the *_TIGHT ones are the rewritten | |
| # definitions that state each benchmark's labelling convention. Benchmarks are scored under both; | |
| # the gap shows whether the model follows the definition it is given. Option ids never change. | |
| EDT_ENTITY = "the company that issued the news article" | |
| EDT_INSTRUCTIONS = f"What type of corporate event does the news article announce? Focus entity: {EDT_ENTITY}." | |
| EDT_ORIGINAL = { | |
| "type": "choice", | |
| "instructions": EDT_INSTRUCTIONS, | |
| "criteria": { | |
| "acquisition": "the company agrees to acquire, or completes the acquisition of, another company, business or asset", | |
| "clinical_trial": "the company reports the start, progress or results of a clinical trial", | |
| "regular_dividend": "the company declares its regular, unchanged dividend", | |
| "dividend_cut": "the company cuts, suspends or eliminates its dividend", | |
| "dividend_increase": "the company raises its dividend", | |
| "guidance_change": "the company raises or changes its financial guidance or outlook", | |
| "new_contract": "the company wins or signs a new contract, order or customer agreement", | |
| "reverse_stock_split": "the company announces a reverse stock split", | |
| "special_dividend": "the company declares a special or one-time dividend", | |
| "stock_repurchase": "the company announces or expands a share buyback programme", | |
| "stock_split": "the company announces a (forward) stock split", | |
| "none": "the article announces none of the events above", | |
| }, | |
| } | |
| EDT_TIGHT = { | |
| "type": "choice", | |
| "instructions": EDT_INSTRUCTIONS, | |
| "criteria": { | |
| **EDT_ORIGINAL["criteria"], | |
| "acquisition": "the company agrees to acquire, or completes the acquisition of, another company, business or asset; minority investments, financings, joint ventures and sales of a business or asset (divestitures) are not acquisitions", | |
| "clinical_trial": "the company reports the start, progress or results of a clinical trial, or a regulatory approval, clearance or authorisation of a drug, device or test", | |
| "dividend_cut": "the company cuts, suspends or eliminates its dividend or another shareholder payout, including suspending a share buyback", | |
| "new_contract": "the company wins or signs a new contract, order or customer agreement; partnerships, collaborations, sponsorships, and distribution or licensing agreements are not new contracts", | |
| "stock_repurchase": "the company announces or expands a share buyback programme (suspending one is a dividend_cut)", | |
| "none": "the article announces none of the events above, for example a partnership, sponsorship, minority investment, financing, divestiture, patent award, product launch or appointment", | |
| }, | |
| } | |
| # Contrast definitions: one option changed so the same article's answer changes. | |
| EDT_STRICT_TRIAL = {**EDT_ORIGINAL, "criteria": { | |
| **EDT_ORIGINAL["criteria"], | |
| "clinical_trial": "the company reports the start, progress or results of a clinical trial; a regulatory approval, clearance or authorisation is not a clinical-trial event", | |
| }} | |
| EDT_INCLUSIVE_CONTRACT = {**EDT_ORIGINAL, "criteria": { | |
| **EDT_ORIGINAL["criteria"], | |
| "new_contract": "the company wins or signs a new contract, order or customer agreement, including a partnership, collaboration, sponsorship, alliance, or distribution or licensing agreement", | |
| }} | |
| FOMC_INSTRUCTIONS = "What monetary policy stance does the sentence express? Focus entity: Federal Reserve (FOMC)." | |
| FOMC_ORIGINAL = { | |
| "type": "choice", | |
| "instructions": FOMC_INSTRUCTIONS, | |
| "criteria": { | |
| "hawkish": "points towards tighter monetary policy, such as higher rates or concern about inflation", | |
| "neutral": "no clear lean towards tighter or looser policy", | |
| "dovish": "points towards looser monetary policy, such as lower rates or concern about growth and employment", | |
| }, | |
| } | |
| FOMC_TIGHT = { | |
| "type": "choice", | |
| "instructions": FOMC_INSTRUCTIONS, | |
| "criteria": { | |
| "hawkish": "points towards tighter monetary policy: higher rates or less accommodation, inflation described as high, rising or a risk, or growth and employment described as strong or overheating", | |
| "neutral": "no lean towards tighter or looser policy: a procedural or factual statement, or a mention of inflation or the economy that describes neither upward nor downward pressure", | |
| "dovish": "points towards looser monetary policy: lower rates or more accommodation, inflation described as subdued, muted, low or below target, or growth and employment described as weak or at risk", | |
| }, | |
| } | |
| SENTIMENT_ORIGINAL = { | |
| "type": "choice", | |
| "instructions": "What sentiment toward the company does the headline express?", | |
| "criteria": { | |
| "positive": "the headline is favourable for the entity", | |
| "neutral": "the headline is neither favourable nor unfavourable for the entity", | |
| "negative": "the headline is unfavourable for the entity", | |
| }, | |
| } | |
| SENTIMENT_IMPLIED = { | |
| "type": "choice", | |
| "instructions": "What do the facts in the headline imply for the focus entity? Judge what is reported, not only the wording: a profit, an approval, a new order or a dividend is favourable even when the headline states no direction.", | |
| "criteria": { | |
| "positive": "the reported facts are favourable for the entity", | |
| "neutral": "the reported facts imply nothing favourable or unfavourable for the entity", | |
| "negative": "the reported facts are unfavourable for the entity", | |
| }, | |
| } | |
| SENTIMENT_STATED = { | |
| "type": "choice", | |
| "instructions": "What sentiment toward the focus entity does the headline itself state? Count only a direction the headline expresses for that entity, such as a rise or fall, a beat or miss, a comparison with an earlier period, an upgrade or downgrade, a win or loss, praise or criticism.", | |
| "criteria": { | |
| "positive": "the headline states a favourable direction for the entity", | |
| "neutral": "the headline states no direction for the entity, for example a factual report of a corporate action or a figure without a comparison: a profit figure, a dividend or bonus declaration, an appointment, an IPO filing or a regulatory approval", | |
| "negative": "the headline states an unfavourable direction for the entity", | |
| }, | |
| } | |