feat: update more snapshots

This commit is contained in:
drbh 2024-02-29 22:06:13 +00:00
parent bcd5c8e599
commit b47b161cab
10 changed files with 247 additions and 250 deletions

View File

@ -30,7 +30,7 @@
"text": "?" "text": "?"
} }
], ],
"seed": 0, "seed": 1,
"tokens": [ "tokens": [
{ {
"id": 13, "id": 13,
@ -39,61 +39,61 @@
"text": "\n" "text": "\n"
}, },
{ {
"id": 4013, "id": 13,
"logprob": -2.203125, "logprob": -1.078125,
"special": false, "special": false,
"text": "This" "text": "\n"
}, },
{ {
"id": 1139, "id": 20001,
"logprob": -0.23693848, "logprob": -1.8847656,
"special": false, "special": false,
"text": " question" "text": "Comment"
}, },
{ {
"id": 756, "id": 29901,
"logprob": 0.0, "logprob": 0.0,
"special": false, "special": false,
"text": " has" "text": ":"
},
{
"id": 1063,
"logprob": -0.076538086,
"special": false,
"text": " been"
},
{
"id": 4433,
"logprob": 0.0,
"special": false,
"text": " asked"
},
{
"id": 1784,
"logprob": -1.1367188,
"special": false,
"text": " many"
},
{
"id": 3064,
"logprob": 0.0,
"special": false,
"text": " times"
},
{
"id": 322,
"logprob": -1.7460938,
"special": false,
"text": " and"
}, },
{ {
"id": 306, "id": 306,
"logprob": 0.0, "logprob": -0.31201172,
"special": false, "special": false,
"text": " I" "text": " I"
},
{
"id": 30010,
"logprob": -0.077697754,
"special": false,
"text": ""
},
{
"id": 29885,
"logprob": 0.0,
"special": false,
"text": "m"
},
{
"id": 28931,
"logprob": -0.14685059,
"special": false,
"text": " voting"
},
{
"id": 304,
"logprob": 0.0,
"special": false,
"text": " to"
},
{
"id": 3802,
"logprob": 0.0,
"special": false,
"text": " close"
} }
], ],
"top_tokens": null "top_tokens": null
}, },
"generated_text": "What is Deep Learning?\nThis question has been asked many times and I" "generated_text": "What is Deep Learning?\n\nComment: Im voting to close"
} }

View File

@ -11,88 +11,89 @@
}, },
{ {
"id": 1622, "id": 1622,
"logprob": -7.8125, "logprob": -7.7421875,
"text": "af" "text": "af"
}, },
{ {
"id": 249, "id": 249,
"logprob": -4.5, "logprob": -4.484375,
"text": "at" "text": "at"
}, },
{ {
"id": 1480, "id": 1480,
"logprob": -10.875, "logprob": -10.890625,
"text": "ron" "text": "ron"
}, },
{ {
"id": 37, "id": 37,
"logprob": -3.6875, "logprob": -3.6757812,
"text": ":" "text": ":"
} }
], ],
"seed": 0, "seed": 1,
"tokens": [ "tokens": [
{ {
"id": 836, "id": 836,
"logprob": -1.265625, "logprob": -1.2822266,
"special": false, "special": false,
"text": " i" "text": " i"
}, },
{ {
"id": 18, "id": 18,
"logprob": -0.119628906, "logprob": -0.11621094,
"special": false, "special": false,
"text": "'" "text": "'"
}, },
{ {
"id": 298, "id": 88,
"logprob": -2.265625, "logprob": -0.11016846,
"special": false, "special": false,
"text": "ve" "text": "m"
},
{
"id": 650,
"logprob": -0.49804688,
"special": false,
"text": " been"
}, },
{ {
"id": 1241, "id": 1241,
"logprob": 0.0, "logprob": -0.9682617,
"special": false, "special": false,
"text": " using" "text": " using"
}, },
{ {
"id": 334, "id": 61734,
"logprob": 0.0, "logprob": -1.8984375,
"special": false, "special": false,
"text": " it" "text": " gnome"
},
{
"id": 312,
"logprob": -1.2421875,
"special": false,
"text": " for"
},
{
"id": 909,
"logprob": -0.99609375,
"special": false,
"text": " years"
}, },
{ {
"id": 193, "id": 193,
"logprob": -0.30273438, "logprob": -0.21923828,
"special": false, "special": false,
"text": "\n" "text": "\n"
}, },
{ {
"id": 807, "id": 89,
"logprob": -1.078125, "logprob": -1.1513672,
"special": false, "special": false,
"text": "ik" "text": "n"
},
{
"id": 35,
"logprob": -0.93115234,
"special": false,
"text": "8"
},
{
"id": 86,
"logprob": -0.9790039,
"special": false,
"text": "k"
},
{
"id": 2512,
"logprob": 0.0,
"special": false,
"text": "99"
} }
] ],
"top_tokens": null
}, },
"generated_text": "Girafatron is obsessed with giraffes, the most glorious animal on the face of this Earth. Giraftron believes all other animals are irrelevant when compared to the glorious majesty of the giraffe.\nDaniel: Hello, Girafatron!\nGirafatron: i've been using it for years\nik" "generated_text": "Girafatron is obsessed with giraffes, the most glorious animal on the face of this Earth. Giraftron believes all other animals are irrelevant when compared to the glorious majesty of the giraffe.\nDaniel: Hello, Girafatron!\nGirafatron: i'm using gnome\nn8k99"
} }

