Update README.md
Browse files
README.md
CHANGED
|
@@ -188,152 +188,161 @@ to the few shot examples derived from the goals dataset.
|
|
| 188 |
Q: My short term goal is to save for a $3357 vacation in the next year, my medium term goal is to save for down payment for a new car, around 6867 in the next 2 or 3 years, and my long term goal is to save for a down payment for a house around 115061 in the next ten years, can you help me integrate these goals into my budget as well as where I should store these savings?
|
| 189 |
```
|
| 190 |
|
| 191 |
-
### Downstream Use [optional]
|
| 192 |
|
| 193 |
-
|
| 194 |
|
| 195 |
-
|
| 196 |
-
|
| 197 |
-
### Out-of-Scope Use
|
| 198 |
-
|
| 199 |
-
<!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
|
| 200 |
-
|
| 201 |
-
[More Information Needed]
|
| 202 |
-
|
| 203 |
-
## Bias, Risks, and Limitations
|
| 204 |
-
|
| 205 |
-
<!-- This section is meant to convey both technical and sociotechnical limitations. -->
|
| 206 |
-
|
| 207 |
-
[More Information Needed]
|
| 208 |
|
| 209 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 210 |
|
| 211 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 212 |
|
| 213 |
-
|
| 214 |
|
| 215 |
-
|
| 216 |
|
| 217 |
-
|
| 218 |
|
| 219 |
-
|
|
|
|
| 220 |
|
| 221 |
-
|
|
|
|
|
|
|
| 222 |
|
| 223 |
-
### Training Data
|
| 224 |
|
| 225 |
-
|
| 226 |
|
| 227 |
-
|
|
|
|
|
|
|
| 228 |
|
| 229 |
-
|
|
|
|
|
|
|
| 230 |
|
| 231 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 232 |
|
| 233 |
-
|
|
|
|
| 234 |
|
| 235 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 236 |
|
|
|
|
|
|
|
| 237 |
|
| 238 |
-
|
|
|
|
|
|
|
| 239 |
|
| 240 |
-
|
| 241 |
|
| 242 |
-
#### Speeds, Sizes, Times [optional]
|
| 243 |
|
| 244 |
-
|
|
|
|
| 245 |
|
| 246 |
-
[More Information Needed]
|
| 247 |
|
| 248 |
-
## Evaluation
|
| 249 |
|
| 250 |
-
|
|
|
|
| 251 |
|
| 252 |
-
|
|
|
|
| 253 |
|
| 254 |
-
|
| 255 |
|
| 256 |
-
|
| 257 |
|
| 258 |
-
|
| 259 |
|
| 260 |
-
|
| 261 |
|
| 262 |
-
|
| 263 |
|
| 264 |
-
|
| 265 |
|
| 266 |
-
|
| 267 |
|
| 268 |
-
|
| 269 |
|
| 270 |
-
|
| 271 |
|
| 272 |
-
|
| 273 |
|
| 274 |
-
|
| 275 |
|
| 276 |
-
|
| 277 |
|
|
|
|
| 278 |
|
|
|
|
| 279 |
|
| 280 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 281 |
|
| 282 |
-
|
|
|
|
| 283 |
|
| 284 |
[More Information Needed]
|
| 285 |
|
| 286 |
-
## Environmental Impact
|
| 287 |
-
|
| 288 |
-
<!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
|
| 289 |
-
|
| 290 |
-
Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
|
| 291 |
-
|
| 292 |
-
- **Hardware Type:** [More Information Needed]
|
| 293 |
-
- **Hours used:** [More Information Needed]
|
| 294 |
-
- **Cloud Provider:** [More Information Needed]
|
| 295 |
-
- **Compute Region:** [More Information Needed]
|
| 296 |
-
- **Carbon Emitted:** [More Information Needed]
|
| 297 |
-
|
| 298 |
-
## Technical Specifications [optional]
|
| 299 |
-
|
| 300 |
-
### Model Architecture and Objective
|
| 301 |
-
|
| 302 |
-
[More Information Needed]
|
| 303 |
|
| 304 |
### Compute Infrastructure
|
| 305 |
|
| 306 |
-
|
| 307 |
|
| 308 |
#### Hardware
|
| 309 |
|
| 310 |
-
|
| 311 |
-
|
| 312 |
-
#### Software
|
| 313 |
-
|
| 314 |
-
[More Information Needed]
|
| 315 |
-
|
| 316 |
-
## Citation [optional]
|
| 317 |
|
| 318 |
-
|
| 319 |
|
| 320 |
-
|
| 321 |
|
| 322 |
-
|
| 323 |
-
|
| 324 |
-
**APA:**
|
| 325 |
-
|
| 326 |
-
[More Information Needed]
|
| 327 |
|
| 328 |
-
## Glossary [optional]
|
| 329 |
|
| 330 |
-
|
| 331 |
|
| 332 |
-
|
| 333 |
|
| 334 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 335 |
|
| 336 |
-
[More Information Needed]
|
| 337 |
|
| 338 |
## Model Card Authors
|
| 339 |
|
|
|
|
| 188 |
Q: My short term goal is to save for a $3357 vacation in the next year, my medium term goal is to save for down payment for a new car, around 6867 in the next 2 or 3 years, and my long term goal is to save for a down payment for a house around 115061 in the next ten years, can you help me integrate these goals into my budget as well as where I should store these savings?
|
| 189 |
```
|
| 190 |
|
|
|
|
| 191 |
|
| 192 |
+
I reccomend the following code to set up few shot prompting for the goals task:
|
| 193 |
|
| 194 |
+
```{python}\n
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 195 |
|
| 196 |
+
test_goals = goals[2500:]
|
| 197 |
+
|
| 198 |
+
pipe = pipeline(
|
| 199 |
+
"text-generation",
|
| 200 |
+
model=model,
|
| 201 |
+
torch_dtype=torch.bfloat16,
|
| 202 |
+
device_map="auto",
|
| 203 |
+
tokenizer = tokenizer,
|
| 204 |
+
max_new_tokens = 750,
|
| 205 |
+
do_sample = False,
|
| 206 |
+
temperature = 0
|
| 207 |
+
)
|
| 208 |
|
| 209 |
+
def few_shot_goal(df3,pipe,n = 1,q = 10):
|
| 210 |
+
examples = []
|
| 211 |
+
for i in range(n):
|
| 212 |
+
instruct = df3['instruct'].iloc[i]
|
| 213 |
+
examples.append(instruct)
|
| 214 |
+
examples.append('YOUR PROMPT HERE')
|
| 215 |
+
examples = "\n\n".join(examples)
|
| 216 |
+
text = pipe(examples)
|
| 217 |
+
print(text[0]['generated_text'])
|
| 218 |
|
| 219 |
+
few_shot_goal(test_goals,pipe,n = 3,q=10)
|
| 220 |
|
| 221 |
+
```
|
| 222 |
|
| 223 |
+
### Example Response
|
| 224 |
|
| 225 |
+
For the budget task, you can generally expect a response like the following from the model. It should almost exclusively contain python code which integrates your provided budget figures
|
| 226 |
+
and creates for you a budget spreadsheet to assist with tracking your expenses.
|
| 227 |
|
| 228 |
+
```{python}\n
|
| 229 |
+
A: Lets use the python library pandas for data manipulation and export the spreadsheet using openpyxl. First, ensure you have both libraries installed: ```bash
|
| 230 |
+
pip install pandas openpyxl
|
| 231 |
|
|
|
|
| 232 |
|
| 233 |
+
Now, let's create a Python script to generate your budget spreadsheet:
|
| 234 |
|
| 235 |
+
python
|
| 236 |
+
import pandas as pd
|
| 237 |
+
import openpyxl
|
| 238 |
|
| 239 |
+
# Define your income and expenses
|
| 240 |
+
annual_income = 220034
|
| 241 |
+
monthly_income = annual_income / 12
|
| 242 |
|
| 243 |
+
expenses = {
|
| 244 |
+
"Rent & Utilities": 2379,
|
| 245 |
+
"Car Payment": 302,
|
| 246 |
+
"Food": 300,
|
| 247 |
+
"Other Expenses": 351
|
| 248 |
+
}
|
| 249 |
|
| 250 |
+
total_expenses = sum(expenses.values())
|
| 251 |
+
net_savings = monthly_income - total_expenses
|
| 252 |
|
| 253 |
+
# Create a dictionary with your budget data
|
| 254 |
+
budget_data = {
|
| 255 |
+
"Category": ["Monthly Income"] + list(expenses.keys()) + ["Total Expenses", "Net Savings"],
|
| 256 |
+
"Amount ($)": [monthly_income] + list(expenses.values()) + [total_expenses, net_savings]
|
| 257 |
+
}
|
| 258 |
|
| 259 |
+
# Convert the dictionary into a DataFrame
|
| 260 |
+
budget_df = pd.DataFrame(budget_data)
|
| 261 |
|
| 262 |
+
# Save the DataFrame to an Excel file
|
| 263 |
+
file_name = "budget.xlsx"
|
| 264 |
+
budget_df.to_excel(file_name, index=False, engine='openpyxl')
|
| 265 |
|
| 266 |
+
print(f"Budget spreadsheet saved as {file_name}")
|
| 267 |
|
|
|
|
| 268 |
|
| 269 |
+
This script will create an Excel file named `budget.xlsx` in the same directory, containing your income and expenses breakdown. Make sure to run this in a Python environment where you have write access.
|
| 270 |
+
```
|
| 271 |
|
|
|
|
| 272 |
|
|
|
|
| 273 |
|
| 274 |
+
For the second task you can reasonably expect a response along the lines of the output below. This should reasonably follow the structure of walking you through the breakdown of your
|
| 275 |
+
short, medium and long term goals into monthly savings targets depending on their timeframe as well as suggesting reasonable investment vehicles for them.
|
| 276 |
|
| 277 |
+
```{python}\n
|
| 278 |
+
A: 1. First, let's figure out how much you can realistically save each month. We know you want to save for three things: a vacation costing $1741, a car down payment of $9356, and a house down payment of $83333.
|
| 279 |
|
| 280 |
+
2. To make it easier, let's add up those numbers: $1741 + $9356 + $83333 gives us a total savings goal of $98390.
|
| 281 |
|
| 282 |
+
3. Now, we need to think about how long you have to reach this goal. You've got a year for the vacation, 2-3 years for the car, and 10 years for the house. Let's take the 10 years as our benchmark since it's the longest time frame. That means you have 10 years to save $98390.
|
| 283 |
|
| 284 |
+
4. So, let's calculate your monthly savings. Divide $98390 by 10 years, which is 120 months, and you get about $816.75 per month.
|
| 285 |
|
| 286 |
+
5. Now, where should you store these savings? Considering you've got a long-term goal, it might be wise to explore low-risk options like high-yield savings accounts or certificates of deposit (CDs). These can help your money grow slowly over time while remaining easily accessible.
|
| 287 |
|
| 288 |
+
6. Finally, make sure to set up automatic transfers from your checking account to your chosen savings vehicle to make saving easier and less prone to being neglected.
|
| 289 |
|
| 290 |
+
Let's see how this plan looks: You'll aim to save about $816.75 monthly for 10 years. This should help you reach your combined savings goal without much hassle, and you can monitor your progress along the way. Oh, and don't forget to review and adjust as needed!
|
| 291 |
|
| 292 |
+
## Thinking
|
| 293 |
|
| 294 |
+
Alright, let's break this down step by step. First, I need to figure out how much I can realistically save each month to reach my savings goals. I have three main goals: saving for a $1741 vacation in a year, a $9356 car down payment in 2-3 years, and a $83333 house down payment in 10 years.
|
| 295 |
|
| 296 |
+
Okay, so let's add up these numbers: $1741 plus $9356 plus $83333 gives me a total savings goal of $98390. Now, I need to think about how long I have to reach this goal. Since 10 years is the longest period, I'll use that as my timeframe.
|
| 297 |
|
| 298 |
+
Next, I'll calculate my monthly savings. I divide $98390 by 10 years, which is 120 months, and get about $816.75 per month. This is my target savings amount each month.
|
| 299 |
|
| 300 |
+
Now, where should I store these savings? Given that my goal is long-term, I should look into low-risk options like high-yield savings accounts or certificates of deposit (CDs). These will help my money grow slowly over time while keeping it easily accessible.
|
| 301 |
|
| 302 |
+
Finally, to make saving easier, I'll set up automatic transfers from my checking account to my chosen savings vehicle. This way, saving won't be so hard to stick to, and I can monitor my progress along the way. It looks like saving $816.75 monthly for 10 years should help me reach my combined savings goal without much hassle.
|
| 303 |
|
| 304 |
+
```
|
| 305 |
|
| 306 |
+
## Bias, Risks, and Limitations
|
| 307 |
|
| 308 |
+
There are several risks and limitations of this model that are worth mentioning. First, in a handful of cases this model produced responses in which the math inherent in the
|
| 309 |
+
savings goals responses was not correct, sometimes failing to add numbers up correctly or having slight rounding errors when dividing long term goals into monthly targets.
|
| 310 |
+
While it is well known that LLMs can struggle with mathematics given that their knolwedge is language based and not numerically based, this can be a problem for a finance focused LLM.
|
| 311 |
+
I strongly reccomend double checking the figures presented by this model. While this issue is sidestepped in the budget task through the use of python code to prevent math errros
|
| 312 |
+
that safeguard is not implemented for the goals task. Further, this model should be limited in its use for out of scope tasks as the generalization benchmarks demonstrated that
|
| 313 |
+
compared to its base model, this model exhibits decreased reasoning ability outside its domain specific task.
|
| 314 |
|
| 315 |
+
In order to imprve theis model I woudl reccomend future model trainers and tuners focus on adjusting this model to default to producing python code for all mathematics based
|
| 316 |
+
prompts. Sticking with python for mathematics processing shoula allow the model to perform more highly on the goals task while retaining performance on the
|
| 317 |
|
| 318 |
[More Information Needed]
|
| 319 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 320 |
|
| 321 |
### Compute Infrastructure
|
| 322 |
|
| 323 |
+
Rivanna High Performance Computing Cluster (University of Virginia)
|
| 324 |
|
| 325 |
#### Hardware
|
| 326 |
|
| 327 |
+
1 node
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 328 |
|
| 329 |
+
32GB system RAM
|
| 330 |
|
| 331 |
+
GPU NVIDIA A6000
|
| 332 |
|
| 333 |
+
2 hours of LoRA PEFT Tuning.
|
|
|
|
|
|
|
|
|
|
|
|
|
| 334 |
|
|
|
|
| 335 |
|
| 336 |
+
## Works Cited
|
| 337 |
|
| 338 |
+
Major Credit to TheFinAI team who created the Fino-1 8B model that this model is based on.
|
| 339 |
|
| 340 |
+
title={Fino1: On the Transferability of Reasoning Enhanced LLMs to Finance},
|
| 341 |
+
author={Qian, Lingfei and Zhou, Weipeng and Wang, Yan and Peng, Xueqing and Huang, Jimin and Xie, Qianqian},
|
| 342 |
+
journal={arXiv preprint arXiv:2502.08127},
|
| 343 |
+
year={2025}
|
| 344 |
+
}
|
| 345 |
|
|
|
|
| 346 |
|
| 347 |
## Model Card Authors
|
| 348 |
|