A
finance-specialist ~4B language model built by merging a QLoRA adapter into
google/gemma-4-E4B-it. This is the full merged model — no adapter loading required, just load and run.
For the LoRA adapter weights, see
naazimsnh02/FinanceGemma-E4B-lora.
Diversity-sampled with per-source and per-task-type caps. 10-gram decontaminated against FLARE evaluation inputs to prevent benchmark leakage.
FLARE-style multiple-choice accuracy on
AdaptLLM/finance-tasks (greedy decoding, temp=0):
1from transformers import AutoModelForCausalLM, AutoTokenizer
2
3model = AutoModelForCausalLM.from_pretrained(
4 "naazimsnh02/FinanceGemma-E4B",
5 device_map="auto",
6 torch_dtype="auto",
7)
8tokenizer = AutoTokenizer.from_pretrained("naazimsnh02/FinanceGemma-E4B")
9
10prompt = "Classify the sentiment of this financial news: 'Tesla shares dropped 8% after missing delivery targets for Q3.'"
11messages = [{"role": "user", "content": [{"type": "text", "text": prompt}]}]
12inputs = tokenizer.apply_chat_template(messages, return_tensors="pt", add_generation_prompt=True, return_dict=True).to(model.device)
13output = model.generate(**inputs, max_new_tokens=128)
14print(tokenizer.decode(output[0], skip_special_tokens=True))
1from unsloth import FastModel
2
3model, tokenizer = FastModel.from_pretrained(
4 "naazimsnh02/FinanceGemma-E4B",
5 max_seq_length=4096,
6 load_in_4bit=True,
7)
8FastModel.for_inference(model)