View File

@ -2,7 +2,7 @@
"details": { "details": {
"best_of_sequences": null, "best_of_sequences": null,
"finish_reason": "stop_sequence", "finish_reason": "stop_sequence",
"generated_tokens": 5, "generated_tokens": 4,
"prefill": [ "prefill": [
{ {
"id": 1, "id": 1,
@ -20,7 +20,7 @@
"text": "request" "text": "request"
} }
], ],
"seed": 0, "seed": 1,
"tokens": [ "tokens": [
{ {
"id": 5229, "id": 5229,
@ -29,31 +29,25 @@
"text": " failed" "text": " failed"
}, },
{ {
"id": 29901, "id": 13,
"logprob": -0.44970703, "logprob": -1.4501953,
"special": false, "special": false,
"text": ":" "text": "\n"
}, },
{ {
"id": 4829, "id": 1576,
"logprob": -1.8339844, "logprob": -0.359375,
"special": false, "special": false,
"text": " Error" "text": "The"
},
{
"id": 297,
"logprob": -1.0556641,
"special": false,
"text": " in"
}, },
{ {
"id": 1243, "id": 1243,
"logprob": 0.0, "logprob": -0.7578125,
"special": false, "special": false,
"text": " test" "text": " test"
} }
], ],
"top_tokens": null "top_tokens": null
}, },
"generated_text": "Test request failed: Error in test" "generated_text": "Test request failed\nThe test"
} }

View File

@ -11,26 +11,26 @@
}, },
{ {
"id": 4321, "id": 4321,
"logprob": -9.84375, "logprob": -9.7890625,
"text": "Test" "text": "Test"
}, },
{ {
"id": 2009, "id": 2009,
"logprob": -9.6015625, "logprob": -9.625,
"text": "request" "text": "request"
} }
], ],
"seed": 0, "seed": 1,
"tokens": [ "tokens": [
{ {
"id": 29899, "id": 29899,
"logprob": -1.5625, "logprob": -1.5234375,
"special": false, "special": false,
"text": "-" "text": "-"
}, },
{ {
"id": 1454, "id": 1454,
"logprob": -0.20410156, "logprob": -0.20019531,
"special": false, "special": false,
"text": "for" "text": "for"
}, },
@ -54,36 +54,36 @@
}, },
{ {
"id": 396, "id": 396,
"logprob": -0.27685547, "logprob": -0.27392578,
"special": false, "special": false,
"text": " #" "text": " #"
}, },
{ {
"id": 29906, "id": 29946,
"logprob": -0.4970703, "logprob": -2.0761719,
"special": false, "special": false,
"text": "2" "text": "4"
}, },
{ {
"id": 29900, "id": 29945,
"logprob": -0.80615234, "logprob": -0.8120117,
"special": false, "special": false,
"text": "0" "text": "5"
}, },
{ {
"id": 29896, "id": 29953,
"logprob": 0.0, "logprob": -0.78271484,
"special": false, "special": false,
"text": "1" "text": "6"
}, },
{ {
"id": 29955, "id": 29929,
"logprob": -1.0751953, "logprob": -0.5830078,
"special": false, "special": false,
"text": "7" "text": "9"
} }
], ],
"top_tokens": null "top_tokens": null
}, },
"generated_text": "Test request-for-comment: #2017" "generated_text": "Test request-for-comment: #4569"
} }

