Spaces:
Sleeping
Sleeping
volumetrader
commited on
Commit
·
df11b03
1
Parent(s):
b71dd19
updated README
Browse files
README.md
CHANGED
@@ -1,14 +1,3 @@
|
|
1 |
-
---
|
2 |
-
title: Iris
|
3 |
-
emoji: 💬
|
4 |
-
colorFrom: yellow
|
5 |
-
colorTo: purple
|
6 |
-
sdk: gradio
|
7 |
-
sdk_version: 5.0.1
|
8 |
-
app_file: app.py
|
9 |
-
pinned: false
|
10 |
-
license: apache-2.0
|
11 |
-
---
|
12 |
This project was created as part of a course on Scalable ML ID2223 @ KTH
|
13 |
|
14 |
Purpose
|
@@ -20,16 +9,29 @@ personalized investment opportunities.
|
|
20 |
|
21 |
The base models we used for fine-tuning:
|
22 |
---
|
|
|
|
|
23 |
"unsloth/Llama-3.2-1B-Instruct-bnb-4bit"
|
24 |
|
25 |
"unsloth/Llama-3.2-1B-Instruct"
|
26 |
|
|
|
|
|
27 |
Datasets
|
28 |
---
|
|
|
|
|
29 |
"mlabonne/FineTome-100k"
|
30 |
|
31 |
"gbharti/finance-alpaca"
|
32 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
|
34 |
Improvement - model centric approach:
|
35 |
---
|
@@ -37,7 +39,53 @@ To improve on the performance of the model a full fine-tuning of the model could
|
|
37 |
|
38 |
Improvement - data centric approach:
|
39 |
---
|
40 |
-
To improve on the initial model a dataset which is more suited for our objective as a financial adivisor could boost the models performance
|
41 |
by receiving more domain-specific knowledge during the fine-tuning.
|
42 |
We found a dataset to that end with: https://huggingface.co/datasets/gbharti/finance-alpaca which we have used to train the second iteration of
|
43 |
our financial advisor.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
This project was created as part of a course on Scalable ML ID2223 @ KTH
|
2 |
|
3 |
Purpose
|
|
|
9 |
|
10 |
The base models we used for fine-tuning:
|
11 |
---
|
12 |
+
Base models were retrieved from huggingface.co
|
13 |
+
|
14 |
"unsloth/Llama-3.2-1B-Instruct-bnb-4bit"
|
15 |
|
16 |
"unsloth/Llama-3.2-1B-Instruct"
|
17 |
|
18 |
+
"unsloth/Phi-3.5-mini-instruct"
|
19 |
+
|
20 |
Datasets
|
21 |
---
|
22 |
+
Datasets were retrieved from huggingface.co
|
23 |
+
|
24 |
"mlabonne/FineTome-100k"
|
25 |
|
26 |
"gbharti/finance-alpaca"
|
27 |
|
28 |
+
Interface
|
29 |
+
---
|
30 |
+
The interface was designed to allow the user get stock recommendations
|
31 |
+
with other ways of interaction that purely chatting.
|
32 |
+
|
33 |
+

|
34 |
+
|
35 |
|
36 |
Improvement - model centric approach:
|
37 |
---
|
|
|
39 |
|
40 |
Improvement - data centric approach:
|
41 |
---
|
42 |
+
To improve on the initial model (Version1) a dataset which is more suited for our objective as a financial adivisor could boost the models performance
|
43 |
by receiving more domain-specific knowledge during the fine-tuning.
|
44 |
We found a dataset to that end with: https://huggingface.co/datasets/gbharti/finance-alpaca which we have used to train the second iteration of
|
45 |
our financial advisor.
|
46 |
+
|
47 |
+
Model iteration 2 - results
|
48 |
+
---
|
49 |
+
|
50 |
+
In the second iteration we used as mentioned above a finance dataset
|
51 |
+
and another base model: "unsloth/Phi-3.5-mini-instruct" which is a model with more parameters. Our hypothesis
|
52 |
+
was that these two changes would increase the performance and helpfulness of the model.
|
53 |
+
|
54 |
+
<h3>First impressions</h3>
|
55 |
+
It was quickly realized that this model was requiring a lot more computional power
|
56 |
+
and had issues running inference on huggingface's free CPU. In contrast the
|
57 |
+
previous model had been usable under the same circumstances.
|
58 |
+
|
59 |
+
<h3> Test example</h3>
|
60 |
+
---
|
61 |
+
<img src="example_input.png" alt="img.png" width="450" height="300">
|
62 |
+
|
63 |
+
This was the input parameters for our example (see img above): 5 swedish stocks in the information tech sector with a 3/5 risk level. No additional comments.
|
64 |
+
|
65 |
+
The result were as follows:
|
66 |
+
|
67 |
+
**Version 1 (unsloth/Llama-3.2-1B-Instruct-bnb-4bit, mlabonne/FineTome-100k)**
|
68 |
+
>Yes, here are 5 stocks from Sweden in the Information Technology sector:<br>
|
69 |
+
>1. Ericsson (SE:ISOF) - A leading provider of telecommunications equipment and services.<br>
|
70 |
+
>2. Spotify (SE:SPOT) - A music streaming service provider.<br>
|
71 |
+
>3. Spotify's parent company, Intercom (SE:ICOM) - A leading provider of customer relationship management (CRM) software.<br>
|
72 |
+
>4. Spotify's parent company, Spotify for Business (SE:SBFB) - A leading provider of music streaming services for businesses.<br>
|
73 |
+
>5. Spotify's parent company, Spotify for Developers (SE:SFDB) - A leading provider of tools and resources for developers.<br>
|
74 |
+
>
|
75 |
+
>These stocks are all listed on the Stockholm Stock Exchange (Bolsas y Mercados de Comercio de Suiza, BZX) and are considered to be stable and growth-oriented. They are also diversified across various industries and sectors, including telecommunications, music streaming, customer relationship management, music streaming services for businesses, and tools and resources for developers.
|
76 |
+
|
77 |
+
**Version 2 (unsloth/Phi-3.5-mini-instruct, gbharti/finance-alpaca)**
|
78 |
+
>Sure, here are 5 stocks from Sweden in the Information Technology sector:
|
79 |
+
>1. Ericsson
|
80 |
+
>2. Nokia
|
81 |
+
>3. Hexagon AB
|
82 |
+
>4. ABB
|
83 |
+
>5. AstraZeneca<br>
|
84 |
+
>
|
85 |
+
>These stocks are all listed on the Stockholm Stock Exchange and are considered to be relatively low risk investments.<br><br>I hope this helps!
|
86 |
+
|
87 |
+
|
88 |
+
In summary the second iteration of the model responds in more correct manner,
|
89 |
+
does less duplication and the output is more straight to the point.
|
90 |
+
|
91 |
+
We consider this as substantial performance increase, although it is more computational intensive to run and thus takes longer.
|