Initial upload of fine‑tuned Gemma + custom tokenizer
Browse files
README.md
CHANGED
|
@@ -37,15 +37,17 @@ print(formatted_prompt) # start_generation adds the <start_of_turn> token to con
|
|
| 37 |
```
|
| 38 |
Output:
|
| 39 |
```
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
<start_of_turn>
|
| 43 |
-
|
| 44 |
-
<start_of_turn>
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
|
|
|
|
|
|
| 49 |
|
| 50 |
In training, loss is ONLY calculated on the output tokens and the `<end_of_turn>` token. Thus, the model is only designed to generate / predict probabilities after `<start_of_turn>` and until `<end_of_turn>` - everything else is out of distribution for the model and not recommended.
|
| 51 |
|
|
@@ -70,17 +72,17 @@ with torch.no_grad():
|
|
| 70 |
|
| 71 |
Output:
|
| 72 |
```
|
| 73 |
-
Top 10 probabilities for first output token:
|
| 74 |
-
1. 'Tokyo' -> 0.
|
| 75 |
-
2. '
|
| 76 |
-
3. '
|
| 77 |
-
4. 'Ky' -> 0.
|
| 78 |
-
5. '
|
| 79 |
-
6. '
|
| 80 |
-
7. '
|
| 81 |
-
8. '
|
| 82 |
-
9. 'Toy' -> 0.
|
| 83 |
-
10. '
|
| 84 |
```
|
| 85 |
|
| 86 |
Great! Almost all of the probability mass is on the correct answer, Tokyo.
|
|
@@ -110,10 +112,10 @@ for i in range(n_gens):
|
|
| 110 |
|
| 111 |
Outputs:
|
| 112 |
```
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
```
|
| 118 |
Not too bad!
|
| 119 |
|
|
@@ -135,10 +137,10 @@ for i in range(n_gens):
|
|
| 135 |
```
|
| 136 |
Output:
|
| 137 |
```
|
| 138 |
-
|
| 139 |
-
|
| 140 |
-
|
| 141 |
-
|
| 142 |
```
|
| 143 |
|
| 144 |
By default, the model is only trained to do 1) either emulate outputs if examples are provided, or 2) generate data based on the description. Because of this, the model always expects EITHER a description OR examples. If you want it to act slightly more like an instruction following chat model, you can add a description such as the following:
|
|
@@ -164,14 +166,23 @@ for i in range(n_gens):
|
|
| 164 |
Some example generations:
|
| 165 |
```
|
| 166 |
Generation 0:
|
| 167 |
-
|
| 168 |
-
|
|
|
|
|
|
|
|
|
|
| 169 |
Generation 1:
|
| 170 |
-
|
| 171 |
Generation 2:
|
| 172 |
-
|
|
|
|
|
|
|
|
|
|
| 173 |
Generation 3:
|
| 174 |
-
|
|
|
|
|
|
|
|
|
|
| 175 |
```
|
| 176 |
|
| 177 |
|
|
@@ -208,10 +219,10 @@ for i in range(n_gens):
|
|
| 208 |
```
|
| 209 |
Output:
|
| 210 |
```
|
| 211 |
-
{"situation": "
|
| 212 |
-
{"situation": "
|
| 213 |
-
{"situation": "
|
| 214 |
-
{"situation": "
|
| 215 |
```
|
| 216 |
|
| 217 |
A few tips and tricks:
|
|
|
|
| 37 |
```
|
| 38 |
Output:
|
| 39 |
```
|
| 40 |
+
<start_of_turn>descriptions
|
| 41 |
+
Capitals<end_of_turn>
|
| 42 |
+
<start_of_turn>input
|
| 43 |
+
France<end_of_turn>
|
| 44 |
+
<start_of_turn>output
|
| 45 |
+
Paris<end_of_turn>
|
| 46 |
+
<start_of_turn>input
|
| 47 |
+
Japan<end_of_turn>
|
| 48 |
+
<start_of_turn>output
|
| 49 |
+
|
| 50 |
+
```
|
| 51 |
|
| 52 |
In training, loss is ONLY calculated on the output tokens and the `<end_of_turn>` token. Thus, the model is only designed to generate / predict probabilities after `<start_of_turn>` and until `<end_of_turn>` - everything else is out of distribution for the model and not recommended.
|
| 53 |
|
|
|
|
| 72 |
|
| 73 |
Output:
|
| 74 |
```
|
| 75 |
+
Top 10 probabilities for first output token:
|
| 76 |
+
1. 'Tokyo' -> 0.9846
|
| 77 |
+
2. '東京' -> 0.0032
|
| 78 |
+
3. 'Tok' -> 0.0023
|
| 79 |
+
4. 'Ky' -> 0.0023
|
| 80 |
+
5. 'tok' -> 0.0012
|
| 81 |
+
6. 'TO' -> 0.0011
|
| 82 |
+
7. 'T' -> 0.0009
|
| 83 |
+
8. 'To' -> 0.0005
|
| 84 |
+
9. 'Toy' -> 0.0004
|
| 85 |
+
10. '东京' -> 0.0002
|
| 86 |
```
|
| 87 |
|
| 88 |
Great! Almost all of the probability mass is on the correct answer, Tokyo.
|
|
|
|
| 112 |
|
| 113 |
Outputs:
|
| 114 |
```
|
| 115 |
+
Twilight Struggle
|
| 116 |
+
Ark Nova
|
| 117 |
+
Bardsung
|
| 118 |
+
Carcassonne
|
| 119 |
```
|
| 120 |
Not too bad!
|
| 121 |
|
|
|
|
| 137 |
```
|
| 138 |
Output:
|
| 139 |
```
|
| 140 |
+
Light Green
|
| 141 |
+
#ffff00
|
| 142 |
+
yellow
|
| 143 |
+
Bordeaux
|
| 144 |
```
|
| 145 |
|
| 146 |
By default, the model is only trained to do 1) either emulate outputs if examples are provided, or 2) generate data based on the description. Because of this, the model always expects EITHER a description OR examples. If you want it to act slightly more like an instruction following chat model, you can add a description such as the following:
|
|
|
|
| 166 |
Some example generations:
|
| 167 |
```
|
| 168 |
Generation 0:
|
| 169 |
+
Swimming gracefully in the deep blue sea,
|
| 170 |
+
A shark glides by so elegantly.
|
| 171 |
+
Its sleek body moves with precision,
|
| 172 |
+
As it searches for its next meal with attention.
|
| 173 |
+
With fins that
|
| 174 |
Generation 1:
|
| 175 |
+
There once was a shark named Sandy, With a smile that would make you drooly. He swam in the deep blue sea, With friends who loved him oh so free.
|
| 176 |
Generation 2:
|
| 177 |
+
I was walking through the forest
|
| 178 |
+
and came across a shark.
|
| 179 |
+
I was terrified and ran away,
|
| 180 |
+
leaving the shark alone.
|
| 181 |
Generation 3:
|
| 182 |
+
In the depths of the ocean, where shadows roam,
|
| 183 |
+
Lurks a creature of ancient lore,
|
| 184 |
+
With jaws that snap and teeth like razors,
|
| 185 |
+
A shark swims through the deep,
|
| 186 |
```
|
| 187 |
|
| 188 |
|
|
|
|
| 219 |
```
|
| 220 |
Output:
|
| 221 |
```
|
| 222 |
+
{"situation": "Your family surprised you with tickets to your favorite bands concert.", "is_awkward": false}
|
| 223 |
+
{"situation": "Your boss is talking about how she is going on a trip and she starts to talk about how she is going to a fancy restaurant.", "is_awkward": false}
|
| 224 |
+
{"situation": "You show up at the hospital for an appointment and realize you are one day late.", "is_awkward": true}
|
| 225 |
+
{"situation": "Your crush tells you that they had a terrible day.", "is_awkward": true}
|
| 226 |
```
|
| 227 |
|
| 228 |
A few tips and tricks:
|