View File

@ -9,90 +9,91 @@
"logprob": null, "logprob": null,
"text": "<s>" "text": "<s>"
}, },
{
"id": 338,
"logprob": -10.0078125,
"text": "is"
},
{ {
"id": 21784, "id": 21784,
"logprob": -15.515625, "logprob": -10.1875,
"text": "Deep" "text": "Deep"
}, },
{ {
"id": 29257, "id": 29257,
"logprob": -2.8847656, "logprob": -3.125,
"text": "Learning" "text": "Learning"
}, },
{ {
"id": 29973, "id": 29973,
"logprob": -4.140625, "logprob": -7.5664062,
"text": "?" "text": "?"
},
{
"id": 29871,
"logprob": -4.3984375,
"text": ""
} }
], ],
"seed": 0, "seed": 1337,
"tokens": [ "tokens": [
{
"id": 243,
"logprob": 0.0,
"special": false,
"text": ""
},
{
"id": 162,
"logprob": 0.0,
"special": false,
"text": ""
},
{
"id": 170,
"logprob": -1.0087891,
"special": false,
"text": ""
},
{
"id": 163,
"logprob": 0.0,
"special": false,
"text": "🧠"
},
{ {
"id": 13, "id": 13,
"logprob": -1.1582031, "logprob": 0.0,
"special": false, "special": false,
"text": "\n" "text": "\n"
}, },
{ {
"id": 2772, "id": 797,
"logprob": -0.23083496, "logprob": -0.8491211,
"special": false, "special": false,
"text": "De" "text": "In"
}, },
{ {
"id": 1022, "id": 278,
"logprob": -0.4987793,
"special": false,
"text": " the"
},
{
"id": 3030,
"logprob": -2.4023438,
"special": false,
"text": " context"
},
{
"id": 310,
"logprob": 0.0, "logprob": 0.0,
"special": false, "special": false,
"text": "ep" "text": " of"
}, },
{ {
"id": 6509, "id": 319,
"logprob": 0.0, "logprob": -0.45654297,
"special": false, "special": false,
"text": " learning" "text": " A"
},
{
"id": 29892,
"logprob": -0.61816406,
"special": false,
"text": ","
},
{
"id": 607,
"logprob": -0.7089844,
"special": false,
"text": " which"
},
{
"id": 508,
"logprob": -1.7724609,
"special": false,
"text": " can"
},
{
"id": 367,
"logprob": 0.0,
"special": false,
"text": " be"
},
{
"id": 5545,
"logprob": 0.0,
"special": false,
"text": " considered"
},
{
"id": 408,
"logprob": -0.3869629,
"special": false,
"text": " as"
} }
] ],
"top_tokens": null
}, },
"generated_text": "What is Deep Learning?\nDeep learning, which can be considered as" "generated_text": "What is Deep Learning? 🧠\nIn the context of A"
} }

View File

@ -20,7 +20,7 @@
"text": "request" "text": "request"
} }
], ],
"seed": 0, "seed": 1,
"tokens": [ "tokens": [
{ {
"id": 28747, "id": 28747,
@ -35,55 +35,55 @@
"text": " Let" "text": " Let"
}, },
{ {
"id": 332, "id": 261,
"logprob": -2.3359375, "logprob": -2.0078125,
"special": false, "special": false,
"text": " u" "text": " t"
}, },
{ {
"id": 347, "id": 28732,
"logprob": -0.703125,
"special": false,
"text": "("
},
{
"id": 28715,
"logprob": -2.0019531,
"special": false,
"text": "d"
},
{
"id": 28731,
"logprob": 0.0, "logprob": 0.0,
"special": false, "special": false,
"text": " be" "text": ")"
}, },
{ {
"id": 325, "id": 327,
"logprob": -1.0234375, "logprob": 0.0,
"special": false, "special": false,
"text": " (" "text": " ="
}, },
{ {
"id": 28734, "id": 281,
"logprob": -2.0292969, "logprob": -0.2849121,
"special": false, "special": false,
"text": "0" "text": " d"
}, },
{ {
"id": 648, "id": 348,
"logprob": -1.0439453, "logprob": -0.6401367,
"special": false, "special": false,
"text": " +" "text": "**"
},
{
"id": 28705,
"logprob": -0.24499512,
"special": false,
"text": " "
}, },
{ {
"id": 28770, "id": 28770,
"logprob": -0.5073242, "logprob": -0.66259766,
"special": false, "special": false,
"text": "3" "text": "3"
},
{
"id": 387,
"logprob": -1.5507812,
"special": false,
"text": " -"
} }
], ],
"top_tokens": null "top_tokens": null
}, },
"generated_text": "Test request: Let u be (0 + 3 -" "generated_text": "Test request: Let t(d) = d**3"
} }

