gbharti/finance-alpaca
Viewer • Updated • 68.9k • 4.13k • 152
How to use prxshetty/gemma-3-finance-mix with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="prxshetty/gemma-3-finance-mix")
messages = [
{"role": "user", "content": "Who are you?"},
]
pipe(messages) # Load model directly
from transformers import AutoModel
model = AutoModel.from_pretrained("prxshetty/gemma-3-finance-mix", device_map="auto")How to use prxshetty/gemma-3-finance-mix with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "prxshetty/gemma-3-finance-mix"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "prxshetty/gemma-3-finance-mix",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'docker model run hf.co/prxshetty/gemma-3-finance-mix
How to use prxshetty/gemma-3-finance-mix with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "prxshetty/gemma-3-finance-mix" \
--host 0.0.0.0 \
--port 30000
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:30000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "prxshetty/gemma-3-finance-mix",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'docker run --gpus all \
--shm-size 32g \
-p 30000:30000 \
-v ~/.cache/huggingface:/root/.cache/huggingface \
--env "HF_TOKEN=<secret>" \
--ipc=host \
lmsysorg/sglang:latest \
python3 -m sglang.launch_server \
--model-path "prxshetty/gemma-3-finance-mix" \
--host 0.0.0.0 \
--port 30000
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:30000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "prxshetty/gemma-3-finance-mix",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'How to use prxshetty/gemma-3-finance-mix with Unsloth Studio:
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for prxshetty/gemma-3-finance-mix to start chatting
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for prxshetty/gemma-3-finance-mix to start chatting
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for prxshetty/gemma-3-finance-mix to start chatting
pip install unsloth
from unsloth import FastModel
model, tokenizer = FastModel.from_pretrained(
model_name="prxshetty/gemma-3-finance-mix",
max_seq_length=2048,
)How to use prxshetty/gemma-3-finance-mix with Docker Model Runner:
docker model run hf.co/prxshetty/gemma-3-finance-mix
A lightweight Gemma-3 270M model fine-tuned for financial Q&A, causal-lm/finance, news-headline sentiment and retail-investor discourse.
| Item | Details |
|---|---|
| Base checkpoint | google/gemma-3-270m-it |
| Fine-tune method | LoRA (PEFT) with Unsloth |
| Training run | 1 epoch • 325,528 blended examples • 100 steps |
| Trainable params | 30.4 M / 298 M (10.18 %) |
| Loss | 4.11 → 2.74 |
| Hardware | 2 × T4-16GB (Collab Free Tier) |
| License | Apache-2.0 |
| Intended use | Educational & research |
| Dataset | Size | Focus |
|---|---|---|
gbharti/finance-alpaca |
52 k | Instruction Q-A on corporate finance & investing |
Balaji173/finance_news_sentiment |
217 k | Bullish/bearish labels for news headlines |
winddude/reddit_finance_43_250k |
250 k | Reddit finance post–comment pairs |
causal-lm/finance |
31 k | Analytical prompts & causal reasoning in economics/markets |
All shards were concatenated and wrapped with the Gemma chat template before training.
Disclose AI assistance, double-check outputs, and do not rely on this model for trading decisions. The author and base-model creators accept no liability for financial losses.