Downloads · 30 days
6
7% of all-time downloads
KKieXX/llama-3.2-1b-finder-lora
llama-3.2-1b-finder-lora is a machine learning model from KKieXX. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
A QLoRA fine-tuned LoRA adapter for Llama-3.2-1B, trained on the FinDER financial question-answering dataset. The adapter teaches the base model to read SEC filing evidence passages and produce grounded, concise answe…
Downloads · 30 days
6
7% of all-time downloads
All-time downloads
91
Public
Parameters
1.3B
1 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors1 GB · 98%
How the weights are stored.
U81B · 79%
From the Hugging Face model README
A QLoRA fine-tuned LoRA adapter for Llama-3.2-1B, trained on the FinDER financial question-answering dataset. The adapter teaches the base model to read SEC filing evidence passages and produce grounded, concise answers to financial questions — a domain where the base model struggles with financial abbreviations, disambiguation of related figures, and synthesis across financial statements.
meta-llama/Llama-3.2-1Bnotebooks/fine_tuning_for_FinDER_dataset.ipynb (QLoRA pipeline, runs on Colab A100)Load the adapter on top of the base meta-llama/Llama-3.2-1B model to answer financial questions grounded in SEC filing evidence. The model expects a prompt that contains an evidence passage and a question, and returns a short factual answer.
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
base_model = AutoModelForCausalLM.from_pretrained(
"meta-llama/Llama-3.2-1B",
load_in_4bit=True,
device_map="auto",
)
model = PeftModel.from_pretrained(base_model, "KKieXX/llama-3.2-1b-finder-lora")
tokenizer = AutoTokenizer.from_pretrained("meta-llama/Llama-3.2-1B")
evidence = "The company reported net revenues of $3.2 billion for fiscal year 2023..."
question = "What were the net revenues for fiscal year 2023?"
prompt = f"Evidence: {evidence}\n\nQuestion: {question}\n\nAnswer:"
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
output = model.generate(**inputs, max_new_tokens=200, temperature=0.7, top_p=0.9)
print(tokenizer.decode(output[0], skip_special_tokens=True))
Note: The base model is gated on HuggingFace Hub — you must accept the Llama 3.2 license and authenticate with
huggingface-cli loginbefore downloading.
This adapter is the generator and evaluator backbone of the FinDER Multi-Agent Financial QA System, a LangGraph pipeline that pairs it with Pinecone RAG over 50k+ indexed SEC filing chunks. It performs two roles in that pipeline:
Users (both direct and downstream) should treat model outputs as a first-pass extraction aid, not as authoritative financial analysis. Cross-check all numerical figures against the original SEC source documents.
FinDER (Financial Dataset for Question Answering and Evaluating Retrieval-Augmented Generation):
random_state=123, frac=0.3)Citation:
@misc{choi2025finder,
title={FinDER: Financial Dataset for Question Answering and Evaluating Retrieval-Augmented Generation},
author={Chanyeol Choi and Jihoon Kwon and Jaeseon Ha and Hojun Choi and Chaewoon Kim and Yongjae Lee and Jy-yong Sohn and Alejandro Lopez-Lira},
year={2025},
eprint={2504.15800},
archivePrefix={arXiv},
primaryClass={cs.IR},
url={https://arxiv.org/abs/2504.15800}
}
Raw SEC table artifacts (tab characters, excessive whitespace, newlines) were cleaned from evidence passages before tokenization. Each example was formatted as:
Evidence: {evidence_text}
Question: {question}
Answer: {answer}
| Hyperparameter | Value |
|---|---|
| Training regime | 4-bit QLoRA (NF4 quantization + bfloat16 compute) |
| LoRA rank (r) | 16 |
| LoRA alpha | 32 |
| LoRA dropout | 0.05 |
| Target modules | 7 (q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj) |
| Trainable parameters | 11.3M / 1.247B (0.9%) |
| Epochs | 3 |
| Learning rate | 2e-4 |
| LR schedule | Cosine with warmup |
| Batch size | 4 |
| Gradient accumulation steps | 4 (effective batch = 16) |
| Optimizer | paged_adamw_32bit |
| Max sequence length | 512 tokens |
Held-out FinDER test split: 70% of the 5,703 examples (stratified by category, same random_state=123 split). Evaluation samples 200 examples stratified by category.
Three ablation conditions:
| Condition | Model | Evidence Source |
|---|---|---|
| A | Base Llama-3.2-1B | Gold evidence (oracle) |
| B | Fine-tuned Llama-3.2-1B (this model) | Gold evidence (oracle) |
| C | Fine-tuned Llama-3.2-1B (this model) | Pinecone RAG retrieval |
The A→B gap isolates the fine-tuning effect. The B→C gap isolates retrieval quality.
| Metric | Description |
|---|---|
| Exact Match (EM) | Binary: predicted answer equals gold answer (normalized) |
| Token-level F1 | Overlap between predicted and gold token sets |
| BERTScore F1 | Semantic similarity via distilbert-base-uncased |
| Retrieval Recall@K | Jaccard similarity ≥ 0.25 between retrieved and gold evidence |
See notebooks/evaluation.ipynb and eval_results.csv (generated at evaluation time) for per-example scores and aggregate results across all three conditions.
Carbon emissions estimated using the Machine Learning Impact calculator.
| Detail | |
|---|---|
| Hardware | NVIDIA A100 40GB (Google Colab) |
| Software | Python 3.10, PyTorch 2.x, Transformers 4.x, PEFT 0.x, bitsandbytes, TRL |
| Quantization | bitsandbytes NF4 (4-bit) with double quantization |
If you use this adapter, please also cite the FinDER dataset:
BibTeX:
@misc{choi2025finder,
title={FinDER: Financial Dataset for Question Answering and Evaluating Retrieval-Augmented Generation},
author={Chanyeol Choi and Jihoon Kwon and Jaeseon Ha and Hojun Choi and Chaewoon Kim and Yongjae Lee and Jy-yong Sohn and Alejandro Lopez-Lira},
year={2025},
eprint={2504.15800},
archivePrefix={arXiv},
primaryClass={cs.IR},
url={https://arxiv.org/abs/2504.15800}
}
Linda Lin (qat3207)