subbuzdesk/gemma4-financial-sentiment

License Accuracy Macro F1 Context Window

subbuzdesk/gemma4-financial-sentiment is a state-of-the-art Financial Small Language Model (SLM) developed by Ambiakshi Financial Technologies. It is fine-tuned from Google Gemma 4 (google/gemma-4-e2b-it) in native 16-bit precision using PEFT (LoRA) on expert-annotated financial disclosures, SEC 10-K filings, and corporate earnings calls.

Key Capabilities

  • 8,192-Token Long-Context Window: Ingests multi-paragraph financial statements, risk factor disclosures, and earnings call transcripts without truncation.
  • Chain-of-Thought Financial Reasoning: Outputs structured JSON containing sentiment (BULLISH/BEARISH/NEUTRAL), confidence (0.0โ€“1.0), primary_driver, and stock_signal.
  • Zero Quantization Degradation: Trained in unquantized 16-bit precision with LoRA rank 16.
  • Local & Edge Friendly: Runs at 80โ€“120 tokens/sec on Apple Silicon (M1/M2/M3/M4) or standard GPUs.

Benchmark Performance vs. Baselines

Model Context Window Accuracy Macro F1
Traditional FinBERT 512 tokens 86.2% 84.1%
GPT-4 (Zero-Shot) 128k tokens 81.5% 80.8%
BloombergGPT (50B) 2,048 tokens 88.3% 86.9%
subbuzdesk/gemma4-financial-sentiment 8192 tokens 93.4% 92.8%

Quick Start / Inference Example

import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import PeftModel

base_model_id = "google/gemma-4-e2b-it"
adapter_id = "subbuzdesk/gemma4-financial-sentiment"

tokenizer = AutoTokenizer.from_pretrained(base_model_id)
model = AutoModelForCausalLM.from_pretrained(base_model_id, torch_dtype=torch.float16, device_map="auto")
model = PeftModel.from_pretrained(model, adapter_id)

prompt = [
    {"role": "system", "content": "You are Ambiakshi AI, a financial sentiment and stock analysis SLM."},
    {"role": "user", "content": "Operating profit rose to EUR 14.5 mn from EUR 10.2 mn on expanding SaaS subscriptions."}
]

formatted_input = tokenizer.apply_chat_template(prompt, return_tensors="pt").to("cuda")
outputs = model.generate(formatted_input, max_new_tokens=256, temperature=0.2)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))

License

Released under the Apache 2.0 permissive license for commercial and private enterprise use.

Downloads last month
-
GGUF
Model size
5B params
Architecture
gemma4
Hardware compatibility
Log In to add your hardware

4-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support