Instructions to use subbuzdesk/gemma4-financial-sentiment with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use subbuzdesk/gemma4-financial-sentiment with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use subbuzdesk/gemma4-financial-sentiment with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf subbuzdesk/gemma4-financial-sentiment:Q4_K_M # Run inference directly in the terminal: llama cli -hf subbuzdesk/gemma4-financial-sentiment:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf subbuzdesk/gemma4-financial-sentiment:Q4_K_M # Run inference directly in the terminal: llama cli -hf subbuzdesk/gemma4-financial-sentiment:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf subbuzdesk/gemma4-financial-sentiment:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf subbuzdesk/gemma4-financial-sentiment:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf subbuzdesk/gemma4-financial-sentiment:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf subbuzdesk/gemma4-financial-sentiment:Q4_K_M
Use Docker
docker model run hf.co/subbuzdesk/gemma4-financial-sentiment:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use subbuzdesk/gemma4-financial-sentiment with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "subbuzdesk/gemma4-financial-sentiment" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "subbuzdesk/gemma4-financial-sentiment", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/subbuzdesk/gemma4-financial-sentiment:Q4_K_M
- Ollama
How to use subbuzdesk/gemma4-financial-sentiment with Ollama:
ollama run hf.co/subbuzdesk/gemma4-financial-sentiment:Q4_K_M
- Unsloth Desktop
- Docker Model Runner
How to use subbuzdesk/gemma4-financial-sentiment with Docker Model Runner:
docker model run hf.co/subbuzdesk/gemma4-financial-sentiment:Q4_K_M
- Lemonade
How to use subbuzdesk/gemma4-financial-sentiment with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull subbuzdesk/gemma4-financial-sentiment:Q4_K_M
Run and chat with the model
lemonade run user.gemma4-financial-sentiment-Q4_K_M
List all available models
lemonade list
- Atomic Chat
subbuzdesk/gemma4-financial-sentiment
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, andstock_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
- -
4-bit