From b47b161cab755f629fad5fbdbff14147565fb1b1 Mon Sep 17 00:00:00 2001 From: drbh Date: Thu, 29 Feb 2024 22:06:13 +0000 Subject: [PATCH] feat: update more snapshots --- .../test_flash_llama_awq_all_params.json | 82 ++++++------- .../test_flash_falcon_all_params.json | 77 ++++++------ .../test_flash_llama_all_params.json | 26 ++-- .../test_flash_llama_gptq_all_params.json | 38 +++--- .../test_flash_medusa_all_params.json | 113 +++++++++--------- .../test_flash_mistral_all_params.json | 58 ++++----- .../test_flash_starcoder_default_params.json | 61 +++++----- ...t_flash_starcoder_gptq_default_params.json | 36 +++--- integration-tests/models/test_flash_llama.py | 2 +- integration-tests/models/test_flash_medusa.py | 4 +- 10 files changed, 247 insertions(+), 250 deletions(-) diff --git a/integration-tests/models/__snapshots__/test_flash_awq/test_flash_llama_awq_all_params.json b/integration-tests/models/__snapshots__/test_flash_awq/test_flash_llama_awq_all_params.json index d16d34f9..8b560970 100644 --- a/integration-tests/models/__snapshots__/test_flash_awq/test_flash_llama_awq_all_params.json +++ b/integration-tests/models/__snapshots__/test_flash_awq/test_flash_llama_awq_all_params.json @@ -30,7 +30,7 @@ "text": "?" } ], - "seed": 0, + "seed": 1, "tokens": [ { "id": 13, @@ -39,61 +39,61 @@ "text": "\n" }, { - "id": 4013, - "logprob": -2.203125, + "id": 13, + "logprob": -1.078125, "special": false, - "text": "This" + "text": "\n" }, { - "id": 1139, - "logprob": -0.23693848, + "id": 20001, + "logprob": -1.8847656, "special": false, - "text": " question" + "text": "Comment" }, { - "id": 756, + "id": 29901, "logprob": 0.0, "special": false, - "text": " has" - }, - { - "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" + "text": ":" }, { "id": 306, - "logprob": 0.0, + "logprob": -0.31201172, "special": false, "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 }, - "generated_text": "What is Deep Learning?\nThis question has been asked many times and I" + "generated_text": "What is Deep Learning?\n\nComment: I’m voting to close" } diff --git a/integration-tests/models/__snapshots__/test_flash_falcon/test_flash_falcon_all_params.json b/integration-tests/models/__snapshots__/test_flash_falcon/test_flash_falcon_all_params.json index cd35186d..03d37c03 100644 --- a/integration-tests/models/__snapshots__/test_flash_falcon/test_flash_falcon_all_params.json +++ b/integration-tests/models/__snapshots__/test_flash_falcon/test_flash_falcon_all_params.json @@ -11,88 +11,89 @@ }, { "id": 1622, - "logprob": -7.8125, + "logprob": -7.7421875, "text": "af" }, { "id": 249, - "logprob": -4.5, + "logprob": -4.484375, "text": "at" }, { "id": 1480, - "logprob": -10.875, + "logprob": -10.890625, "text": "ron" }, { "id": 37, - "logprob": -3.6875, + "logprob": -3.6757812, "text": ":" } ], - "seed": 0, + "seed": 1, "tokens": [ { "id": 836, - "logprob": -1.265625, + "logprob": -1.2822266, "special": false, "text": " i" }, { "id": 18, - "logprob": -0.119628906, + "logprob": -0.11621094, "special": false, "text": "'" }, { - "id": 298, - "logprob": -2.265625, + "id": 88, + "logprob": -0.11016846, "special": false, - "text": "ve" - }, - { - "id": 650, - "logprob": -0.49804688, - "special": false, - "text": " been" + "text": "m" }, { "id": 1241, - "logprob": 0.0, + "logprob": -0.9682617, "special": false, "text": " using" }, { - "id": 334, - "logprob": 0.0, + "id": 61734, + "logprob": -1.8984375, "special": false, - "text": " it" - }, - { - "id": 312, - "logprob": -1.2421875, - "special": false, - "text": " for" - }, - { - "id": 909, - "logprob": -0.99609375, - "special": false, - "text": " years" + "text": " gnome" }, { "id": 193, - "logprob": -0.30273438, + "logprob": -0.21923828, "special": false, "text": "\n" }, { - "id": 807, - "logprob": -1.078125, + "id": 89, + "logprob": -1.1513672, "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" } diff --git a/integration-tests/models/__snapshots__/test_flash_llama/test_flash_llama_all_params.json b/integration-tests/models/__snapshots__/test_flash_llama/test_flash_llama_all_params.json index 9f145377..35280ea5 100644 --- a/integration-tests/models/__snapshots__/test_flash_llama/test_flash_llama_all_params.json +++ b/integration-tests/models/__snapshots__/test_flash_llama/test_flash_llama_all_params.json @@ -2,7 +2,7 @@ "details": { "best_of_sequences": null, "finish_reason": "stop_sequence", - "generated_tokens": 5, + "generated_tokens": 4, "prefill": [ { "id": 1, @@ -20,7 +20,7 @@ "text": "request" } ], - "seed": 0, + "seed": 1, "tokens": [ { "id": 5229, @@ -29,31 +29,25 @@ "text": " failed" }, { - "id": 29901, - "logprob": -0.44970703, + "id": 13, + "logprob": -1.4501953, "special": false, - "text": ":" + "text": "\n" }, { - "id": 4829, - "logprob": -1.8339844, + "id": 1576, + "logprob": -0.359375, "special": false, - "text": " Error" - }, - { - "id": 297, - "logprob": -1.0556641, - "special": false, - "text": " in" + "text": "The" }, { "id": 1243, - "logprob": 0.0, + "logprob": -0.7578125, "special": false, "text": " test" } ], "top_tokens": null }, - "generated_text": "Test request failed: Error in test" + "generated_text": "Test request failed\nThe test" } diff --git a/integration-tests/models/__snapshots__/test_flash_llama_gptq/test_flash_llama_gptq_all_params.json b/integration-tests/models/__snapshots__/test_flash_llama_gptq/test_flash_llama_gptq_all_params.json index fa2fd4a2..4ff5bbb0 100644 --- a/integration-tests/models/__snapshots__/test_flash_llama_gptq/test_flash_llama_gptq_all_params.json +++ b/integration-tests/models/__snapshots__/test_flash_llama_gptq/test_flash_llama_gptq_all_params.json @@ -11,26 +11,26 @@ }, { "id": 4321, - "logprob": -9.84375, + "logprob": -9.7890625, "text": "Test" }, { "id": 2009, - "logprob": -9.6015625, + "logprob": -9.625, "text": "request" } ], - "seed": 0, + "seed": 1, "tokens": [ { "id": 29899, - "logprob": -1.5625, + "logprob": -1.5234375, "special": false, "text": "-" }, { "id": 1454, - "logprob": -0.20410156, + "logprob": -0.20019531, "special": false, "text": "for" }, @@ -54,36 +54,36 @@ }, { "id": 396, - "logprob": -0.27685547, + "logprob": -0.27392578, "special": false, "text": " #" }, { - "id": 29906, - "logprob": -0.4970703, + "id": 29946, + "logprob": -2.0761719, "special": false, - "text": "2" + "text": "4" }, { - "id": 29900, - "logprob": -0.80615234, + "id": 29945, + "logprob": -0.8120117, "special": false, - "text": "0" + "text": "5" }, { - "id": 29896, - "logprob": 0.0, + "id": 29953, + "logprob": -0.78271484, "special": false, - "text": "1" + "text": "6" }, { - "id": 29955, - "logprob": -1.0751953, + "id": 29929, + "logprob": -0.5830078, "special": false, - "text": "7" + "text": "9" } ], "top_tokens": null }, - "generated_text": "Test request-for-comment: #2017" + "generated_text": "Test request-for-comment: #4569" } diff --git a/integration-tests/models/__snapshots__/test_flash_medusa/test_flash_medusa_all_params.json b/integration-tests/models/__snapshots__/test_flash_medusa/test_flash_medusa_all_params.json index d8a298eb..d216843d 100644 --- a/integration-tests/models/__snapshots__/test_flash_medusa/test_flash_medusa_all_params.json +++ b/integration-tests/models/__snapshots__/test_flash_medusa/test_flash_medusa_all_params.json @@ -9,90 +9,91 @@ "logprob": null, "text": "" }, - { - "id": 338, - "logprob": -10.0078125, - "text": "is" - }, { "id": 21784, - "logprob": -15.515625, + "logprob": -10.1875, "text": "Deep" }, { "id": 29257, - "logprob": -2.8847656, + "logprob": -3.125, "text": "Learning" }, { "id": 29973, - "logprob": -4.140625, + "logprob": -7.5664062, "text": "?" + }, + { + "id": 29871, + "logprob": -4.3984375, + "text": "" } ], - "seed": 0, + "seed": 1337, "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, - "logprob": -1.1582031, + "logprob": 0.0, "special": false, "text": "\n" }, { - "id": 2772, - "logprob": -0.23083496, + "id": 797, + "logprob": -0.8491211, "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, "special": false, - "text": "ep" + "text": " of" }, { - "id": 6509, - "logprob": 0.0, + "id": 319, + "logprob": -0.45654297, "special": false, - "text": " learning" - }, - { - "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" + "text": " A" } - ] + ], + "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" } diff --git a/integration-tests/models/__snapshots__/test_flash_mistral/test_flash_mistral_all_params.json b/integration-tests/models/__snapshots__/test_flash_mistral/test_flash_mistral_all_params.json index c0dc6471..c9732dcf 100644 --- a/integration-tests/models/__snapshots__/test_flash_mistral/test_flash_mistral_all_params.json +++ b/integration-tests/models/__snapshots__/test_flash_mistral/test_flash_mistral_all_params.json @@ -20,7 +20,7 @@ "text": "request" } ], - "seed": 0, + "seed": 1, "tokens": [ { "id": 28747, @@ -35,55 +35,55 @@ "text": " Let" }, { - "id": 332, - "logprob": -2.3359375, + "id": 261, + "logprob": -2.0078125, "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, "special": false, - "text": " be" + "text": ")" }, { - "id": 325, - "logprob": -1.0234375, + "id": 327, + "logprob": 0.0, "special": false, - "text": " (" + "text": " =" }, { - "id": 28734, - "logprob": -2.0292969, + "id": 281, + "logprob": -0.2849121, "special": false, - "text": "0" + "text": " d" }, { - "id": 648, - "logprob": -1.0439453, + "id": 348, + "logprob": -0.6401367, "special": false, - "text": " +" - }, - { - "id": 28705, - "logprob": -0.24499512, - "special": false, - "text": " " + "text": "**" }, { "id": 28770, - "logprob": -0.5073242, + "logprob": -0.66259766, "special": false, "text": "3" - }, - { - "id": 387, - "logprob": -1.5507812, - "special": false, - "text": " -" } ], "top_tokens": null }, - "generated_text": "Test request: Let u be (0 + 3 -" + "generated_text": "Test request: Let t(d) = d**3" } diff --git a/integration-tests/models/__snapshots__/test_flash_starcoder/test_flash_starcoder_default_params.json b/integration-tests/models/__snapshots__/test_flash_starcoder/test_flash_starcoder_default_params.json index 89e02c07..cd139bc4 100644 --- a/integration-tests/models/__snapshots__/test_flash_starcoder/test_flash_starcoder_default_params.json +++ b/integration-tests/models/__snapshots__/test_flash_starcoder/test_flash_starcoder_default_params.json @@ -11,7 +11,7 @@ }, { "id": 1459, - "logprob": -5.6328125, + "logprob": -5.6289062, "text": " print" }, { @@ -21,11 +21,11 @@ }, { "id": 7656, - "logprob": -5.9882812, + "logprob": -5.9960938, "text": "hello" } ], - "seed": 0, + "seed": 1, "tokens": [ { "id": 2262, @@ -59,7 +59,7 @@ }, { "id": 10896, - "logprob": -0.38549805, + "logprob": -0.3659668, "special": false, "text": " World" }, @@ -70,10 +70,10 @@ "text": "\")" }, { - "id": 203, - "logprob": -0.10632324, + "id": 478, + "logprob": -2.2929688, "special": false, - "text": "\n" + "text": "\n\n" }, { "id": 203, @@ -83,7 +83,7 @@ }, { "id": 589, - "logprob": -0.20141602, + "logprob": 0.0, "special": false, "text": "def" }, @@ -113,7 +113,7 @@ }, { "id": 426, - "logprob": 0.0, + "logprob": -0.10021973, "special": false, "text": "name" }, @@ -149,7 +149,7 @@ }, { "id": 440, - "logprob": -0.16027832, + "logprob": -0.4741211, "special": false, "text": "(\"" }, @@ -184,10 +184,10 @@ "text": ")" }, { - "id": 203, + "id": 478, "logprob": 0.0, "special": false, - "text": "\n" + "text": "\n\n" }, { "id": 203, @@ -323,13 +323,25 @@ }, { "id": 313, - "logprob": -0.6328125, + "logprob": -0.34838867, "special": false, "text": " \"" }, + { + "id": 844, + "logprob": -0.4741211, + "special": false, + "text": " you" + }, + { + "id": 884, + "logprob": 0.0, + "special": false, + "text": " are" + }, { "id": 313, - "logprob": -1.7011719, + "logprob": 0.0, "special": false, "text": " \"" }, @@ -364,30 +376,19 @@ "text": "))" }, { - "id": 203, + "id": 478, "logprob": 0.0, "special": false, - "text": "\n" + "text": "\n\n" }, { "id": 203, "logprob": 0.0, "special": false, "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" } diff --git a/integration-tests/models/__snapshots__/test_flash_starcoder_gptq/test_flash_starcoder_gptq_default_params.json b/integration-tests/models/__snapshots__/test_flash_starcoder_gptq/test_flash_starcoder_gptq_default_params.json index bf0f5146..2d19d9d4 100644 --- a/integration-tests/models/__snapshots__/test_flash_starcoder_gptq/test_flash_starcoder_gptq_default_params.json +++ b/integration-tests/models/__snapshots__/test_flash_starcoder_gptq/test_flash_starcoder_gptq_default_params.json @@ -16,17 +16,17 @@ }, { "id": 21017, - "logprob": -7.5898438, + "logprob": -7.5859375, "text": "ometric" }, { "id": 81, - "logprob": -0.26586914, + "logprob": -0.26733398, "text": "_" }, { "id": 6009, - "logprob": -1.6347656, + "logprob": -1.640625, "text": "mean" }, { @@ -36,17 +36,17 @@ }, { "id": 62, - "logprob": -5.2382812, + "logprob": -5.2304688, "text": "L" }, { "id": 44, - "logprob": -3.0996094, + "logprob": -3.1132812, "text": ":" }, { "id": 1682, - "logprob": -1.1025391, + "logprob": -1.1083984, "text": " List" }, { @@ -56,16 +56,16 @@ }, { "id": 1808, - "logprob": -0.32226562, + "logprob": -0.32177734, "text": "float" }, { "id": 10794, - "logprob": -2.8164062, + "logprob": -2.8183594, "text": "]):" } ], - "seed": 0, + "seed": 1, "tokens": [ { "id": 284, @@ -75,13 +75,13 @@ }, { "id": 442, - "logprob": -1.3134766, + "logprob": -1.40625, "special": false, "text": " return" }, { "id": 11665, - "logprob": -0.10021973, + "logprob": -0.09442139, "special": false, "text": " reduce" }, @@ -129,7 +129,7 @@ }, { "id": 319, - "logprob": -0.42871094, + "logprob": -0.3869629, "special": false, "text": " *" }, @@ -176,19 +176,19 @@ "text": "1" }, { - "id": 32, - "logprob": -0.31323242, + "id": 517, + "logprob": -1.3134766, "special": false, - "text": "." + "text": " /" }, { - "id": 34, + "id": 2069, "logprob": 0.0, "special": false, - "text": "0" + "text": " len" } ], "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" } diff --git a/integration-tests/models/test_flash_llama.py b/integration-tests/models/test_flash_llama.py index 1972bcd8..b8b4516f 100644 --- a/integration-tests/models/test_flash_llama.py +++ b/integration-tests/models/test_flash_llama.py @@ -43,7 +43,7 @@ async def test_flash_llama_all_params(flash_llama, response_snapshot): seed=1, ) - assert response.details.generated_tokens == 5 + assert response.details.generated_tokens == 4 assert response == response_snapshot diff --git a/integration-tests/models/test_flash_medusa.py b/integration-tests/models/test_flash_medusa.py index 9e1ea445..b76f05d8 100644 --- a/integration-tests/models/test_flash_medusa.py +++ b/integration-tests/models/test_flash_medusa.py @@ -26,7 +26,7 @@ async def test_flash_medusa_simple(flash_medusa, response_snapshot): @pytest.mark.asyncio async def test_flash_medusa_all_params(flash_medusa, response_snapshot): response = await flash_medusa.generate( - "What is Deep Learning?", + "What is Deep Learning? ", max_new_tokens=10, repetition_penalty=1.2, return_full_text=True, @@ -38,7 +38,7 @@ async def test_flash_medusa_all_params(flash_medusa, response_snapshot): typical_p=0.9, watermark=True, decoder_input_details=True, - seed=1, + seed=1337, ) assert response.details.generated_tokens == 10