cfahlgren1 HF Staff commited on
Commit
3a19bc1
·
verified ·
1 Parent(s): c2cb1ec

flatten the repo to one model

Browse files
README.md CHANGED
@@ -53,11 +53,18 @@ The demo uses 40%.
53
 
54
  These numbers come from 5,000 places in emails from people the model never saw in training. "Right" means the suggestion exactly matched what the person typed next. Right suggestions are about 6 characters long on average.
55
 
56
- ## Which file to use
57
 
58
- Use `gru-512/model_quint8.onnx`. Everything on this page is about that model.
 
 
 
 
 
 
 
59
 
60
- I also tried a bigger version with 3.46M parameters and 3.5 MB. It wasn't better. When both models suggest equally often, 9% of the time, the small one is right about 85% of the time and the big one 82%. The big one got the same training settings and may need different ones to do well. Its test results are in [`gru-1024/report.json`](gru-1024/report.json).
61
 
62
  ## Use it
63
 
@@ -66,7 +73,7 @@ The model takes one character and its memory of the text so far. It returns its
66
  ```js
67
  import * as ort from "onnxruntime-web";
68
 
69
- const session = await ort.InferenceSession.create("gru-512/model_quint8.onnx", {
70
  executionProviders: ["wasm"],
71
  });
72
  let state = new ort.Tensor("float32", new Float32Array(512), [1, 512]);
 
53
 
54
  These numbers come from 5,000 places in emails from people the model never saw in training. "Right" means the suggestion exactly matched what the person typed next. Right suggestions are about 6 characters long on average.
55
 
56
+ ## Files
57
 
58
+ | File | What it is |
59
+ |---|---|
60
+ | `model_quint8.onnx` | The model to use. 0.98 MB. |
61
+ | `model.onnx` | The same model before shrinking. 3.8 MB. |
62
+ | `best.pt` | The PyTorch checkpoint. |
63
+ | `vocab.json` | The character ids. |
64
+ | `report.json` | The full training and test results. |
65
+ | `train.py` | The training script. |
66
 
67
+ I also tried a bigger version with 3.46M parameters and 3.5 MB. It wasn't better. When both models suggest equally often, 9% of the time, the small one is right about 85% of the time and the big one 82%. The big one got the same training settings and may need different ones to do well.
68
 
69
  ## Use it
70
 
 
73
  ```js
74
  import * as ort from "onnxruntime-web";
75
 
76
+ const session = await ort.InferenceSession.create("model_quint8.onnx", {
77
  executionProviders: ["wasm"],
78
  });
79
  let state = new ort.Tensor("float32", new Float32Array(512), [1, 512]);
