Personal-Finance-R2 / README.md
Rustamshry's picture
Update README.md
b69e174 verified
---
base_model: unsloth/Qwen3-1.7B
library_name: peft
license: mit
datasets:
- Akhil-Theerthala/Kuvera-PersonalFinance-V2.1
language:
- en
pipeline_tag: text-generation
tags:
- trl
- unsloth
- sft
- transformers
---
# Model Card for Model ID
This model is fine-tuned for instruction-following in the domain of personal finance, with a focus on:
- Budgeting advice
- Investment strategies
- Credit management
- Retirement planning
- Insurance and financial planning concepts
- Personalized financial reasoning
### Model Description
- **License:** MIT
- **Finetuned from model:** unsloth/Qwen3-1.7B
- **Dataset:** The model was fine-tuned on the Kuvera-PersonalFinance-V2.1, curated and published by Akhil-Theerthala.
### Model Capabilities
- Understands and provides contextual financial advice based on user queries.
- Responds in a chat-like conversational format.
- Trained to follow multi-turn instructions and deliver clear, structured, and accurate financial reasoning.
- Generalizes well to novel personal finance questions and explanations.
## Uses
### Direct Use
- Chatbots for personal finance
- Educational assistants for financial literacy
- Decision support for simple financial planning
- Interactive personal finance Q&A systems
## Bias, Risks, and Limitations
- Not a substitute for licensed financial advisors.
- The model's advice is based on training data and may not reflect region-specific laws, regulations, or financial products.
- May occasionally hallucinate or give generic responses in ambiguous scenarios.
- Assumes user input is well-formed and relevant to personal finance.
## How to Get Started with the Model
Use the code below to get started with the model.
```python
from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import PeftModel
tokenizer = AutoTokenizer.from_pretrained("unsloth/Qwen3-1.7B",)
base_model = AutoModelForCausalLM.from_pretrained(
"unsloth/Qwen3-1.7B",
device_map={"": 0}
)
model = PeftModel.from_pretrained(base_model,"khazarai/Personal-Finance-R2")
question = """ I just got accepted into Flatiron's full-time software engineering bootcamp, but I have basically no savings and the $19k price tag is freaking me out.
I really love coding and want to break into tech, but I'm looking at taking out a loan through Climb or Ascent with around 6.5% interest—that'd mean paying like $600 a month after.
Is this a smart move? I'm torn between chasing this opportunity and being terrified of the debt. Any advice?
"""
messages = [
{"role" : "user", "content" : question}
]
text = tokenizer.apply_chat_template(
messages,
tokenize = False,
add_generation_prompt = True,
enable_thinking = True,
)
from transformers import TextStreamer
_ = model.generate(
**tokenizer(text, return_tensors = "pt").to("cuda"),
max_new_tokens = 3000,
temperature = 0.6,
top_p = 0.95,
top_k = 20,
streamer = TextStreamer(tokenizer, skip_prompt = True),
)
```
**For pipeline:**
```python
from transformers import pipeline, AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
tokenizer = AutoTokenizer.from_pretrained("unsloth/Qwen3-1.7B")
base_model = AutoModelForCausalLM.from_pretrained("unsloth/Qwen3-1.7B")
model = PeftModel.from_pretrained(base_model, "khazarai/Personal-Finance-R2")
question="""
I just got accepted into Flatiron's full-time software engineering bootcamp, but I have basically no savings and the $19k price tag is freaking me out.
I really love coding and want to break into tech, but I'm looking at taking out a loan through Climb or Ascent with around 6.5% interest—that'd mean paying like $600 a month after.
Is this a smart move? I'm torn between chasing this opportunity and being terrified of the debt. Any advice?
"""
pipe = pipeline("text-generation", model=model, tokenizer=tokenizer)
messages = [
{"role": "user", "content": question}
]
pipe(messages)
```
## Training Details
### Training Data
- Dataset Overview:
Kuvera-PersonalFinance-V2.1 is a collection of high-quality instruction-response pairs focused on personal finance topics.
It covers a wide range of subjects including budgeting, saving, investing, credit management, retirement planning, insurance, and financial literacy.
- Data Format:
The dataset consists of conversational-style prompts paired with detailed and well-structured responses.
It is formatted to enable instruction-following language models to understand and generate coherent financial advice and reasoning.
### Framework versions
- PEFT 0.15.2