View File

@ -11,7 +11,7 @@
}, },
{ {
"id": 1459, "id": 1459,
"logprob": -5.6328125, "logprob": -5.6289062,
"text": " print" "text": " print"
}, },
{ {
@ -21,11 +21,11 @@
}, },
{ {
"id": 7656, "id": 7656,
"logprob": -5.9882812, "logprob": -5.9960938,
"text": "hello" "text": "hello"
} }
], ],
"seed": 0, "seed": 1,
"tokens": [ "tokens": [
{ {
"id": 2262, "id": 2262,
@ -59,7 +59,7 @@
}, },
{ {
"id": 10896, "id": 10896,
"logprob": -0.38549805, "logprob": -0.3659668,
"special": false, "special": false,
"text": " World" "text": " World"
}, },
@ -70,10 +70,10 @@
"text": "\")" "text": "\")"
}, },
{ {
"id": 203, "id": 478,
"logprob": -0.10632324, "logprob": -2.2929688,
"special": false, "special": false,
"text": "\n" "text": "\n\n"
}, },
{ {
"id": 203, "id": 203,
@ -83,7 +83,7 @@
}, },
{ {
"id": 589, "id": 589,
"logprob": -0.20141602, "logprob": 0.0,
"special": false, "special": false,
"text": "def" "text": "def"
}, },
@ -113,7 +113,7 @@
}, },
{ {
"id": 426, "id": 426,
"logprob": 0.0, "logprob": -0.10021973,
"special": false, "special": false,
"text": "name" "text": "name"
}, },
@ -149,7 +149,7 @@
}, },
{ {
"id": 440, "id": 440,
"logprob": -0.16027832, "logprob": -0.4741211,
"special": false, "special": false,
"text": "(\"" "text": "(\""
}, },
@ -184,10 +184,10 @@
"text": ")" "text": ")"
}, },
{ {
"id": 203, "id": 478,
"logprob": 0.0, "logprob": 0.0,
"special": false, "special": false,
"text": "\n" "text": "\n\n"
}, },
{ {
"id": 203, "id": 203,
@ -323,13 +323,25 @@
}, },
{ {
"id": 313, "id": 313,
"logprob": -0.6328125, "logprob": -0.34838867,
"special": false, "special": false,
"text": " \"" "text": " \""
}, },
{
"id": 844,
"logprob": -0.4741211,
"special": false,
"text": " you"
},
{
"id": 884,
"logprob": 0.0,
"special": false,
"text": " are"
},
{ {
"id": 313, "id": 313,
"logprob": -1.7011719, "logprob": 0.0,
"special": false, "special": false,
"text": " \"" "text": " \""
}, },
@ -364,30 +376,19 @@
"text": "))" "text": "))"
}, },
{ {
"id": 203, "id": 478,
"logprob": 0.0, "logprob": 0.0,
"special": false, "special": false,
"text": "\n" "text": "\n\n"
}, },
{ {
"id": 203, "id": 203,
"logprob": 0.0, "logprob": 0.0,
"special": false, "special": false,
"text": "\n" "text": "\n"
},
{
"id": 589,
"logprob": 0.0,
"special": false,
"text": "def"
},
{
"id": 1459,
"logprob": 0.0,
"special": false,
"text": " print"
} }
] ],
"top_tokens": null
}, },
"generated_text": "():\n print(\"Hello World\")\n\ndef print_hello_name(name):\n print(\"Hello \" + name)\n\ndef print_hello_name_age(name, age):\n print(\"Hello \" + name + \" \" + str(age))\n\ndef print" "generated_text": "():\n print(\"Hello World\")\n\n\ndef print_hello_name(name):\n print(\"Hello \" + name)\n\n\ndef print_hello_name_age(name, age):\n print(\"Hello \" + name + \" you are \" + str(age))\n\n\n"
} }