gru-1024/report.json DELETED
@@ -1,548 +0,0 @@
1
- {
2
- "args": {
3
- "hidden": 1024,
4
- "epochs": 30,
5
- "batch": 256,
6
- "seq": 256,
7
- "burn_in": 32,
8
- "lr": 0.0015,
9
- "typo_rate": 0.08,
10
- "limit_frac": 1.0,
11
- "eval_positions": 5000,
12
- "context": 128,
13
- "horizon": 48,
14
- "repo": "cfahlgren1/email-autocomplete-gru",
15
- "run_name": "gru-1024",
16
- "no_push": false
17
- },
18
- "device": "cuda",
19
- "parameters": 3455202,
20
- "data": {
21
- "train": {
22
- "emails": 119859,
23
- "chars": 40136658
24
- },
25
- "val": {
26
- "emails": 8252,
27
- "chars": 2775980
28
- },
29
- "test": {
30
- "emails": 6922,
31
- "chars": 2710169
32
- }
33
- },
34
- "history": [
35
- {
36
- "epoch": 1,
37
- "train_loss": 1.8596,
38
- "val_loss": 1.5191,
39
- "seconds": 55.7,
40
- "chars_per_sec": 720188
41
- },
42
- {
43
- "epoch": 2,
44
- "train_loss": 1.4333,
45
- "val_loss": 1.4266,
46
- "seconds": 55.5,
47
- "chars_per_sec": 723185
48
- },
49
- {
50
- "epoch": 3,
51
- "train_loss": 1.3665,
52
- "val_loss": 1.3819,
53
- "seconds": 55.4,
54
- "chars_per_sec": 723324
55
- },
56
- {
57
- "epoch": 4,
58
- "train_loss": 1.3315,
59
- "val_loss": 1.362,
60
- "seconds": 55.5,
61
- "chars_per_sec": 723075
62
- },
63
- {
64
- "epoch": 5,
65
- "train_loss": 1.3059,
66
- "val_loss": 1.3342,
67
- "seconds": 55.5,
68
- "chars_per_sec": 722890
69
- },
70
- {
71
- "epoch": 6,
72
- "train_loss": 1.2868,
73
- "val_loss": 1.3185,
74
- "seconds": 55.5,
75
- "chars_per_sec": 722953
76
- },
77
- {
78
- "epoch": 7,
79
- "train_loss": 1.2707,
80
- "val_loss": 1.3043,
81
- "seconds": 55.5,
82
- "chars_per_sec": 723013
83
- },
84
- {
85
- "epoch": 8,
86
- "train_loss": 1.2574,
87
- "val_loss": 1.2968,
88
- "seconds": 55.4,
89
- "chars_per_sec": 723400
90
- },
91
- {
92
- "epoch": 9,
93
- "train_loss": 1.2459,
94
- "val_loss": 1.2835,
95
- "seconds": 55.5,
96
- "chars_per_sec": 723045
97
- },
98
- {
99
- "epoch": 10,
100
- "train_loss": 1.2354,
101
- "val_loss": 1.2769,
102
- "seconds": 55.5,
103
- "chars_per_sec": 722475
104
- },
105
- {
106
- "epoch": 11,
107
- "train_loss": 1.2265,
108
- "val_loss": 1.2713,
109
- "seconds": 55.5,
110
- "chars_per_sec": 722542
111
- },
112
- {
113
- "epoch": 12,
114
- "train_loss": 1.2184,
115
- "val_loss": 1.2632,
116
- "seconds": 55.4,
117
- "chars_per_sec": 723603
118
- },
119
- {
120
- "epoch": 13,
121
- "train_loss": 1.2111,
122
- "val_loss": 1.2572,
123
- "seconds": 55.7,
124
- "chars_per_sec": 720567
125
- },
126
- {
127
- "epoch": 14,
128
- "train_loss": 1.2039,
129
- "val_loss": 1.2495,
130
- "seconds": 55.5,
131
- "chars_per_sec": 723089
132
- },
133
- {
134
- "epoch": 15,
135
- "train_loss": 1.1984,
136
- "val_loss": 1.2443,
137
- "seconds": 55.4,
138
- "chars_per_sec": 723365
139
- },
140
- {
141
- "epoch": 16,
142
- "train_loss": 1.1929,
143
- "val_loss": 1.2407,
144
- "seconds": 55.4,
145
- "chars_per_sec": 723319
146
- },
147
- {
148
- "epoch": 17,
149
- "train_loss": 1.1875,
150
- "val_loss": 1.2363,
151
- "seconds": 55.4,
152
- "chars_per_sec": 723459
153
- },
154
- {
155
- "epoch": 18,
156
- "train_loss": 1.1832,
157
- "val_loss": 1.2317,
158
- "seconds": 55.4,
159
- "chars_per_sec": 723834
160
- },
161
- {
162
- "epoch": 19,
163
- "train_loss": 1.1786,
164
- "val_loss": 1.2282,
165
- "seconds": 55.4,
166
- "chars_per_sec": 723621
167
- },
168
- {
169
- "epoch": 20,
170
- "train_loss": 1.1746,
171
- "val_loss": 1.225,
172
- "seconds": 55.4,
173
- "chars_per_sec": 723320
174
- },
175
- {
176
- "epoch": 21,
177
- "train_loss": 1.1708,
178
- "val_loss": 1.2223,
179
- "seconds": 55.5,
180
- "chars_per_sec": 722922
181
- },
182
- {
183
- "epoch": 22,
184
- "train_loss": 1.1676,
185
- "val_loss": 1.2203,
186
- "seconds": 55.5,
187
- "chars_per_sec": 723142
188
- },
189
- {
190
- "epoch": 23,
191
- "train_loss": 1.1647,
192
- "val_loss": 1.217,
193
- "seconds": 55.5,
194
- "chars_per_sec": 723245
195
- },
196
- {
197
- "epoch": 24,
198
- "train_loss": 1.1615,
199
- "val_loss": 1.2153,
200
- "seconds": 55.4,
201
- "chars_per_sec": 723442
202
- },
203
- {
204
- "epoch": 25,
205
- "train_loss": 1.1597,
206
- "val_loss": 1.2136,
207
- "seconds": 55.5,
208
- "chars_per_sec": 723051
209
- },
210
- {
211
- "epoch": 26,
212
- "train_loss": 1.1576,
213
- "val_loss": 1.2121,
214
- "seconds": 55.4,
215
- "chars_per_sec": 723355
216
- },
217
- {
218
- "epoch": 27,
219
- "train_loss": 1.1561,
220
- "val_loss": 1.211,
221
- "seconds": 55.4,
222
- "chars_per_sec": 723432
223
- },
224
- {
225
- "epoch": 28,
226
- "train_loss": 1.1549,
227
- "val_loss": 1.2102,
228
- "seconds": 55.5,
229
- "chars_per_sec": 723253
230
- },
231
- {
232
- "epoch": 29,
233
- "train_loss": 1.1539,
234
- "val_loss": 1.2099,
235
- "seconds": 55.4,
236
- "chars_per_sec": 723672
237
- },
238
- {
239
- "epoch": 30,
240
- "train_loss": 1.1537,
241
- "val_loss": 1.2093,
242
- "seconds": 55.4,
243
- "chars_per_sec": 723458
244
- }
245
- ],
246
- "best_val_loss": 1.2093,
247
- "test_positions": 5000,
248
- "held_out_sender_suggestions": {
249
- "0.05": {
250
- "coverage": 0.5678,
251
- "precision": 0.2194,
252
- "avg_chars_when_correct": 6.43,
253
- "chars_saved_per_position": 0.801
254
- },
255
- "0.1": {
256
- "coverage": 0.4106,
257
- "precision": 0.3307,
258
- "avg_chars_when_correct": 6.03,
259
- "chars_saved_per_position": 0.818
260
- },
261
- "0.2": {
262
- "coverage": 0.2506,
263
- "precision": 0.4932,
264
- "avg_chars_when_correct": 5.83,
265
- "chars_saved_per_position": 0.721
266
- },
267
- "0.35": {
268
- "coverage": 0.1418,
269
- "precision": 0.6756,
270
- "avg_chars_when_correct": 5.59,
271
- "chars_saved_per_position": 0.535
272
- },
273
- "0.5": {
274
- "coverage": 0.0894,
275
- "precision": 0.8188,
276
- "avg_chars_when_correct": 5.53,
277
- "chars_saved_per_position": 0.405
278
- },
279
- "0.7": {
280
- "coverage": 0.0512,
281
- "precision": 0.9375,
282
- "avg_chars_when_correct": 5.12,
283
- "chars_saved_per_position": 0.246
284
- }
285
- },
286
- "exports": {
287
- "float": {
288
- "size_mb": 13.82,
289
- "native_cpu_single_thread_step": {
290
- "p50_ms": 0.459,
291
- "p95_ms": 0.497
292
- },
293
- "suggestions_1000_positions": {
294
- "0.05": {
295
- "coverage": 0.569,
296
- "precision": 0.2162,
297
- "avg_chars_when_correct": 6.09,
298
- "chars_saved_per_position": 0.749
299
- },
300
- "0.1": {
301
- "coverage": 0.415,
302
- "precision": 0.3373,
303
- "avg_chars_when_correct": 5.91,
304
- "chars_saved_per_position": 0.827
305
- },
306
- "0.2": {
307
- "coverage": 0.268,
308
- "precision": 0.4851,
309
- "avg_chars_when_correct": 5.83,
310
- "chars_saved_per_position": 0.758
311
- },
312
- "0.35": {
313
- "coverage": 0.151,
314
- "precision": 0.6291,
315
- "avg_chars_when_correct": 5.56,
316
- "chars_saved_per_position": 0.528
317
- },
318
- "0.5": {
319
- "coverage": 0.088,
320
- "precision": 0.7727,
321
- "avg_chars_when_correct": 5.6,
322
- "chars_saved_per_position": 0.381
323
- },
324
- "0.7": {
325
- "coverage": 0.054,
326
- "precision": 0.9444,
327
- "avg_chars_when_correct": 5.06,
328
- "chars_saved_per_position": 0.258
329
- }
330
- }
331
- },
332
- "quint8": {
333
- "size_mb": 3.5,
334
- "native_cpu_single_thread_step": {
335
- "p50_ms": 0.132,
336
- "p95_ms": 0.192
337
- },
338
- "suggestions_1000_positions": {
339
- "0.05": {
340
- "coverage": 0.574,
341
- "precision": 0.2108,
342
- "avg_chars_when_correct": 6.06,
343
- "chars_saved_per_position": 0.733
344
- },
345
- "0.1": {
346
- "coverage": 0.42,
347
- "precision": 0.3167,
348
- "avg_chars_when_correct": 5.9,
349
- "chars_saved_per_position": 0.785
350
- },
351
- "0.2": {
352
- "coverage": 0.262,
353
- "precision": 0.4809,
354
- "avg_chars_when_correct": 5.73,
355
- "chars_saved_per_position": 0.722
356
- },
357
- "0.35": {
358
- "coverage": 0.156,
359
- "precision": 0.6346,
360
- "avg_chars_when_correct": 5.57,
361
- "chars_saved_per_position": 0.551
362
- },
363
- "0.5": {
364
- "coverage": 0.085,
365
- "precision": 0.8235,
366
- "avg_chars_when_correct": 5.57,
367
- "chars_saved_per_position": 0.39
368
- },
369
- "0.7": {
370
- "coverage": 0.052,
371
- "precision": 0.9231,
372
- "avg_chars_when_correct": 5.17,
373
- "chars_saved_per_position": 0.248
374
- }
375
- }
376
- }
377
- },
378
- "prompt_samples": {
379
- "Hi John,\n\nThanks for ": {
380
- "continuation": "the message. I will be out of the office on Mond",
381
- "suggestion_at_0.2": "the"
382
- },
383
- "Please let me know if ": {
384
- "continuation": "you have any questions.\n\nThanks,\n\nKayI have a c",
385
- "suggestion_at_0.2": "you have any questions."
386
- },
387
- "I will send you ": {
388
- "continuation": "a copy of the following products and address and",
389
- "suggestion_at_0.2": "a"
390
- },
391
- "Let me kn": {
392
- "continuation": "ow if you have any questions.\n\nThanks,\n\nKayI ha",
393
- "suggestion_at_0.2": "ow if you have"
394
- },
395
- "Thnaks for the ": {
396
- "continuation": "attached file. I will be out of the office on Mo",
397
- "suggestion_at_0.2": ""
398
- },
399
- "I look forward to ": {
400
- "continuation": "seeing you and I will be out of the office on Mo",
401
- "suggestion_at_0.2": ""
402
- },
403
- "Can we schedule a ": {
404
- "continuation": "copy of the following products to the contract a",
405
- "suggestion_at_0.2": ""
406
- },
407
- "Sorry for the dela": {
408
- "continuation": "y. I will be out of the office on Monday and we ",
409
- "suggestion_at_0.2": "y."
410
- },
411
- "Plese find attached ": {
412
- "continuation": "the following agreements for the Enron Corp. and",
413
- "suggestion_at_0.2": "the"
414
- },
415
- "We need to discuss ": {
416
- "continuation": "the contract for the contract and the contract w",
417
- "suggestion_at_0.2": "the"
418
- }
419
- },
420
- "held_out_examples": [
421
- {
422
- "context": "ou trading a book yet? Playing any poker? Bingham was here f",
423
- "truth": "or Q-School last week. Didn't go so well.",
424
- "suggestion_at_0.2": "or"
425
- },
426
- {
427
- "context": "Please use this model. I had a few change",
428
- "truth": "s after talking to the guys in the west. Thanks!",
429
- "suggestion_at_0.2": "s to"
430
- },
431
- {
432
- "context": "not open the attachment. Please, send it as a MS Word docume",
433
- "truth": "nt or a .pdf file.",
434
- "suggestion_at_0.2": "nt"
435
- },
436
- {
437
- "context": "n I do to help. I would also like to visit on status of e*p ",
438
- "truth": "group and mariner.",
439
- "suggestion_at_0.2": ""
440
- },
441
- {
442
- "context": " complete hourly schedule for June 1, including IBM and inco",
443
- "truth": "rporating all known changes confirmed by that ti",
444
- "suggestion_at_0.2": "rporated"
445
- },
446
- {
447
- "context": " delivery rights at SoCal/Topock for at least a pro rata por",
448
- "truth": "tion of its released capacity.",
449
- "suggestion_at_0.2": "tion of"
450
- },
451
- {
452
- "context": "i talked to chris a li",
453
- "truth": "ttle bit and he is going to call back tonight at",
454
- "suggestion_at_0.2": "ttle"
455
- },
456
- {
457
- "context": " I might be missing something about the way you guys do thes",
458
- "truth": "e deals in Canada so I thought I would run this ",
459
- "suggestion_at_0.2": "e"
460
- },
461
- {
462
- "context": "Traci,\n\nThanks. This is the best solution given all the unce",
463
- "truth": "rtainties we face.",
464
- "suggestion_at_0.2": "rtainty"
465
- },
466
- {
467
- "context": "\nAquila,s strategy comes as little surprise to Stuebi. As mu",
468
- "truth": "ch success as the company has had, he said he th",
469
- "suggestion_at_0.2": "ch"
470
- },
471
- {
472
- "context": "Jim,\n\nWhat about 2 p.m., my time, on Friday, Au",
473
- "truth": "gust 17. If this works for you, I shall try to i",
474
- "suggestion_at_0.2": "gust"
475
- },
476
- {
477
- "context": "'s and CDD's for Philedelphia, Allentown Washington DC, Balt",
478
- "truth": "imore, Pittsburg, Newark, New York City, Cinncin",
479
- "suggestion_at_0.2": ""
480
- },
481
- {
482
- "context": " release.\n\nThe company will offer derivatives to hedge volat",
483
- "truth": "ile electricity prices.",
484
- "suggestion_at_0.2": "ility"
485
- },
486
- {
487
- "context": "day, I need access to West deals in Sitara. At a mininum I s",
488
- "truth": "till need access to all Chicago/Midwest deals al",
489
- "suggestion_at_0.2": "ent"
490
- },
491
- {
492
- "context": "on, attached for your review is a draft of the First Amendme",
493
- "truth": "nt to Master Agreement between Enron North Ameri",
494
- "suggestion_at_0.2": "nt"
495
- },
496
- {
497
- "context": "I have provided all the info that Tami Scudder ",
498
- "truth": "requested today.",
499
- "suggestion_at_0.2": ""
500
- },
501
- {
502
- "context": "ontana Power Company (MPC) System Border for Thursday and Fr",
503
- "truth": "iday (July 12, 13) @ $67.85/MWh. Thanks, John",
504
- "suggestion_at_0.2": ""
505
- },
506
- {
507
- "context": "e EnBank contracts physical or financial? It seems to me we ",
508
- "truth": "should use the same customer profiles - that is ",
509
- "suggestion_at_0.2": ""
510
- },
511
- {
512
- "context": "I have an appointment at 1:00 today and should be ",
513
- "truth": "back to the office between 2 - 2:30.",
514
- "suggestion_at_0.2": ""
515
- },
516
- {
517
- "context": "I'm glad everythi",
518
- "truth": "ng worked out for you. Hope you have a great tim",
519
- "suggestion_at_0.2": "ng is"
520
- },
521
- {
522
- "context": "o's Line 1100 from Eunice Station to Pecos River Station wil",
523
- "truth": "l be out of service for 16 hours Saturday beginn",
524
- "suggestion_at_0.2": "l be"
525
- },
526
- {
527
- "context": "rty\" in the second line of paragraph 1. Otherwise they look ",
528
- "truth": "great to me.",
529
- "suggestion_at_0.2": "forward to"
530
- },
531
- {
532
- "context": "on Houston in the next day or so.\n\nPlease call me if you hav",
533
- "truth": "e any questions.",
534
- "suggestion_at_0.2": "e any questions."
535
- },
536
- {
537
- "context": "s not guarantee any continuity of support for you.\n\nPlease, ",
538
- "truth": "let me know what you decide to do over the next ",
539
- "suggestion_at_0.2": "let"
540
- },
541
- {
542
- "context": " tend to agree with you, but Nora Dobin is the lawyer who kn",
543
- "truth": "ows the most about the DealBench system - you sh",
544
- "suggestion_at_0.2": "ows"
545
- }
546
- ],
547
- "total_seconds": 1805.1
548
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
gru-512/best.pt DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:8f2a663ad7a697a00ebf6bd15942824fcefa46975f9935c7ac6dd1eceedf3a36
3
- size 3780287
 
 
 
 
gru-512/model.onnx DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:1ccc402ffaa27e6382114ad0d44a2e5a01e9beabe9d81e3c3ae0ad2f9676627b
3
- size 3780016
 
 
 
 
gru-512/model_quint8.onnx DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:079424a9d2a72b9e5b2d6002c6466b836023c088780b7d292748f37564dc143b
3
- size 981294
 
 
 
 
gru-512/report.json DELETED
@@ -1,548 +0,0 @@
1
- {
2
- "args": {
3
- "hidden": 512,
4
- "epochs": 30,
5
- "batch": 256,
6
- "seq": 256,
7
- "burn_in": 32,
8
- "lr": 0.0015,
9
- "typo_rate": 0.08,
10
- "limit_frac": 1.0,
11
- "eval_positions": 5000,
12
- "context": 128,
13
- "horizon": 48,
14
- "repo": "cfahlgren1/email-autocomplete-gru",
15
- "run_name": "gru-512",
16
- "no_push": false
17
- },
18
- "device": "cuda",
19
- "parameters": 944354,
20
- "data": {
21
- "train": {
22
- "emails": 119859,
23
- "chars": 40136658
24
- },
25
- "val": {
26
- "emails": 8252,
27
- "chars": 2775980
28
- },
29
- "test": {
30
- "emails": 6922,
31
- "chars": 2710169
32
- }
33
- },
34
- "history": [
35
- {
36
- "epoch": 1,
37
- "train_loss": 1.7093,
38
- "val_loss": 1.3716,
39
- "seconds": 23.9,
40
- "chars_per_sec": 1678766
41
- },
42
- {
43
- "epoch": 2,
44
- "train_loss": 1.2792,
45
- "val_loss": 1.2911,
46
- "seconds": 23.6,
47
- "chars_per_sec": 1701572
48
- },
49
- {
50
- "epoch": 3,
51
- "train_loss": 1.2231,
52
- "val_loss": 1.2582,
53
- "seconds": 23.6,
54
- "chars_per_sec": 1700904
55
- },
56
- {
57
- "epoch": 4,
58
- "train_loss": 1.195,
59
- "val_loss": 1.2396,
60
- "seconds": 23.6,
61
- "chars_per_sec": 1702926
62
- },
63
- {
64
- "epoch": 5,
65
- "train_loss": 1.1768,
66
- "val_loss": 1.2254,
67
- "seconds": 23.5,
68
- "chars_per_sec": 1703932
69
- },
70
- {
71
- "epoch": 6,
72
- "train_loss": 1.1639,
73
- "val_loss": 1.2171,
74
- "seconds": 23.6,
75
- "chars_per_sec": 1701905
76
- },
77
- {
78
- "epoch": 7,
79
- "train_loss": 1.1538,
80
- "val_loss": 1.2087,
81
- "seconds": 23.6,
82
- "chars_per_sec": 1701450
83
- },
84
- {
85
- "epoch": 8,
86
- "train_loss": 1.1456,
87
- "val_loss": 1.2043,
88
- "seconds": 23.6,
89
- "chars_per_sec": 1702601
90
- },
91
- {
92
- "epoch": 9,
93
- "train_loss": 1.1388,
94
- "val_loss": 1.1969,
95
- "seconds": 23.5,
96
- "chars_per_sec": 1703175
97
- },
98
- {
99
- "epoch": 10,
100
- "train_loss": 1.1327,
101
- "val_loss": 1.193,
102
- "seconds": 23.6,
103
- "chars_per_sec": 1701059
104
- },
105
- {
106
- "epoch": 11,
107
- "train_loss": 1.1276,
108
- "val_loss": 1.1895,
109
- "seconds": 23.6,
110
- "chars_per_sec": 1702827
111
- },
112
- {
113
- "epoch": 12,
114
- "train_loss": 1.1228,
115
- "val_loss": 1.1856,
116
- "seconds": 23.6,
117
- "chars_per_sec": 1700650
118
- },
119
- {
120
- "epoch": 13,
121
- "train_loss": 1.1186,
122
- "val_loss": 1.1824,
123
- "seconds": 23.5,
124
- "chars_per_sec": 1703353
125
- },
126
- {
127
- "epoch": 14,
128
- "train_loss": 1.1141,
129
- "val_loss": 1.1791,
130
- "seconds": 23.6,
131
- "chars_per_sec": 1702586
132
- },
133
- {
134
- "epoch": 15,
135
- "train_loss": 1.1108,
136
- "val_loss": 1.1765,
137
- "seconds": 23.6,
138
- "chars_per_sec": 1702570
139
- },
140
- {
141
- "epoch": 16,
142
- "train_loss": 1.1075,
143
- "val_loss": 1.175,
144
- "seconds": 23.6,
145
- "chars_per_sec": 1702686
146
- },
147
- {
148
- "epoch": 17,
149
- "train_loss": 1.1041,
150
- "val_loss": 1.1718,
151
- "seconds": 23.5,
152
- "chars_per_sec": 1703957
153
- },
154
- {
155
- "epoch": 18,
156
- "train_loss": 1.1015,
157
- "val_loss": 1.17,
158
- "seconds": 23.6,
159
- "chars_per_sec": 1701778
160
- },
161
- {
162
- "epoch": 19,
163
- "train_loss": 1.0985,
164
- "val_loss": 1.1678,
165
- "seconds": 23.6,
166
- "chars_per_sec": 1702612
167
- },
168
- {
169
- "epoch": 20,
170
- "train_loss": 1.0959,
171
- "val_loss": 1.1659,
172
- "seconds": 23.6,
173
- "chars_per_sec": 1702960
174
- },
175
- {
176
- "epoch": 21,
177
- "train_loss": 1.0935,
178
- "val_loss": 1.1642,
179
- "seconds": 23.6,
180
- "chars_per_sec": 1701776
181
- },
182
- {
183
- "epoch": 22,
184
- "train_loss": 1.0913,
185
- "val_loss": 1.1632,
186
- "seconds": 23.6,
187
- "chars_per_sec": 1702317
188
- },
189
- {
190
- "epoch": 23,
191
- "train_loss": 1.0896,
192
- "val_loss": 1.1624,
193
- "seconds": 23.6,
194
- "chars_per_sec": 1701215
195
- },
196
- {
197
- "epoch": 24,
198
- "train_loss": 1.0874,
199
- "val_loss": 1.1613,
200
- "seconds": 23.6,
201
- "chars_per_sec": 1701278
202
- },
203
- {
204
- "epoch": 25,
205
- "train_loss": 1.0863,
206
- "val_loss": 1.1606,
207
- "seconds": 23.6,
208
- "chars_per_sec": 1700749
209
- },
210
- {
211
- "epoch": 26,
212
- "train_loss": 1.085,
213
- "val_loss": 1.1596,
214
- "seconds": 23.6,
215
- "chars_per_sec": 1701575
216
- },
217
- {
218
- "epoch": 27,
219
- "train_loss": 1.0839,
220
- "val_loss": 1.1592,
221
- "seconds": 23.6,
222
- "chars_per_sec": 1699705
223
- },
224
- {
225
- "epoch": 28,
226
- "train_loss": 1.083,
227
- "val_loss": 1.1588,
228
- "seconds": 23.6,
229
- "chars_per_sec": 1700990
230
- },
231
- {
232
- "epoch": 29,
233
- "train_loss": 1.0823,
234
- "val_loss": 1.1588,
235
- "seconds": 23.6,
236
- "chars_per_sec": 1702216
237
- },
238
- {
239
- "epoch": 30,
240
- "train_loss": 1.0821,
241
- "val_loss": 1.1586,
242
- "seconds": 23.5,
243
- "chars_per_sec": 1704907
244
- }
245
- ],
246
- "best_val_loss": 1.1586,
247
- "test_positions": 5000,
248
- "held_out_sender_suggestions": {
249
- "0.05": {
250
- "coverage": 0.624,
251
- "precision": 0.2064,
252
- "avg_chars_when_correct": 6.93,
253
- "chars_saved_per_position": 0.892
254
- },
255
- "0.1": {
256
- "coverage": 0.4622,
257
- "precision": 0.3124,
258
- "avg_chars_when_correct": 6.41,
259
- "chars_saved_per_position": 0.925
260
- },
261
- "0.2": {
262
- "coverage": 0.2974,
263
- "precision": 0.4808,
264
- "avg_chars_when_correct": 6.03,
265
- "chars_saved_per_position": 0.863
266
- },
267
- "0.35": {
268
- "coverage": 0.1796,
269
- "precision": 0.6559,
270
- "avg_chars_when_correct": 5.8,
271
- "chars_saved_per_position": 0.683
272
- },
273
- "0.5": {
274
- "coverage": 0.1114,
275
- "precision": 0.7953,
276
- "avg_chars_when_correct": 5.64,
277
- "chars_saved_per_position": 0.5
278
- },
279
- "0.7": {
280
- "coverage": 0.0694,
281
- "precision": 0.8991,
282
- "avg_chars_when_correct": 5.4,
283
- "chars_saved_per_position": 0.337
284
- }
285
- },
286
- "exports": {
287
- "float": {
288
- "size_mb": 3.78,
289
- "native_cpu_single_thread_step": {
290
- "p50_ms": 0.114,
291
- "p95_ms": 0.125
292
- },
293
- "suggestions_1000_positions": {
294
- "0.05": {
295
- "coverage": 0.638,
296
- "precision": 0.2132,
297
- "avg_chars_when_correct": 6.7,
298
- "chars_saved_per_position": 0.911
299
- },
300
- "0.1": {
301
- "coverage": 0.496,
302
- "precision": 0.3085,
303
- "avg_chars_when_correct": 6.3,
304
- "chars_saved_per_position": 0.964
305
- },
306
- "0.2": {
307
- "coverage": 0.312,
308
- "precision": 0.4583,
309
- "avg_chars_when_correct": 5.94,
310
- "chars_saved_per_position": 0.849
311
- },
312
- "0.35": {
313
- "coverage": 0.202,
314
- "precision": 0.604,
315
- "avg_chars_when_correct": 5.77,
316
- "chars_saved_per_position": 0.704
317
- },
318
- "0.5": {
319
- "coverage": 0.119,
320
- "precision": 0.7479,
321
- "avg_chars_when_correct": 5.58,
322
- "chars_saved_per_position": 0.497
323
- },
324
- "0.7": {
325
- "coverage": 0.078,
326
- "precision": 0.8718,
327
- "avg_chars_when_correct": 5.21,
328
- "chars_saved_per_position": 0.354
329
- }
330
- }
331
- },
332
- "quint8": {
333
- "size_mb": 0.98,
334
- "native_cpu_single_thread_step": {
335
- "p50_ms": 0.059,
336
- "p95_ms": 0.084
337
- },
338
- "suggestions_1000_positions": {
339
- "0.05": {
340
- "coverage": 0.655,
341
- "precision": 0.2,
342
- "avg_chars_when_correct": 6.83,
343
- "chars_saved_per_position": 0.895
344
- },
345
- "0.1": {
346
- "coverage": 0.492,
347
- "precision": 0.311,
348
- "avg_chars_when_correct": 6.35,
349
- "chars_saved_per_position": 0.971
350
- },
351
- "0.2": {
352
- "coverage": 0.318,
353
- "precision": 0.4686,
354
- "avg_chars_when_correct": 5.97,
355
- "chars_saved_per_position": 0.89
356
- },
357
- "0.35": {
358
- "coverage": 0.198,
359
- "precision": 0.6414,
360
- "avg_chars_when_correct": 5.66,
361
- "chars_saved_per_position": 0.719
362
- },
363
- "0.5": {
364
- "coverage": 0.123,
365
- "precision": 0.7642,
366
- "avg_chars_when_correct": 5.53,
367
- "chars_saved_per_position": 0.52
368
- },
369
- "0.7": {
370
- "coverage": 0.081,
371
- "precision": 0.8889,
372
- "avg_chars_when_correct": 5.42,
373
- "chars_saved_per_position": 0.39
374
- }
375
- }
376
- }
377
- },
378
- "prompt_samples": {
379
- "Hi John,\n\nThanks for ": {
380
- "continuation": "the info. I will be out of the office tomorrow a",
381
- "suggestion_at_0.2": "the"
382
- },
383
- "Please let me know if ": {
384
- "continuation": "you have any questions.\n\nThanks,\n\nKayThe follow",
385
- "suggestion_at_0.2": "you have any"
386
- },
387
- "I will send you ": {
388
- "continuation": "a copy of the attached document. I will be out o",
389
- "suggestion_at_0.2": "a"
390
- },
391
- "Let me kn": {
392
- "continuation": "ow if you have any questions.\n\nThanks,\n\nKayThe ",
393
- "suggestion_at_0.2": "ow if you have"
394
- },
395
- "Thnaks for the ": {
396
- "continuation": "info. I will be out of the office tomorrow and w",
397
- "suggestion_at_0.2": ""
398
- },
399
- "I look forward to ": {
400
- "continuation": "seeing you there. I will be out of the office to",
401
- "suggestion_at_0.2": ""
402
- },
403
- "Can we schedule a ": {
404
- "continuation": "meeting to discuss the attached spreadsheet for ",
405
- "suggestion_at_0.2": "meeting"
406
- },
407
- "Sorry for the dela": {
408
- "continuation": "y. I will be out of the office tomorrow and we w",
409
- "suggestion_at_0.2": "y."
410
- },
411
- "Plese find attached ": {
412
- "continuation": "the following contract for the Enron Corp. Gas P",
413
- "suggestion_at_0.2": "the"
414
- },
415
- "We need to discuss ": {
416
- "continuation": "the attached spreadsheet for the following dates",
417
- "suggestion_at_0.2": "the"
418
- }
419
- },
420
- "held_out_examples": [
421
- {
422
- "context": "ou trading a book yet? Playing any poker? Bingham was here f",
423
- "truth": "or Q-School last week. Didn't go so well.",
424
- "suggestion_at_0.2": "or"
425
- },
426
- {
427
- "context": "Please use this model. I had a few change",
428
- "truth": "s after talking to the guys in the west. Thanks!",
429
- "suggestion_at_0.2": "s to"
430
- },
431
- {
432
- "context": "not open the attachment. Please, send it as a MS Word docume",
433
- "truth": "nt or a .pdf file.",
434
- "suggestion_at_0.2": "nt."
435
- },
436
- {
437
- "context": "n I do to help. I would also like to visit on status of e*p ",
438
- "truth": "group and mariner.",
439
- "suggestion_at_0.2": ""
440
- },
441
- {
442
- "context": " complete hourly schedule for June 1, including IBM and inco",
443
- "truth": "rporating all known changes confirmed by that ti",
444
- "suggestion_at_0.2": "me"
445
- },
446
- {
447
- "context": " delivery rights at SoCal/Topock for at least a pro rata por",
448
- "truth": "tion of its released capacity.",
449
- "suggestion_at_0.2": "tion of"
450
- },
451
- {
452
- "context": "i talked to chris a li",
453
- "truth": "ttle bit and he is going to call back tonight at",
454
- "suggestion_at_0.2": "ttle"
455
- },
456
- {
457
- "context": " I might be missing something about the way you guys do thes",
458
- "truth": "e deals in Canada so I thought I would run this ",
459
- "suggestion_at_0.2": "e"
460
- },
461
- {
462
- "context": "Traci,\n\nThanks. This is the best solution given all the unce",
463
- "truth": "rtainties we face.",
464
- "suggestion_at_0.2": "rtainty"
465
- },
466
- {
467
- "context": "\nAquila,s strategy comes as little surprise to Stuebi. As mu",
468
- "truth": "ch success as the company has had, he said he th",
469
- "suggestion_at_0.2": "ch"
470
- },
471
- {
472
- "context": "Jim,\n\nWhat about 2 p.m., my time, on Friday, Au",
473
- "truth": "gust 17. If this works for you, I shall try to i",
474
- "suggestion_at_0.2": "gust"
475
- },
476
- {
477
- "context": "'s and CDD's for Philedelphia, Allentown Washington DC, Balt",
478
- "truth": "imore, Pittsburg, Newark, New York City, Cinncin",
479
- "suggestion_at_0.2": "imore"
480
- },
481
- {
482
- "context": " release.\n\nThe company will offer derivatives to hedge volat",
483
- "truth": "ile electricity prices.",
484
- "suggestion_at_0.2": "ility"
485
- },
486
- {
487
- "context": "day, I need access to West deals in Sitara. At a mininum I s",
488
- "truth": "till need access to all Chicago/Midwest deals al",
489
- "suggestion_at_0.2": "ent"
490
- },
491
- {
492
- "context": "on, attached for your review is a draft of the First Amendme",
493
- "truth": "nt to Master Agreement between Enron North Ameri",
494
- "suggestion_at_0.2": "nt to"
495
- },
496
- {
497
- "context": "I have provided all the info that Tami Scudder ",
498
- "truth": "requested today.",
499
- "suggestion_at_0.2": "is"
500
- },
501
- {
502
- "context": "ontana Power Company (MPC) System Border for Thursday and Fr",
503
- "truth": "iday (July 12, 13) @ $67.85/MWh. Thanks, John",
504
- "suggestion_at_0.2": "iday"
505
- },
506
- {
507
- "context": "e EnBank contracts physical or financial? It seems to me we ",
508
- "truth": "should use the same customer profiles - that is ",
509
- "suggestion_at_0.2": ""
510
- },
511
- {
512
- "context": "I have an appointment at 1:00 today and should be ",
513
- "truth": "back to the office between 2 - 2:30.",
514
- "suggestion_at_0.2": ""
515
- },
516
- {
517
- "context": "I'm glad everythi",
518
- "truth": "ng worked out for you. Hope you have a great tim",
519
- "suggestion_at_0.2": "ng is"
520
- },
521
- {
522
- "context": "o's Line 1100 from Eunice Station to Pecos River Station wil",
523
- "truth": "l be out of service for 16 hours Saturday beginn",
524
- "suggestion_at_0.2": "l be"
525
- },
526
- {
527
- "context": "rty\" in the second line of paragraph 1. Otherwise they look ",
528
- "truth": "great to me.",
529
- "suggestion_at_0.2": ""
530
- },
531
- {
532
- "context": "on Houston in the next day or so.\n\nPlease call me if you hav",
533
- "truth": "e any questions.",
534
- "suggestion_at_0.2": "e any questions."
535
- },
536
- {
537
- "context": "s not guarantee any continuity of support for you.\n\nPlease, ",
538
- "truth": "let me know what you decide to do over the next ",
539
- "suggestion_at_0.2": ""
540
- },
541
- {
542
- "context": " tend to agree with you, but Nora Dobin is the lawyer who kn",
543
- "truth": "ows the most about the DealBench system - you sh",
544
- "suggestion_at_0.2": "ows"
545
- }
546
- ],
547
- "total_seconds": 831.5
548
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
gru-512/vocab.json DELETED
@@ -1,9 +0,0 @@
1
- {
2
- "pad": 0,
3
- "eos": 1,
4
- "newline": 2,
5
- "first_printable_id": 3,
6
- "first_printable_codepoint": 32,
7
- "size": 98,
8
- "hidden": 512
9
- }
 
 
 
 
 
 
 
 
 
 
train.py CHANGED
@@ -434,7 +434,6 @@ def parse_args():
434
  parser.add_argument("--context", type=int, default=128)
435
  parser.add_argument("--horizon", type=int, default=48)
436
  parser.add_argument("--repo", default="cfahlgren1/enron-autocomplete")
437
- parser.add_argument("--run-name", default="gru-512")
438
  parser.add_argument("--no-push", action="store_true")
439
  return parser.parse_args()
440
 
@@ -445,7 +444,7 @@ def main():
445
  rng = np.random.default_rng(0)
446
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
447
  print(f"device={device} {torch.cuda.get_device_name(0) if device.type == 'cuda' else ''} args={vars(args)}", flush=True)
448
- output = Path("outputs") / args.run_name
449
  output.mkdir(parents=True, exist_ok=True)
450
 
451
  started = time.time()
@@ -550,8 +549,8 @@ def main():
550
  return
551
  api = HfApi(token=os.environ["HF_TOKEN"])
552
  api.create_repo(args.repo, repo_type="model", private=True, exist_ok=True)
553
- api.upload_folder(folder_path=str(output), repo_id=args.repo, path_in_repo=args.run_name, repo_type="model")
554
- print(f"Uploaded to https://huggingface.co/{args.repo}/tree/main/{args.run_name}", flush=True)
555
 
556
 
557
  if __name__ == "__main__":
 
434
  parser.add_argument("--context", type=int, default=128)
435
  parser.add_argument("--horizon", type=int, default=48)
436
  parser.add_argument("--repo", default="cfahlgren1/enron-autocomplete")
 
437
  parser.add_argument("--no-push", action="store_true")
438
  return parser.parse_args()
439
 
 
444
  rng = np.random.default_rng(0)
445
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
446
  print(f"device={device} {torch.cuda.get_device_name(0) if device.type == 'cuda' else ''} args={vars(args)}", flush=True)
447
+ output = Path("outputs")
448
  output.mkdir(parents=True, exist_ok=True)
449
 
450
  started = time.time()
 
549
  return
550
  api = HfApi(token=os.environ["HF_TOKEN"])
551
  api.create_repo(args.repo, repo_type="model", private=True, exist_ok=True)
552
+ api.upload_folder(folder_path=str(output), repo_id=args.repo, repo_type="model")
553
+ print(f"Uploaded to https://huggingface.co/{args.repo}", flush=True)
554
 
555
 
556
  if __name__ == "__main__":