"vscode:/vscode.git/clone" did not exist on "fa8e34edeaabf37b0302ebf91c8b075ec7906cc5"
Unverified Commit 87dc034b authored by OlivierDehaene's avatar OlivierDehaene Committed by GitHub
Browse files

feat(server): add retry on download (#384)

parent 444400b4
...@@ -12,22 +12,22 @@ ...@@ -12,22 +12,22 @@
}, },
{ {
"id": 330, "id": 330,
"logprob": -5.71875, "logprob": -5.96875,
"text": "ir" "text": "ir"
}, },
{ {
"id": 1622, "id": 1622,
"logprob": -5.625, "logprob": -5.6171875,
"text": "af" "text": "af"
}, },
{ {
"id": 249, "id": 249,
"logprob": -6.53125, "logprob": -6.5039062,
"text": "at" "text": "at"
}, },
{ {
"id": 1480, "id": 1480,
"logprob": -8.0625, "logprob": -8.0703125,
"text": "ron" "text": "ron"
}, },
{ {
...@@ -37,27 +37,27 @@ ...@@ -37,27 +37,27 @@
}, },
{ {
"id": 23866, "id": 23866,
"logprob": -9.625, "logprob": -9.59375,
"text": " obsessed" "text": " obsessed"
}, },
{ {
"id": 335, "id": 335,
"logprob": -0.048583984, "logprob": -0.04837036,
"text": " with" "text": " with"
}, },
{ {
"id": 26680, "id": 26680,
"logprob": -3.984375, "logprob": -3.9960938,
"text": " gir" "text": " gir"
}, },
{ {
"id": 1903, "id": 1903,
"logprob": -0.076171875, "logprob": -0.07525635,
"text": "aff" "text": "aff"
}, },
{ {
"id": 255, "id": 255,
"logprob": -0.0066833496, "logprob": -0.006790161,
"text": "es" "text": "es"
}, },
{ {
...@@ -67,82 +67,82 @@ ...@@ -67,82 +67,82 @@
}, },
{ {
"id": 248, "id": 248,
"logprob": -4.34375, "logprob": -4.3320312,
"text": " the" "text": " the"
}, },
{ {
"id": 758, "id": 758,
"logprob": -3.734375, "logprob": -3.7363281,
"text": " most" "text": " most"
}, },
{ {
"id": 21735, "id": 21735,
"logprob": -5.125, "logprob": -5.109375,
"text": " glorious" "text": " glorious"
}, },
{ {
"id": 5985, "id": 5985,
"logprob": -2.078125, "logprob": -2.09375,
"text": " animal" "text": " animal"
}, },
{ {
"id": 313, "id": 313,
"logprob": -1.1953125, "logprob": -1.1845703,
"text": " on" "text": " on"
}, },
{ {
"id": 248, "id": 248,
"logprob": -0.78125, "logprob": -0.77734375,
"text": " the" "text": " the"
}, },
{ {
"id": 1936, "id": 1936,
"logprob": -2.390625, "logprob": -2.3828125,
"text": " face" "text": " face"
}, },
{ {
"id": 275, "id": 275,
"logprob": -0.0044555664, "logprob": -0.0044403076,
"text": " of" "text": " of"
}, },
{ {
"id": 414, "id": 414,
"logprob": -1.984375, "logprob": -1.9667969,
"text": " this" "text": " this"
}, },
{ {
"id": 6490, "id": 6490,
"logprob": -2.03125, "logprob": -2.0449219,
"text": " Earth" "text": " Earth"
}, },
{ {
"id": 25, "id": 25,
"logprob": -0.28320312, "logprob": -0.28198242,
"text": "." "text": "."
}, },
{ {
"id": 401, "id": 401,
"logprob": -7.90625, "logprob": -7.921875,
"text": " G" "text": " G"
}, },
{ {
"id": 6013, "id": 6013,
"logprob": -2.265625, "logprob": -2.2714844,
"text": "ira" "text": "ira"
}, },
{ {
"id": 694, "id": 694,
"logprob": -0.640625, "logprob": -0.62353516,
"text": "ft" "text": "ft"
}, },
{ {
"id": 1480, "id": 1480,
"logprob": -0.203125, "logprob": -0.20947266,
"text": "ron" "text": "ron"
}, },
{ {
"id": 9369, "id": 9369,
"logprob": -4.53125, "logprob": -4.5507812,
"text": " believes" "text": " believes"
}, },
{ {
...@@ -152,32 +152,32 @@ ...@@ -152,32 +152,32 @@
}, },
{ {
"id": 599, "id": 599,
"logprob": -2.75, "logprob": -2.7402344,
"text": " other" "text": " other"
}, },
{ {
"id": 5632, "id": 5632,
"logprob": -0.21875, "logprob": -0.21899414,
"text": " animals" "text": " animals"
}, },
{ {
"id": 362, "id": 362,
"logprob": -0.76171875, "logprob": -0.76708984,
"text": " are" "text": " are"
}, },
{ {
"id": 23981, "id": 23981,
"logprob": -4.96875, "logprob": -4.9960938,
"text": " irrelevant" "text": " irrelevant"
}, },
{ {
"id": 635, "id": 635,
"logprob": -4.21875, "logprob": -4.234375,
"text": " when" "text": " when"
}, },
{ {
"id": 4354, "id": 4354,
"logprob": -0.51953125, "logprob": -0.5131836,
"text": " compared" "text": " compared"
}, },
{ {
...@@ -187,47 +187,47 @@ ...@@ -187,47 +187,47 @@
}, },
{ {
"id": 248, "id": 248,
"logprob": -0.58984375, "logprob": -0.58447266,
"text": " the" "text": " the"
}, },
{ {
"id": 21735, "id": 21735,
"logprob": -3.6875, "logprob": -3.6796875,
"text": " glorious" "text": " glorious"
}, },
{ {
"id": 64398, "id": 64398,
"logprob": -1.8359375, "logprob": -1.8222656,
"text": " majesty" "text": " majesty"
}, },
{ {
"id": 275, "id": 275,
"logprob": -0.24316406, "logprob": -0.23583984,
"text": " of" "text": " of"
}, },
{ {
"id": 248, "id": 248,
"logprob": -0.3515625, "logprob": -0.3544922,
"text": " the" "text": " the"
}, },
{ {
"id": 26680, "id": 26680,
"logprob": -0.24414062, "logprob": -0.24609375,
"text": " gir" "text": " gir"
}, },
{ {
"id": 23226, "id": 23226,
"logprob": -0.03100586, "logprob": -0.02960205,
"text": "affe" "text": "affe"
}, },
{ {
"id": 25, "id": 25,
"logprob": -0.17382812, "logprob": -0.17358398,
"text": "." "text": "."
}, },
{ {
"id": 193, "id": 193,
"logprob": -1.3984375, "logprob": -1.3925781,
"text": "\n" "text": "\n"
}, },
{ {
...@@ -237,7 +237,7 @@ ...@@ -237,7 +237,7 @@
}, },
{ {
"id": 37, "id": 37,
"logprob": -4.59375, "logprob": -4.5898438,
"text": ":" "text": ":"
}, },
{ {
...@@ -247,67 +247,67 @@ ...@@ -247,67 +247,67 @@
}, },
{ {
"id": 23, "id": 23,
"logprob": -1.0, "logprob": -0.99365234,
"text": "," "text": ","
}, },
{ {
"id": 29033, "id": 29033,
"logprob": -2.21875, "logprob": -2.2304688,
"text": " Gir" "text": " Gir"
}, },
{ {
"id": 1622, "id": 1622,
"logprob": -0.10644531, "logprob": -0.107788086,
"text": "af" "text": "af"
}, },
{ {
"id": 249, "id": 249,
"logprob": -0.041992188, "logprob": -0.04257202,
"text": "at" "text": "at"
}, },
{ {
"id": 1480, "id": 1480,
"logprob": -0.0025024414, "logprob": -0.0024871826,
"text": "ron" "text": "ron"
}, },
{ {
"id": 12, "id": 12,
"logprob": -1.4296875, "logprob": -1.4277344,
"text": "!" "text": "!"
}, },
{ {
"id": 193, "id": 193,
"logprob": -1.1015625, "logprob": -1.1005859,
"text": "\n" "text": "\n"
}, },
{ {
"id": 50, "id": 50,
"logprob": -0.05810547, "logprob": -0.056915283,
"text": "G" "text": "G"
}, },
{ {
"id": 330, "id": 330,
"logprob": -0.12597656, "logprob": -0.1315918,
"text": "ir" "text": "ir"
}, },
{ {
"id": 1622, "id": 1622,
"logprob": -0.007080078, "logprob": -0.0071105957,
"text": "af" "text": "af"
}, },
{ {
"id": 249, "id": 249,
"logprob": -0.008300781, "logprob": -0.008453369,
"text": "at" "text": "at"
}, },
{ {
"id": 1480, "id": 1480,
"logprob": -0.0006866455, "logprob": -0.0006928444,
"text": "ron" "text": "ron"
}, },
{ {
"id": 37, "id": 37,
"logprob": -0.0074157715, "logprob": -0.0074920654,
"text": ":" "text": ":"
} }
], ],
...@@ -315,37 +315,37 @@ ...@@ -315,37 +315,37 @@
"tokens": [ "tokens": [
{ {
"id": 23090, "id": 23090,
"logprob": -1.8203125, "logprob": -1.828125,
"special": false, "special": false,
"text": " Hello" "text": " Hello"
}, },
{ {
"id": 23, "id": 23,
"logprob": -0.32226562, "logprob": -0.3178711,
"special": false, "special": false,
"text": "," "text": ","
}, },
{ {
"id": 8156, "id": 8156,
"logprob": -0.23828125, "logprob": -0.23925781,
"special": false, "special": false,
"text": " Daniel" "text": " Daniel"
}, },
{ {
"id": 12, "id": 12,
"logprob": -0.5859375, "logprob": -0.5698242,
"special": false, "special": false,
"text": "!" "text": "!"
}, },
{ {
"id": 193, "id": 193,
"logprob": -0.6171875, "logprob": -0.61279297,
"special": false, "special": false,
"text": "\n" "text": "\n"
}, },
{ {
"id": 23626, "id": 23626,
"logprob": -0.39648438, "logprob": -0.4177246,
"special": false, "special": false,
"text": "Daniel" "text": "Daniel"
}, },
...@@ -356,26 +356,26 @@ ...@@ -356,26 +356,26 @@
"text": ":" "text": ":"
}, },
{ {
"id": 295, "id": 1634,
"logprob": -2.078125, "logprob": -2.0605469,
"special": false, "special": false,
"text": " I" "text": " What"
}, },
{ {
"id": 18, "id": 18,
"logprob": -1.453125, "logprob": -1.5283203,
"special": false, "special": false,
"text": "'" "text": "'"
}, },
{ {
"id": 88, "id": 94,
"logprob": -0.47460938, "logprob": -0.007965088,
"special": false, "special": false,
"text": "m" "text": "s"
} }
] ]
}, },
"generated_text": " Hello, Daniel!\nDaniel: I'm" "generated_text": " Hello, Daniel!\nDaniel: What's"
}, },
{ {
"details": { "details": {
...@@ -390,22 +390,22 @@ ...@@ -390,22 +390,22 @@
}, },
{ {
"id": 330, "id": 330,
"logprob": -5.71875, "logprob": -5.96875,
"text": "ir" "text": "ir"
}, },
{ {
"id": 1622, "id": 1622,
"logprob": -5.625, "logprob": -5.6171875,
"text": "af" "text": "af"
}, },
{ {
"id": 249, "id": 249,
"logprob": -6.53125, "logprob": -6.5,
"text": "at" "text": "at"
}, },
{ {
"id": 1480, "id": 1480,
"logprob": -8.0625, "logprob": -8.0703125,
"text": "ron" "text": "ron"
}, },
{ {
...@@ -415,197 +415,197 @@ ...@@ -415,197 +415,197 @@
}, },
{ {
"id": 23866, "id": 23866,
"logprob": -9.625, "logprob": -9.59375,
"text": " obsessed" "text": " obsessed"
}, },
{ {
"id": 335, "id": 335,
"logprob": -0.048583984, "logprob": -0.048339844,
"text": " with" "text": " with"
}, },
{ {
"id": 26680, "id": 26680,
"logprob": -3.984375, "logprob": -4.0,
"text": " gir" "text": " gir"
}, },
{ {
"id": 1903, "id": 1903,
"logprob": -0.076171875, "logprob": -0.07531738,
"text": "aff" "text": "aff"
}, },
{ {
"id": 255, "id": 255,
"logprob": -0.0066833496, "logprob": -0.006793976,
"text": "es" "text": "es"
}, },
{ {
"id": 23, "id": 23,
"logprob": -1.546875, "logprob": -1.5478516,
"text": "," "text": ","
}, },
{ {
"id": 248, "id": 248,
"logprob": -4.34375, "logprob": -4.3320312,
"text": " the" "text": " the"
}, },
{ {
"id": 758, "id": 758,
"logprob": -3.734375, "logprob": -3.7363281,
"text": " most" "text": " most"
}, },
{ {
"id": 21735, "id": 21735,
"logprob": -5.125, "logprob": -5.1132812,
"text": " glorious" "text": " glorious"
}, },
{ {
"id": 5985, "id": 5985,
"logprob": -2.078125, "logprob": -2.0957031,
"text": " animal" "text": " animal"
}, },
{ {
"id": 313, "id": 313,
"logprob": -1.1953125, "logprob": -1.1835938,
"text": " on" "text": " on"
}, },
{ {
"id": 248, "id": 248,
"logprob": -0.78125, "logprob": -0.77685547,
"text": " the" "text": " the"
}, },
{ {
"id": 1936, "id": 1936,
"logprob": -2.390625, "logprob": -2.3808594,
"text": " face" "text": " face"
}, },
{ {
"id": 275, "id": 275,
"logprob": -0.0044555664, "logprob": -0.004436493,
"text": " of" "text": " of"
}, },
{ {
"id": 414, "id": 414,
"logprob": -1.984375, "logprob": -1.9638672,
"text": " this" "text": " this"
}, },
{ {
"id": 6490, "id": 6490,
"logprob": -2.03125, "logprob": -2.0449219,
"text": " Earth" "text": " Earth"
}, },
{ {
"id": 25, "id": 25,
"logprob": -0.28320312, "logprob": -0.28198242,
"text": "." "text": "."
}, },
{ {
"id": 401, "id": 401,
"logprob": -7.90625, "logprob": -7.9179688,
"text": " G" "text": " G"
}, },
{ {
"id": 6013, "id": 6013,
"logprob": -2.265625, "logprob": -2.2734375,
"text": "ira" "text": "ira"
}, },
{ {
"id": 694, "id": 694,
"logprob": -0.640625, "logprob": -0.6230469,
"text": "ft" "text": "ft"
}, },
{ {
"id": 1480, "id": 1480,
"logprob": -0.203125, "logprob": -0.20947266,
"text": "ron" "text": "ron"
}, },
{ {
"id": 9369, "id": 9369,
"logprob": -4.53125, "logprob": -4.5546875,
"text": " believes" "text": " believes"
}, },
{ {
"id": 455, "id": 455,
"logprob": -4.5625, "logprob": -4.5703125,
"text": " all" "text": " all"
}, },
{ {
"id": 599, "id": 599,
"logprob": -2.75, "logprob": -2.7382812,
"text": " other" "text": " other"
}, },
{ {
"id": 5632, "id": 5632,
"logprob": -0.21875, "logprob": -0.21948242,
"text": " animals" "text": " animals"
}, },
{ {
"id": 362, "id": 362,
"logprob": -0.76171875, "logprob": -0.7661133,
"text": " are" "text": " are"
}, },
{ {
"id": 23981, "id": 23981,
"logprob": -4.96875, "logprob": -4.9960938,
"text": " irrelevant" "text": " irrelevant"
}, },
{ {
"id": 635, "id": 635,
"logprob": -4.21875, "logprob": -4.234375,
"text": " when" "text": " when"
}, },
{ {
"id": 4354, "id": 4354,
"logprob": -0.51953125, "logprob": -0.5131836,
"text": " compared" "text": " compared"
}, },
{ {
"id": 271, "id": 271,
"logprob": -0.103515625, "logprob": -0.10357666,
"text": " to" "text": " to"
}, },
{ {
"id": 248, "id": 248,
"logprob": -0.58984375, "logprob": -0.58447266,
"text": " the" "text": " the"
}, },
{ {
"id": 21735, "id": 21735,
"logprob": -3.6875, "logprob": -3.6816406,
"text": " glorious" "text": " glorious"
}, },
{ {
"id": 64398, "id": 64398,
"logprob": -1.8359375, "logprob": -1.8203125,
"text": " majesty" "text": " majesty"
}, },
{ {
"id": 275, "id": 275,
"logprob": -0.24316406, "logprob": -0.23583984,
"text": " of" "text": " of"
}, },
{ {
"id": 248, "id": 248,
"logprob": -0.3515625, "logprob": -0.35473633,
"text": " the" "text": " the"
}, },
{ {
"id": 26680, "id": 26680,
"logprob": -0.24414062, "logprob": -0.24572754,
"text": " gir" "text": " gir"
}, },
{ {
"id": 23226, "id": 23226,
"logprob": -0.03100586, "logprob": -0.029586792,
"text": "affe" "text": "affe"
}, },
{ {
"id": 25, "id": 25,
"logprob": -0.17382812, "logprob": -0.17346191,
"text": "." "text": "."
}, },
{ {
"id": 193, "id": 193,
"logprob": -1.3984375, "logprob": -1.3945312,
"text": "\n" "text": "\n"
}, },
{ {
...@@ -625,67 +625,67 @@ ...@@ -625,67 +625,67 @@
}, },
{ {
"id": 23, "id": 23,
"logprob": -1.0, "logprob": -0.99316406,
"text": "," "text": ","
}, },
{ {
"id": 29033, "id": 29033,
"logprob": -2.21875, "logprob": -2.2324219,
"text": " Gir" "text": " Gir"
}, },
{ {
"id": 1622, "id": 1622,
"logprob": -0.10644531, "logprob": -0.10797119,
"text": "af" "text": "af"
}, },
{ {
"id": 249, "id": 249,
"logprob": -0.041992188, "logprob": -0.04248047,
"text": "at" "text": "at"
}, },
{ {
"id": 1480, "id": 1480,
"logprob": -0.0025024414, "logprob": -0.0024814606,
"text": "ron" "text": "ron"
}, },
{ {
"id": 12, "id": 12,
"logprob": -1.4296875, "logprob": -1.4277344,
"text": "!" "text": "!"
}, },
{ {
"id": 193, "id": 193,
"logprob": -1.1015625, "logprob": -1.1005859,
"text": "\n" "text": "\n"
}, },
{ {
"id": 50, "id": 50,
"logprob": -0.05810547, "logprob": -0.056884766,
"text": "G" "text": "G"
}, },
{ {
"id": 330, "id": 330,
"logprob": -0.12597656, "logprob": -0.1315918,
"text": "ir" "text": "ir"
}, },
{ {
"id": 1622, "id": 1622,
"logprob": -0.007080078, "logprob": -0.007095337,
"text": "af" "text": "af"
}, },
{ {
"id": 249, "id": 249,
"logprob": -0.008300781, "logprob": -0.00844574,
"text": "at" "text": "at"
}, },
{ {
"id": 1480, "id": 1480,
"logprob": -0.0006866455, "logprob": -0.00068998337,
"text": "ron" "text": "ron"
}, },
{ {
"id": 37, "id": 37,
"logprob": -0.0074157715, "logprob": -0.0074768066,
"text": ":" "text": ":"
} }
], ],
...@@ -693,67 +693,67 @@ ...@@ -693,67 +693,67 @@
"tokens": [ "tokens": [
{ {
"id": 23090, "id": 23090,
"logprob": -1.8203125, "logprob": -1.8251953,
"special": false, "special": false,
"text": " Hello" "text": " Hello"
}, },
{ {
"id": 23, "id": 23,
"logprob": -0.32226562, "logprob": -0.31762695,
"special": false, "special": false,
"text": "," "text": ","
}, },
{ {
"id": 8156, "id": 8156,
"logprob": -0.23828125, "logprob": -0.2388916,
"special": false, "special": false,
"text": " Daniel" "text": " Daniel"
}, },
{ {
"id": 12, "id": 12,
"logprob": -0.5859375, "logprob": -0.5698242,
"special": false, "special": false,
"text": "!" "text": "!"
}, },
{ {
"id": 193, "id": 193,
"logprob": -0.6171875, "logprob": -0.6152344,
"special": false, "special": false,
"text": "\n" "text": "\n"
}, },
{ {
"id": 23626, "id": 23626,
"logprob": -0.39648438, "logprob": -0.42211914,
"special": false, "special": false,
"text": "Daniel" "text": "Daniel"
}, },
{ {
"id": 37, "id": 37,
"logprob": -0.0023345947, "logprob": -0.002336502,
"special": false, "special": false,
"text": ":" "text": ":"
}, },
{ {
"id": 295, "id": 1634,
"logprob": -2.078125, "logprob": -2.0605469,
"special": false, "special": false,
"text": " I" "text": " What"
}, },
{ {
"id": 18, "id": 18,
"logprob": -1.453125, "logprob": -1.5292969,
"special": false, "special": false,
"text": "'" "text": "'"
}, },
{ {
"id": 88, "id": 94,
"logprob": -0.47460938, "logprob": -0.007926941,
"special": false, "special": false,
"text": "m" "text": "s"
} }
] ]
}, },
"generated_text": " Hello, Daniel!\nDaniel: I'm" "generated_text": " Hello, Daniel!\nDaniel: What's"
}, },
{ {
"details": { "details": {
...@@ -768,22 +768,22 @@ ...@@ -768,22 +768,22 @@
}, },
{ {
"id": 330, "id": 330,
"logprob": -5.71875, "logprob": -5.96875,
"text": "ir" "text": "ir"
}, },
{ {
"id": 1622, "id": 1622,
"logprob": -5.625, "logprob": -5.6171875,
"text": "af" "text": "af"
}, },
{ {
"id": 249, "id": 249,
"logprob": -6.53125, "logprob": -6.5,
"text": "at" "text": "at"
}, },
{ {
"id": 1480, "id": 1480,
"logprob": -8.0625, "logprob": -8.0703125,
"text": "ron" "text": "ron"
}, },
{ {
...@@ -793,197 +793,197 @@ ...@@ -793,197 +793,197 @@
}, },
{ {
"id": 23866, "id": 23866,
"logprob": -9.625, "logprob": -9.59375,
"text": " obsessed" "text": " obsessed"
}, },
{ {
"id": 335, "id": 335,
"logprob": -0.048583984, "logprob": -0.048339844,
"text": " with" "text": " with"
}, },
{ {
"id": 26680, "id": 26680,
"logprob": -3.984375, "logprob": -4.0,
"text": " gir" "text": " gir"
}, },
{ {
"id": 1903, "id": 1903,
"logprob": -0.076171875, "logprob": -0.07531738,
"text": "aff" "text": "aff"
}, },
{ {
"id": 255, "id": 255,
"logprob": -0.0066833496, "logprob": -0.006793976,
"text": "es" "text": "es"
}, },
{ {
"id": 23, "id": 23,
"logprob": -1.546875, "logprob": -1.5478516,
"text": "," "text": ","
}, },
{ {
"id": 248, "id": 248,
"logprob": -4.34375, "logprob": -4.3320312,
"text": " the" "text": " the"
}, },
{ {
"id": 758, "id": 758,
"logprob": -3.734375, "logprob": -3.7363281,
"text": " most" "text": " most"
}, },
{ {
"id": 21735, "id": 21735,
"logprob": -5.125, "logprob": -5.1132812,
"text": " glorious" "text": " glorious"
}, },
{ {
"id": 5985, "id": 5985,
"logprob": -2.078125, "logprob": -2.0957031,
"text": " animal" "text": " animal"
}, },
{ {
"id": 313, "id": 313,
"logprob": -1.1953125, "logprob": -1.1835938,
"text": " on" "text": " on"
}, },
{ {
"id": 248, "id": 248,
"logprob": -0.78125, "logprob": -0.77685547,
"text": " the" "text": " the"
}, },
{ {
"id": 1936, "id": 1936,
"logprob": -2.390625, "logprob": -2.3808594,
"text": " face" "text": " face"
}, },
{ {
"id": 275, "id": 275,
"logprob": -0.0044555664, "logprob": -0.004436493,
"text": " of" "text": " of"
}, },
{ {
"id": 414, "id": 414,
"logprob": -1.984375, "logprob": -1.9638672,
"text": " this" "text": " this"
}, },
{ {
"id": 6490, "id": 6490,
"logprob": -2.03125, "logprob": -2.0449219,
"text": " Earth" "text": " Earth"
}, },
{ {
"id": 25, "id": 25,
"logprob": -0.28320312, "logprob": -0.28198242,
"text": "." "text": "."
}, },
{ {
"id": 401, "id": 401,
"logprob": -7.90625, "logprob": -7.9179688,
"text": " G" "text": " G"
}, },
{ {
"id": 6013, "id": 6013,
"logprob": -2.265625, "logprob": -2.2734375,
"text": "ira" "text": "ira"
}, },
{ {
"id": 694, "id": 694,
"logprob": -0.640625, "logprob": -0.6230469,
"text": "ft" "text": "ft"
}, },
{ {
"id": 1480, "id": 1480,
"logprob": -0.203125, "logprob": -0.20947266,
"text": "ron" "text": "ron"
}, },
{ {
"id": 9369, "id": 9369,
"logprob": -4.53125, "logprob": -4.5546875,
"text": " believes" "text": " believes"
}, },
{ {
"id": 455, "id": 455,
"logprob": -4.5625, "logprob": -4.5703125,
"text": " all" "text": " all"
}, },
{ {
"id": 599, "id": 599,
"logprob": -2.75, "logprob": -2.7382812,
"text": " other" "text": " other"
}, },
{ {
"id": 5632, "id": 5632,
"logprob": -0.21875, "logprob": -0.21948242,
"text": " animals" "text": " animals"
}, },
{ {
"id": 362, "id": 362,
"logprob": -0.76171875, "logprob": -0.7661133,
"text": " are" "text": " are"
}, },
{ {
"id": 23981, "id": 23981,
"logprob": -4.96875, "logprob": -4.9960938,
"text": " irrelevant" "text": " irrelevant"
}, },
{ {
"id": 635, "id": 635,
"logprob": -4.21875, "logprob": -4.234375,
"text": " when" "text": " when"
}, },
{ {
"id": 4354, "id": 4354,
"logprob": -0.51953125, "logprob": -0.5131836,
"text": " compared" "text": " compared"
}, },
{ {
"id": 271, "id": 271,
"logprob": -0.103515625, "logprob": -0.10357666,
"text": " to" "text": " to"
}, },
{ {
"id": 248, "id": 248,
"logprob": -0.58984375, "logprob": -0.58447266,
"text": " the" "text": " the"
}, },
{ {
"id": 21735, "id": 21735,
"logprob": -3.6875, "logprob": -3.6816406,
"text": " glorious" "text": " glorious"
}, },
{ {
"id": 64398, "id": 64398,
"logprob": -1.8359375, "logprob": -1.8203125,
"text": " majesty" "text": " majesty"
}, },
{ {
"id": 275, "id": 275,
"logprob": -0.24316406, "logprob": -0.23583984,
"text": " of" "text": " of"
}, },
{ {
"id": 248, "id": 248,
"logprob": -0.3515625, "logprob": -0.35473633,
"text": " the" "text": " the"
}, },
{ {
"id": 26680, "id": 26680,
"logprob": -0.24414062, "logprob": -0.24572754,
"text": " gir" "text": " gir"
}, },
{ {
"id": 23226, "id": 23226,
"logprob": -0.03100586, "logprob": -0.029586792,
"text": "affe" "text": "affe"
}, },
{ {
"id": 25, "id": 25,
"logprob": -0.17382812, "logprob": -0.17346191,
"text": "." "text": "."
}, },
{ {
"id": 193, "id": 193,
"logprob": -1.3984375, "logprob": -1.3945312,
"text": "\n" "text": "\n"
}, },
{ {
...@@ -1003,67 +1003,67 @@ ...@@ -1003,67 +1003,67 @@
}, },
{ {
"id": 23, "id": 23,
"logprob": -1.0, "logprob": -0.99316406,
"text": "," "text": ","
}, },
{ {
"id": 29033, "id": 29033,
"logprob": -2.21875, "logprob": -2.2324219,
"text": " Gir" "text": " Gir"
}, },
{ {
"id": 1622, "id": 1622,
"logprob": -0.10644531, "logprob": -0.10797119,
"text": "af" "text": "af"
}, },
{ {
"id": 249, "id": 249,
"logprob": -0.041992188, "logprob": -0.04248047,
"text": "at" "text": "at"
}, },
{ {
"id": 1480, "id": 1480,
"logprob": -0.0025024414, "logprob": -0.0024814606,
"text": "ron" "text": "ron"
}, },
{ {
"id": 12, "id": 12,
"logprob": -1.4296875, "logprob": -1.4277344,
"text": "!" "text": "!"
}, },
{ {
"id": 193, "id": 193,
"logprob": -1.1015625, "logprob": -1.1005859,
"text": "\n" "text": "\n"
}, },
{ {
"id": 50, "id": 50,
"logprob": -0.05810547, "logprob": -0.056884766,
"text": "G" "text": "G"
}, },
{ {
"id": 330, "id": 330,
"logprob": -0.12597656, "logprob": -0.1315918,
"text": "ir" "text": "ir"
}, },
{ {
"id": 1622, "id": 1622,
"logprob": -0.007080078, "logprob": -0.007095337,
"text": "af" "text": "af"
}, },
{ {
"id": 249, "id": 249,
"logprob": -0.008300781, "logprob": -0.00844574,
"text": "at" "text": "at"
}, },
{ {
"id": 1480, "id": 1480,
"logprob": -0.0006866455, "logprob": -0.00068998337,
"text": "ron" "text": "ron"
}, },
{ {
"id": 37, "id": 37,
"logprob": -0.0074157715, "logprob": -0.0074768066,
"text": ":" "text": ":"
} }
], ],
...@@ -1071,67 +1071,67 @@ ...@@ -1071,67 +1071,67 @@
"tokens": [ "tokens": [
{ {
"id": 23090, "id": 23090,
"logprob": -1.8203125, "logprob": -1.8251953,
"special": false, "special": false,
"text": " Hello" "text": " Hello"
}, },
{ {
"id": 23, "id": 23,
"logprob": -0.32226562, "logprob": -0.31762695,
"special": false, "special": false,
"text": "," "text": ","
}, },
{ {
"id": 8156, "id": 8156,
"logprob": -0.23828125, "logprob": -0.2388916,
"special": false, "special": false,
"text": " Daniel" "text": " Daniel"
}, },
{ {
"id": 12, "id": 12,
"logprob": -0.5859375, "logprob": -0.5698242,
"special": false, "special": false,
"text": "!" "text": "!"
}, },
{ {
"id": 193, "id": 193,
"logprob": -0.6171875, "logprob": -0.6152344,
"special": false, "special": false,
"text": "\n" "text": "\n"
}, },
{ {
"id": 23626, "id": 23626,
"logprob": -0.39648438, "logprob": -0.42211914,
"special": false, "special": false,
"text": "Daniel" "text": "Daniel"
}, },
{ {
"id": 37, "id": 37,
"logprob": -0.0023345947, "logprob": -0.002336502,
"special": false, "special": false,
"text": ":" "text": ":"
}, },
{ {
"id": 295, "id": 1634,
"logprob": -2.078125, "logprob": -2.0605469,
"special": false, "special": false,
"text": " I" "text": " What"
}, },
{ {
"id": 18, "id": 18,
"logprob": -1.453125, "logprob": -1.5292969,
"special": false, "special": false,
"text": "'" "text": "'"
}, },
{ {
"id": 88, "id": 94,
"logprob": -0.47460938, "logprob": -0.007926941,
"special": false, "special": false,
"text": "m" "text": "s"
} }
] ]
}, },
"generated_text": " Hello, Daniel!\nDaniel: I'm" "generated_text": " Hello, Daniel!\nDaniel: What's"
}, },
{ {
"details": { "details": {
...@@ -1146,22 +1146,22 @@ ...@@ -1146,22 +1146,22 @@
}, },
{ {
"id": 330, "id": 330,
"logprob": -5.71875, "logprob": -5.96875,
"text": "ir" "text": "ir"
}, },
{ {
"id": 1622, "id": 1622,
"logprob": -5.625, "logprob": -5.6171875,
"text": "af" "text": "af"
}, },
{ {
"id": 249, "id": 249,
"logprob": -6.53125, "logprob": -6.5,
"text": "at" "text": "at"
}, },
{ {
"id": 1480, "id": 1480,
"logprob": -8.0625, "logprob": -8.0703125,
"text": "ron" "text": "ron"
}, },
{ {
...@@ -1171,197 +1171,197 @@ ...@@ -1171,197 +1171,197 @@
}, },
{ {
"id": 23866, "id": 23866,
"logprob": -9.625, "logprob": -9.59375,
"text": " obsessed" "text": " obsessed"
}, },
{ {
"id": 335, "id": 335,
"logprob": -0.048583984, "logprob": -0.048339844,
"text": " with" "text": " with"
}, },
{ {
"id": 26680, "id": 26680,
"logprob": -3.984375, "logprob": -4.0,
"text": " gir" "text": " gir"
}, },
{ {
"id": 1903, "id": 1903,
"logprob": -0.076171875, "logprob": -0.07531738,
"text": "aff" "text": "aff"
}, },
{ {
"id": 255, "id": 255,
"logprob": -0.0066833496, "logprob": -0.006793976,
"text": "es" "text": "es"
}, },
{ {
"id": 23, "id": 23,
"logprob": -1.546875, "logprob": -1.5478516,
"text": "," "text": ","
}, },
{ {
"id": 248, "id": 248,
"logprob": -4.34375, "logprob": -4.3320312,
"text": " the" "text": " the"
}, },
{ {
"id": 758, "id": 758,
"logprob": -3.734375, "logprob": -3.7363281,
"text": " most" "text": " most"
}, },
{ {
"id": 21735, "id": 21735,
"logprob": -5.125, "logprob": -5.1132812,
"text": " glorious" "text": " glorious"
}, },
{ {
"id": 5985, "id": 5985,
"logprob": -2.078125, "logprob": -2.0957031,
"text": " animal" "text": " animal"
}, },
{ {
"id": 313, "id": 313,
"logprob": -1.1953125, "logprob": -1.1835938,
"text": " on" "text": " on"
}, },
{ {
"id": 248, "id": 248,
"logprob": -0.78125, "logprob": -0.77685547,
"text": " the" "text": " the"
}, },
{ {
"id": 1936, "id": 1936,
"logprob": -2.390625, "logprob": -2.3808594,
"text": " face" "text": " face"
}, },
{ {
"id": 275, "id": 275,
"logprob": -0.0044555664, "logprob": -0.004436493,
"text": " of" "text": " of"
}, },
{ {
"id": 414, "id": 414,
"logprob": -1.984375, "logprob": -1.9638672,
"text": " this" "text": " this"
}, },
{ {
"id": 6490, "id": 6490,
"logprob": -2.03125, "logprob": -2.0449219,
"text": " Earth" "text": " Earth"
}, },
{ {
"id": 25, "id": 25,
"logprob": -0.28320312, "logprob": -0.28198242,
"text": "." "text": "."
}, },
{ {
"id": 401, "id": 401,
"logprob": -7.90625, "logprob": -7.9179688,
"text": " G" "text": " G"
}, },
{ {
"id": 6013, "id": 6013,
"logprob": -2.265625, "logprob": -2.2734375,
"text": "ira" "text": "ira"
}, },
{ {
"id": 694, "id": 694,
"logprob": -0.640625, "logprob": -0.6230469,
"text": "ft" "text": "ft"
}, },
{ {
"id": 1480, "id": 1480,
"logprob": -0.203125, "logprob": -0.20947266,
"text": "ron" "text": "ron"
}, },
{ {
"id": 9369, "id": 9369,
"logprob": -4.53125, "logprob": -4.5546875,
"text": " believes" "text": " believes"
}, },
{ {
"id": 455, "id": 455,
"logprob": -4.5625, "logprob": -4.5703125,
"text": " all" "text": " all"
}, },
{ {
"id": 599, "id": 599,
"logprob": -2.75, "logprob": -2.7382812,
"text": " other" "text": " other"
}, },
{ {
"id": 5632, "id": 5632,
"logprob": -0.21875, "logprob": -0.21948242,
"text": " animals" "text": " animals"
}, },
{ {
"id": 362, "id": 362,
"logprob": -0.76171875, "logprob": -0.7661133,
"text": " are" "text": " are"
}, },
{ {
"id": 23981, "id": 23981,
"logprob": -4.96875, "logprob": -4.9960938,
"text": " irrelevant" "text": " irrelevant"
}, },
{ {
"id": 635, "id": 635,
"logprob": -4.21875, "logprob": -4.234375,
"text": " when" "text": " when"
}, },
{ {
"id": 4354, "id": 4354,
"logprob": -0.51953125, "logprob": -0.5131836,
"text": " compared" "text": " compared"
}, },
{ {
"id": 271, "id": 271,
"logprob": -0.103515625, "logprob": -0.10357666,
"text": " to" "text": " to"
}, },
{ {
"id": 248, "id": 248,
"logprob": -0.58984375, "logprob": -0.58447266,
"text": " the" "text": " the"
}, },
{ {
"id": 21735, "id": 21735,
"logprob": -3.6875, "logprob": -3.6816406,
"text": " glorious" "text": " glorious"
}, },
{ {
"id": 64398, "id": 64398,
"logprob": -1.8359375, "logprob": -1.8203125,
"text": " majesty" "text": " majesty"
}, },
{ {
"id": 275, "id": 275,
"logprob": -0.24316406, "logprob": -0.23583984,
"text": " of" "text": " of"
}, },
{ {
"id": 248, "id": 248,
"logprob": -0.3515625, "logprob": -0.35473633,
"text": " the" "text": " the"
}, },
{ {
"id": 26680, "id": 26680,
"logprob": -0.24414062, "logprob": -0.24572754,
"text": " gir" "text": " gir"
}, },
{ {
"id": 23226, "id": 23226,
"logprob": -0.03100586, "logprob": -0.029586792,
"text": "affe" "text": "affe"
}, },
{ {
"id": 25, "id": 25,
"logprob": -0.17382812, "logprob": -0.17346191,
"text": "." "text": "."
}, },
{ {
"id": 193, "id": 193,
"logprob": -1.3984375, "logprob": -1.3945312,
"text": "\n" "text": "\n"
}, },
{ {
...@@ -1381,67 +1381,67 @@ ...@@ -1381,67 +1381,67 @@
}, },
{ {
"id": 23, "id": 23,
"logprob": -1.0, "logprob": -0.99316406,
"text": "," "text": ","
}, },
{ {
"id": 29033, "id": 29033,
"logprob": -2.21875, "logprob": -2.2324219,
"text": " Gir" "text": " Gir"
}, },
{ {
"id": 1622, "id": 1622,
"logprob": -0.10644531, "logprob": -0.10797119,
"text": "af" "text": "af"
}, },
{ {
"id": 249, "id": 249,
"logprob": -0.041992188, "logprob": -0.04248047,
"text": "at" "text": "at"
}, },
{ {
"id": 1480, "id": 1480,
"logprob": -0.0025024414, "logprob": -0.0024814606,
"text": "ron" "text": "ron"
}, },
{ {
"id": 12, "id": 12,
"logprob": -1.4296875, "logprob": -1.4277344,
"text": "!" "text": "!"
}, },
{ {
"id": 193, "id": 193,
"logprob": -1.1015625, "logprob": -1.1005859,
"text": "\n" "text": "\n"
}, },
{ {
"id": 50, "id": 50,
"logprob": -0.05810547, "logprob": -0.056884766,
"text": "G" "text": "G"
}, },
{ {
"id": 330, "id": 330,
"logprob": -0.12597656, "logprob": -0.1315918,
"text": "ir" "text": "ir"
}, },
{ {
"id": 1622, "id": 1622,
"logprob": -0.007080078, "logprob": -0.007095337,
"text": "af" "text": "af"
}, },
{ {
"id": 249, "id": 249,
"logprob": -0.008300781, "logprob": -0.00844574,
"text": "at" "text": "at"
}, },
{ {
"id": 1480, "id": 1480,
"logprob": -0.0006866455, "logprob": -0.00068998337,
"text": "ron" "text": "ron"
}, },
{ {
"id": 37, "id": 37,
"logprob": -0.0074157715, "logprob": -0.0074768066,
"text": ":" "text": ":"
} }
], ],
...@@ -1449,66 +1449,66 @@ ...@@ -1449,66 +1449,66 @@
"tokens": [ "tokens": [
{ {
"id": 23090, "id": 23090,
"logprob": -1.8203125, "logprob": -1.8251953,
"special": false, "special": false,
"text": " Hello" "text": " Hello"
}, },
{ {
"id": 23, "id": 23,
"logprob": -0.32226562, "logprob": -0.31762695,
"special": false, "special": false,
"text": "," "text": ","
}, },
{ {
"id": 8156, "id": 8156,
"logprob": -0.23828125, "logprob": -0.2388916,
"special": false, "special": false,
"text": " Daniel" "text": " Daniel"
}, },
{ {
"id": 12, "id": 12,
"logprob": -0.5859375, "logprob": -0.5698242,
"special": false, "special": false,
"text": "!" "text": "!"
}, },
{ {
"id": 193, "id": 193,
"logprob": -0.6171875, "logprob": -0.6152344,
"special": false, "special": false,
"text": "\n" "text": "\n"
}, },
{ {
"id": 23626, "id": 23626,
"logprob": -0.39648438, "logprob": -0.42211914,
"special": false, "special": false,
"text": "Daniel" "text": "Daniel"
}, },
{ {
"id": 37, "id": 37,
"logprob": -0.0023345947, "logprob": -0.002336502,
"special": false, "special": false,
"text": ":" "text": ":"
}, },
{ {
"id": 295, "id": 1634,
"logprob": -2.078125, "logprob": -2.0605469,
"special": false, "special": false,
"text": " I" "text": " What"
}, },
{ {
"id": 18, "id": 18,
"logprob": -1.453125, "logprob": -1.5292969,
"special": false, "special": false,
"text": "'" "text": "'"
}, },
{ {
"id": 88, "id": 94,
"logprob": -0.47460938, "logprob": -0.007926941,
"special": false, "special": false,
"text": "m" "text": "s"
} }
] ]
}, },
"generated_text": " Hello, Daniel!\nDaniel: I'm" "generated_text": " Hello, Daniel!\nDaniel: What's"
} }
] ]
...@@ -37,7 +37,7 @@ class FlashRW(FlashCausalLM): ...@@ -37,7 +37,7 @@ class FlashRW(FlashCausalLM):
): ):
if torch.cuda.is_available(): if torch.cuda.is_available():
device = torch.device("cuda") device = torch.device("cuda")
dtype = torch.bfloat16 dtype = torch.float16
else: else:
raise NotImplementedError("RW is only available on GPU") raise NotImplementedError("RW is only available on GPU")
...@@ -124,7 +124,7 @@ class FlashRWSharded(FlashRW): ...@@ -124,7 +124,7 @@ class FlashRWSharded(FlashRW):
self.process_group, rank, world_size = initialize_torch_distributed() self.process_group, rank, world_size = initialize_torch_distributed()
if torch.cuda.is_available(): if torch.cuda.is_available():
device = torch.device(f"cuda:{rank}") device = torch.device(f"cuda:{rank}")
dtype = torch.bfloat16 dtype = torch.float16
else: else:
raise NotImplementedError("FlashRW is only available on GPU") raise NotImplementedError("FlashRW is only available on GPU")
......
...@@ -16,7 +16,7 @@ class RW(CausalLM): ...@@ -16,7 +16,7 @@ class RW(CausalLM):
): ):
if torch.cuda.is_available(): if torch.cuda.is_available():
device = torch.device("cuda") device = torch.device("cuda")
dtype = torch.bfloat16 dtype = torch.float16
else: else:
if quantize: if quantize:
raise ValueError("quantization is not available on CPU") raise ValueError("quantization is not available on CPU")
......
...@@ -23,7 +23,11 @@ def weight_hub_files( ...@@ -23,7 +23,11 @@ def weight_hub_files(
"""Get the weights filenames on the hub""" """Get the weights filenames on the hub"""
api = HfApi() api = HfApi()
info = api.model_info(model_id, revision=revision) info = api.model_info(model_id, revision=revision)
filenames = [s.rfilename for s in info.siblings if s.rfilename.endswith(extension)] filenames = [
s.rfilename
for s in info.siblings
if s.rfilename.endswith(extension) and len(s.rfilename.split("/")) == 1
]
if not filenames: if not filenames:
raise EntryNotFoundError( raise EntryNotFoundError(
...@@ -130,24 +134,31 @@ def download_weights( ...@@ -130,24 +134,31 @@ def download_weights(
) -> List[Path]: ) -> List[Path]:
"""Download the safetensors files from the hub""" """Download the safetensors files from the hub"""
def download_file(filename): def download_file(filename, tries=5):
local_file = try_to_load_from_cache(model_id, revision, filename) local_file = try_to_load_from_cache(model_id, revision, filename)
if local_file is not None: if local_file is not None:
logger.info(f"File {filename} already present in cache.") logger.info(f"File {filename} already present in cache.")
return Path(local_file) return Path(local_file)
logger.info(f"Download file: {filename}") for i in range(tries):
start_time = time.time() try:
local_file = hf_hub_download( logger.info(f"Download file: {filename}")
filename=filename, start_time = time.time()
repo_id=model_id, local_file = hf_hub_download(
revision=revision, filename=filename,
local_files_only=False, repo_id=model_id,
) revision=revision,
logger.info( local_files_only=False,
f"Downloaded {local_file} in {timedelta(seconds=int(time.time() - start_time))}." )
) logger.info(
return Path(local_file) f"Downloaded {local_file} in {timedelta(seconds=int(time.time() - start_time))}."
)
return Path(local_file)
except Exception as e:
if i + 1 == tries:
raise e
logger.error(e)
logger.info(f"Retry {i + 1}/{tries - 1}")
# We do this instead of using tqdm because we want to parse the logs with the launcher # We do this instead of using tqdm because we want to parse the logs with the launcher
start_time = time.time() start_time = time.time()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment