Instructions to use dipanjann/Gemma-4-31b-it-FinQA with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use dipanjann/Gemma-4-31b-it-FinQA with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("google/gemma-4-31B-it") model = PeftModel.from_pretrained(base_model, "dipanjann/Gemma-4-31b-it-FinQA") - Notebooks
- Google Colab
- Kaggle
Gemma-4-31b-FinQA
Gemma-4-31b-FinQA is a PEFT LoRA adapter for google/gemma-4-31B-it,
adapted for financial question answering and numerical reasoning over
financial-report context.
Model Details
- Base model:
google/gemma-4-31B-it - Adapter type: LoRA / PEFT
- PEFT type:
LORA - LoRA rank:
16 - LoRA alpha:
32 - LoRA dropout:
0.05 - Target modules:
q_proj,v_proj - Adapter weights:
adapter_model.safetensors - Source archive checksum:
66b80c699208a913b502534eeff46f132cbd6f0b3b610dde5a16fc814c5fe8bf
Intended Use
Use this adapter for research and prototyping on financial QA prompts that include a question plus relevant financial-report context. Do not use it as a substitute for professional financial advice, audited filing review, or production decisioning without independent validation.
Training Data
This adapter is intended for the FinQA training workflow in the FinAI Dexlabs repository:
- Processed file:
data/processed/finqa/train_question_answer.jsonl - Records:
6,251 - Processed checksum:
58244847a8b9958a98260d843b5fc81a7cd74fce39fe2f1e2a6ba9ec50fb5e38 - Fields retained:
question,answer,pre_text,table,table_ori,post_text,steps
Dataset readiness note: the FinQA export passes required completeness checks, but the quality report flags duplicate primary questions. Treat this model as a research adapter until model-level evaluation and split-hygiene evidence are added.
Evaluation
No model-level evaluation results are included in this release. Add scores only after a reproducible evaluation run exists, including dataset, metric, command, run date, and exact score.
Usage
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer
base_model = "google/gemma-4-31B-it"
adapter_id = "dipanjann/Gemma-4-31b-FinQA"
tokenizer = AutoTokenizer.from_pretrained(adapter_id)
model = AutoModelForCausalLM.from_pretrained(
base_model,
torch_dtype="auto",
device_map="auto",
)
model = PeftModel.from_pretrained(model, adapter_id)
prompt = """Answer the financial question using the context.
Question: What was the change in revenue?
Context: <paste relevant financial report context here>
"""
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=256)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Limitations
- This is an adapter, not a standalone merged full-weight model.
- Users must load it with the compatible Gemma 4 31B base model.
- Financial numeric answers should be independently checked.
- Dataset-level readiness is not the same as model-level evaluation.
- Duplicate or near-duplicate source questions can affect benchmark interpretation if split hygiene is not enforced.
Expected Files
README.mdadapter_config.jsonadapter_model.safetensorschat_template.jinjaconfig.jsonspecial_tokens_map.jsontokenizer.jsontokenizer_config.jsontrainer_state.json
- Downloads last month
- -