ThinkTim21 commited on
Commit
d8378e1
·
verified ·
1 Parent(s): 3d23eb6

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +97 -88
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
- <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
194
 
195
- [More Information Needed]
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
- ### Recommendations
 
 
 
 
 
 
 
 
 
 
 
210
 
211
- <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
 
 
 
 
 
 
 
 
212
 
213
- Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
214
 
215
- ## How to Get Started with the Model
216
 
217
- Use the code below to get started with the model.
218
 
219
- [More Information Needed]
 
220
 
221
- ## Training Details
 
 
222
 
223
- ### Training Data
224
 
225
- <!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
226
 
227
- [More Information Needed]
 
 
228
 
229
- ### Training Procedure
 
 
230
 
231
- <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
 
 
 
 
 
232
 
233
- #### Preprocessing [optional]
 
234
 
235
- [More Information Needed]
 
 
 
 
236
 
 
 
237
 
238
- #### Training Hyperparameters
 
 
239
 
240
- - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
241
 
242
- #### Speeds, Sizes, Times [optional]
243
 
244
- <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
 
245
 
246
- [More Information Needed]
247
 
248
- ## Evaluation
249
 
250
- <!-- This section describes the evaluation protocols and provides the results. -->
 
251
 
252
- ### Testing Data, Factors & Metrics
 
253
 
254
- #### Testing Data
255
 
256
- <!-- This should link to a Dataset Card if possible. -->
257
 
258
- [More Information Needed]
259
 
260
- #### Factors
261
 
262
- <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
263
 
264
- [More Information Needed]
265
 
266
- #### Metrics
267
 
268
- <!-- These are the evaluation metrics being used, ideally with a description of why. -->
269
 
270
- [More Information Needed]
271
 
272
- ### Results
273
 
274
- [More Information Needed]
275
 
276
- #### Summary
277
 
 
278
 
 
279
 
280
- ## Model Examination [optional]
 
 
 
 
 
281
 
282
- <!-- Relevant interpretability work for the model goes here -->
 
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
- [More Information Needed]
307
 
308
  #### Hardware
309
 
310
- [More Information Needed]
311
-
312
- #### Software
313
-
314
- [More Information Needed]
315
-
316
- ## Citation [optional]
317
 
318
- <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
319
 
320
- **BibTeX:**
321
 
322
- [More Information Needed]
323
-
324
- **APA:**
325
-
326
- [More Information Needed]
327
 
328
- ## Glossary [optional]
329
 
330
- <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
331
 
332
- [More Information Needed]
333
 
334
- ## More Information [optional]
 
 
 
 
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