File size: 4,556 Bytes
2ba94a2 b7fbea5 9bd46d7 2ba94a2 b7fbea5 2ba94a2 b7fbea5 2ba94a2 b7fbea5 2ba94a2 b7fbea5 2ba94a2 b7fbea5 2ba94a2 b7fbea5 2ba94a2 b7fbea5 2ba94a2 b7fbea5 2ba94a2 b7fbea5 2ba94a2 fedd24d 2ba94a2 b7fbea5 fedd24d b7fbea5 2ba94a2 b4a70d6 2ba94a2 dfb87f7 b7fbea5 2ba94a2 b7fbea5 2ba94a2 b7fbea5 2ba94a2 b7fbea5 2ba94a2 b7fbea5 2ba94a2 b7fbea5 75149df 7e0806e 75149df 2ba94a2 b7fbea5 2ba94a2 b7fbea5 2ba94a2 b7fbea5 2ba94a2 b7fbea5 2ba94a2 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 |
---
base_model: unsloth/Qwen3-1.7B
library_name: peft
license: mit
datasets:
- Akhil-Theerthala/PersonalFinance_v2
language:
- en
pipeline_tag: text-generation
tags:
- finance
- transformers
- unsloth
- trl
new_version: khazarai/Personal-Finance-R2
---
## Model Details
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 PersonalFinance_v2 dataset, 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-R1")
question ="""
$19k for a coding bootcamp
Hi!
I was just accepted into the full-time software engineering program with Flatiron and have approx. $0 to my name.
I know I can get a loan with either Climb or accent with around 6.50% interest, is this a good option?
I would theoretically be paying near $600/month.
I really enjoy coding and would love to start a career in tech but the potential $19k price tag is pretty scary. 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 = 2048,
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-R1")
question ="""
$19k for a coding bootcamp
Hi!
I was just accepted into the full-time software engineering program with Flatiron and have approx. $0 to my name.
I know I can get a loan with either Climb or accent with around 6.50% interest, is this a good option?
I would theoretically be paying near $600/month.
I really enjoy coding and would love to start a career in tech but the potential $19k price tag is pretty scary. Any advice?
"""
pipe = pipeline("text-generation", model=model, tokenizer=tokenizer)
messages = [
{"role": "user", "content": question}
]
pipe(messages)
```
## Training Details
### Training Data
- Dataset Overview:
PersonalFinance_v2 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.14.0 |