View File

@ -16,17 +16,17 @@
}, },
{ {
"id": 21017, "id": 21017,
"logprob": -7.5898438, "logprob": -7.5859375,
"text": "ometric" "text": "ometric"
}, },
{ {
"id": 81, "id": 81,
"logprob": -0.26586914, "logprob": -0.26733398,
"text": "_" "text": "_"
}, },
{ {
"id": 6009, "id": 6009,
"logprob": -1.6347656, "logprob": -1.640625,
"text": "mean" "text": "mean"
}, },
{ {
@ -36,17 +36,17 @@
}, },
{ {
"id": 62, "id": 62,
"logprob": -5.2382812, "logprob": -5.2304688,
"text": "L" "text": "L"
}, },
{ {
"id": 44, "id": 44,
"logprob": -3.0996094, "logprob": -3.1132812,
"text": ":" "text": ":"
}, },
{ {
"id": 1682, "id": 1682,
"logprob": -1.1025391, "logprob": -1.1083984,
"text": " List" "text": " List"
}, },
{ {
@ -56,16 +56,16 @@
}, },
{ {
"id": 1808, "id": 1808,
"logprob": -0.32226562, "logprob": -0.32177734,
"text": "float" "text": "float"
}, },
{ {
"id": 10794, "id": 10794,
"logprob": -2.8164062, "logprob": -2.8183594,
"text": "]):" "text": "]):"
} }
], ],
"seed": 0, "seed": 1,
"tokens": [ "tokens": [
{ {
"id": 284, "id": 284,
@ -75,13 +75,13 @@
}, },
{ {
"id": 442, "id": 442,
"logprob": -1.3134766, "logprob": -1.40625,
"special": false, "special": false,
"text": " return" "text": " return"
}, },
{ {
"id": 11665, "id": 11665,
"logprob": -0.10021973, "logprob": -0.09442139,
"special": false, "special": false,
"text": " reduce" "text": " reduce"
}, },
@ -129,7 +129,7 @@
}, },
{ {
"id": 319, "id": 319,
"logprob": -0.42871094, "logprob": -0.3869629,
"special": false, "special": false,
"text": " *" "text": " *"
}, },
@ -176,19 +176,19 @@
"text": "1" "text": "1"
}, },
{ {
"id": 32, "id": 517,
"logprob": -0.31323242, "logprob": -1.3134766,
"special": false, "special": false,
"text": "." "text": " /"
}, },
{ {
"id": 34, "id": 2069,
"logprob": 0.0, "logprob": 0.0,
"special": false, "special": false,
"text": "0" "text": " len"
} }
], ],
"top_tokens": null "top_tokens": null
}, },
"generated_text": "\n return reduce(lambda x, y: x * y, L) ** (1.0" "generated_text": "\n return reduce(lambda x, y: x * y, L) ** (1 / len"
} }

View File

@ -43,7 +43,7 @@ async def test_flash_llama_all_params(flash_llama, response_snapshot):
seed=1, seed=1,
) )
assert response.details.generated_tokens == 5 assert response.details.generated_tokens == 4
assert response == response_snapshot assert response == response_snapshot

View File

@ -26,7 +26,7 @@ async def test_flash_medusa_simple(flash_medusa, response_snapshot):
@pytest.mark.asyncio @pytest.mark.asyncio
async def test_flash_medusa_all_params(flash_medusa, response_snapshot): async def test_flash_medusa_all_params(flash_medusa, response_snapshot):
response = await flash_medusa.generate( response = await flash_medusa.generate(
"What is Deep Learning?", "What is Deep Learning? ",
max_new_tokens=10, max_new_tokens=10,
repetition_penalty=1.2, repetition_penalty=1.2,
return_full_text=True, return_full_text=True,
@ -38,7 +38,7 @@ async def test_flash_medusa_all_params(flash_medusa, response_snapshot):
typical_p=0.9, typical_p=0.9,
watermark=True, watermark=True,
decoder_input_details=True, decoder_input_details=True,
seed=1, seed=1337,
) )
assert response.details.generated_tokens == 10 assert response.details.generated_tokens == 10