From eb4d34352d0859af2a6c8761d20c152b1cd1d6bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20de=20Kok?= Date: Wed, 8 Jan 2025 14:49:55 +0000 Subject: [PATCH] Fix some annoying perturbations --- ...ompressed_tensors_w8a8_int_all_params.json | 6 +- ...rs_w8a8_int_dynamic_weight_all_params.json | 36 +++--- ..._tensors_w8a8_int_dynamic_weight_load.json | 80 ++++++------ ...t_compressed_tensors_wna16_all_params.json | 2 +- .../test_flash_starcoder2_default_params.json | 114 +++++++++--------- ...pressed_tensors_w8a8_int_dynamic_weight.py | 2 +- 6 files changed, 120 insertions(+), 120 deletions(-) diff --git a/integration-tests/models/__snapshots__/test_compressed_tensors_w8a8_int/test_compressed_tensors_w8a8_int_all_params.json b/integration-tests/models/__snapshots__/test_compressed_tensors_w8a8_int/test_compressed_tensors_w8a8_int_all_params.json index 7d35e8f9..771708eb 100644 --- a/integration-tests/models/__snapshots__/test_compressed_tensors_w8a8_int/test_compressed_tensors_w8a8_int_all_params.json +++ b/integration-tests/models/__snapshots__/test_compressed_tensors_w8a8_int/test_compressed_tensors_w8a8_int_all_params.json @@ -32,7 +32,7 @@ }, { "id": 1101, - "logprob": -1.0947266, + "logprob": -1.0136719, "special": false, "text": " also" }, @@ -56,13 +56,13 @@ }, { "id": 4009, - "logprob": -0.15563965, + "logprob": -0.21923828, "special": false, "text": " network" }, { "id": 477, - "logprob": -1.4003906, + "logprob": -1.4824219, "special": false, "text": " or" } diff --git a/integration-tests/models/__snapshots__/test_compressed_tensors_w8a8_int_dynamic_weight/test_compressed_tensors_w8a8_int_dynamic_weight_all_params.json b/integration-tests/models/__snapshots__/test_compressed_tensors_w8a8_int_dynamic_weight/test_compressed_tensors_w8a8_int_dynamic_weight_all_params.json index 0db48f3e..6b3f5092 100644 --- a/integration-tests/models/__snapshots__/test_compressed_tensors_w8a8_int_dynamic_weight/test_compressed_tensors_w8a8_int_dynamic_weight_all_params.json +++ b/integration-tests/models/__snapshots__/test_compressed_tensors_w8a8_int_dynamic_weight/test_compressed_tensors_w8a8_int_dynamic_weight_all_params.json @@ -8,7 +8,7 @@ "tokens": [ { "id": 1939, - "logprob": -2.2675781, + "logprob": -2.2460938, "special": false, "text": "?\n\n" }, @@ -20,13 +20,13 @@ }, { "id": 20909, - "logprob": -0.37695312, + "logprob": -0.48608398, "special": false, "text": " Learning" }, { "id": 4102, - "logprob": -1.9316406, + "logprob": -2.265625, "special": false, "text": " " }, @@ -38,25 +38,13 @@ }, { "id": 458, - "logprob": -0.80859375, + "logprob": -0.6328125, "special": false, "text": " an" }, - { - "id": 3082, - "logprob": -1.4541016, - "special": false, - "text": " area" - }, - { - "id": 315, - "logprob": 0.0, - "special": false, - "text": " of" - }, { "id": 20443, - "logprob": -0.5136719, + "logprob": -0.1796875, "special": false, "text": " artificial" }, @@ -65,9 +53,21 @@ "logprob": 0.0, "special": false, "text": " intelligence" + }, + { + "id": 320, + "logprob": -0.37695312, + "special": false, + "text": " (" + }, + { + "id": 15469, + "logprob": 0.0, + "special": false, + "text": "AI" } ], "top_tokens": null }, - "generated_text": "What is deep learning?\n\nDeep Learning is an area of artificial intelligence" + "generated_text": "What is deep learning?\n\nDeep Learning is an artificial intelligence (AI" } diff --git a/integration-tests/models/__snapshots__/test_compressed_tensors_w8a8_int_dynamic_weight/test_compressed_tensors_w8a8_int_dynamic_weight_load.json b/integration-tests/models/__snapshots__/test_compressed_tensors_w8a8_int_dynamic_weight/test_compressed_tensors_w8a8_int_dynamic_weight_load.json index abcaf876..1fa4e33a 100644 --- a/integration-tests/models/__snapshots__/test_compressed_tensors_w8a8_int_dynamic_weight/test_compressed_tensors_w8a8_int_dynamic_weight_load.json +++ b/integration-tests/models/__snapshots__/test_compressed_tensors_w8a8_int_dynamic_weight/test_compressed_tensors_w8a8_int_dynamic_weight_load.json @@ -9,61 +9,61 @@ "tokens": [ { "id": 18183, - "logprob": -1.6669922, + "logprob": -1.4912109, "special": false, "text": " Deep" }, { "id": 6832, - "logprob": -0.08959961, + "logprob": -0.075683594, "special": false, "text": " learning" }, { "id": 374, - "logprob": -0.14685059, + "logprob": -0.12408447, "special": false, "text": " is" }, { "id": 264, - "logprob": -0.125, + "logprob": -0.12768555, "special": false, "text": " a" }, { "id": 25993, - "logprob": -0.81640625, + "logprob": -0.82128906, "special": false, "text": " subset" }, { "id": 315, - "logprob": -0.0013418198, + "logprob": -0.0012636185, "special": false, "text": " of" }, { "id": 5662, - "logprob": -0.16259766, + "logprob": -0.12878418, "special": false, "text": " machine" }, { "id": 6832, - "logprob": -0.0016393661, + "logprob": -0.0015888214, "special": false, "text": " learning" }, { "id": 429, - "logprob": -0.4477539, + "logprob": -0.49194336, "special": false, "text": " that" }, { "id": 5711, - "logprob": -1.2802734, + "logprob": -1.2626953, "special": false, "text": " uses" } @@ -82,61 +82,61 @@ "tokens": [ { "id": 18183, - "logprob": -1.6669922, + "logprob": -1.4912109, "special": false, "text": " Deep" }, { "id": 6832, - "logprob": -0.08959961, + "logprob": -0.075683594, "special": false, "text": " learning" }, { "id": 374, - "logprob": -0.14685059, + "logprob": -0.12408447, "special": false, "text": " is" }, { "id": 264, - "logprob": -0.125, + "logprob": -0.12768555, "special": false, "text": " a" }, { "id": 25993, - "logprob": -0.81640625, + "logprob": -0.82128906, "special": false, "text": " subset" }, { "id": 315, - "logprob": -0.0013418198, + "logprob": -0.0012636185, "special": false, "text": " of" }, { "id": 5662, - "logprob": -0.16259766, + "logprob": -0.12878418, "special": false, "text": " machine" }, { "id": 6832, - "logprob": -0.0016393661, + "logprob": -0.0015888214, "special": false, "text": " learning" }, { "id": 429, - "logprob": -0.4477539, + "logprob": -0.49194336, "special": false, "text": " that" }, { "id": 5711, - "logprob": -1.2802734, + "logprob": -1.2626953, "special": false, "text": " uses" } @@ -155,61 +155,61 @@ "tokens": [ { "id": 18183, - "logprob": -1.6669922, + "logprob": -1.4912109, "special": false, "text": " Deep" }, { "id": 6832, - "logprob": -0.08959961, + "logprob": -0.075683594, "special": false, "text": " learning" }, { "id": 374, - "logprob": -0.14685059, + "logprob": -0.12408447, "special": false, "text": " is" }, { "id": 264, - "logprob": -0.125, + "logprob": -0.12768555, "special": false, "text": " a" }, { "id": 25993, - "logprob": -0.81640625, + "logprob": -0.82128906, "special": false, "text": " subset" }, { "id": 315, - "logprob": -0.0013418198, + "logprob": -0.0012636185, "special": false, "text": " of" }, { "id": 5662, - "logprob": -0.16259766, + "logprob": -0.12878418, "special": false, "text": " machine" }, { "id": 6832, - "logprob": -0.0016393661, + "logprob": -0.0015888214, "special": false, "text": " learning" }, { "id": 429, - "logprob": -0.4477539, + "logprob": -0.49194336, "special": false, "text": " that" }, { "id": 5711, - "logprob": -1.2802734, + "logprob": -1.2626953, "special": false, "text": " uses" } @@ -228,61 +228,61 @@ "tokens": [ { "id": 18183, - "logprob": -1.6669922, + "logprob": -1.4912109, "special": false, "text": " Deep" }, { "id": 6832, - "logprob": -0.08959961, + "logprob": -0.075683594, "special": false, "text": " learning" }, { "id": 374, - "logprob": -0.14685059, + "logprob": -0.12408447, "special": false, "text": " is" }, { "id": 264, - "logprob": -0.125, + "logprob": -0.12768555, "special": false, "text": " a" }, { "id": 25993, - "logprob": -0.81640625, + "logprob": -0.82128906, "special": false, "text": " subset" }, { "id": 315, - "logprob": -0.0013418198, + "logprob": -0.0012636185, "special": false, "text": " of" }, { "id": 5662, - "logprob": -0.16259766, + "logprob": -0.12878418, "special": false, "text": " machine" }, { "id": 6832, - "logprob": -0.0016393661, + "logprob": -0.0015888214, "special": false, "text": " learning" }, { "id": 429, - "logprob": -0.4477539, + "logprob": -0.49194336, "special": false, "text": " that" }, { "id": 5711, - "logprob": -1.2802734, + "logprob": -1.2626953, "special": false, "text": " uses" } diff --git a/integration-tests/models/__snapshots__/test_compressed_tensors_wna16_int/test_compressed_tensors_wna16_all_params.json b/integration-tests/models/__snapshots__/test_compressed_tensors_wna16_int/test_compressed_tensors_wna16_all_params.json index 08c63e79..29709676 100644 --- a/integration-tests/models/__snapshots__/test_compressed_tensors_wna16_int/test_compressed_tensors_wna16_all_params.json +++ b/integration-tests/models/__snapshots__/test_compressed_tensors_wna16_int/test_compressed_tensors_wna16_all_params.json @@ -44,7 +44,7 @@ }, { "id": 38397, - "logprob": -0.12695312, + "logprob": 0.0, "special": false, "text": " subset" }, diff --git a/integration-tests/models/__snapshots__/test_flash_starcoder2/test_flash_starcoder2_default_params.json b/integration-tests/models/__snapshots__/test_flash_starcoder2/test_flash_starcoder2_default_params.json index 914e59c0..6674cf50 100644 --- a/integration-tests/models/__snapshots__/test_flash_starcoder2/test_flash_starcoder2_default_params.json +++ b/integration-tests/models/__snapshots__/test_flash_starcoder2/test_flash_starcoder2_default_params.json @@ -8,7 +8,7 @@ "tokens": [ { "id": 2284, - "logprob": -0.296875, + "logprob": -0.31323242, "special": false, "text": "():" }, @@ -38,13 +38,13 @@ }, { "id": 10914, - "logprob": -0.7734375, + "logprob": -0.7871094, "special": false, "text": " World" }, { "id": 16013, - "logprob": -0.61816406, + "logprob": -0.64746094, "special": false, "text": "!\")" }, @@ -62,7 +62,7 @@ }, { "id": 610, - "logprob": -0.4152832, + "logprob": -0.41064453, "special": false, "text": "def" }, @@ -92,7 +92,7 @@ }, { "id": 444, - "logprob": -0.21618652, + "logprob": -0.21655273, "special": false, "text": "name" }, @@ -139,28 +139,16 @@ "text": "Hello" }, { - "id": 925, - "logprob": -3.3476562, + "id": 332, + "logprob": -0.034698486, "special": false, - "text": " %" + "text": " \"" }, { - "id": 120, + "id": 494, "logprob": 0.0, "special": false, - "text": "s" - }, - { - "id": 11571, - "logprob": -0.08892822, - "special": false, - "text": "!\"" - }, - { - "id": 925, - "logprob": 0.0, - "special": false, - "text": " %" + "text": " +" }, { "id": 655, @@ -169,10 +157,22 @@ "text": " name" }, { - "id": 46, + "id": 494, + "logprob": -0.20141602, + "special": false, + "text": " +" + }, + { + "id": 332, "logprob": 0.0, "special": false, - "text": ")" + "text": " \"" + }, + { + "id": 16013, + "logprob": 0.0, + "special": false, + "text": "!\")" }, { "id": 222, @@ -230,7 +230,7 @@ }, { "id": 400, - "logprob": -0.074279785, + "logprob": 0.0, "special": false, "text": "age" }, @@ -289,22 +289,34 @@ "text": "Hello" }, { - "id": 925, + "id": 332, "logprob": 0.0, "special": false, - "text": " %" + "text": " \"" }, { - "id": 120, + "id": 494, "logprob": 0.0, "special": false, - "text": "s" + "text": " +" }, { - "id": 49, - "logprob": -0.07891846, + "id": 655, + "logprob": 0.0, "special": false, - "text": "," + "text": " name" + }, + { + "id": 494, + "logprob": 0.0, + "special": false, + "text": " +" + }, + { + "id": 3021, + "logprob": -0.5761719, + "special": false, + "text": " \"," }, { "id": 863, @@ -319,55 +331,43 @@ "text": " are" }, { - "id": 925, + "id": 332, "logprob": 0.0, "special": false, - "text": " %" + "text": " \"" }, { - "id": 105, + "id": 494, "logprob": 0.0, "special": false, - "text": "d" + "text": " +" }, { - "id": 11339, + "id": 615, "logprob": 0.0, "special": false, - "text": " years" + "text": " str" }, { - "id": 3627, + "id": 45, "logprob": 0.0, "special": false, - "text": " old" + "text": "(" }, { - "id": 11571, + "id": 400, "logprob": 0.0, "special": false, - "text": "!\"" + "text": "age" }, { - "id": 925, + "id": 46, "logprob": 0.0, "special": false, - "text": " %" - }, - { - "id": 327, - "logprob": 0.0, - "special": false, - "text": " (" - }, - { - "id": 444, - "logprob": 0.0, - "special": false, - "text": "name" + "text": ")" } ], "top_tokens": null }, - "generated_text": "():\n print(\"Hello World!\")\n\ndef print_hello_name(name):\n print(\"Hello %s!\" % name)\n\ndef print_hello_name_age(name, age):\n print(\"Hello %s, you are %d years old!\" % (name" + "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 + \", you are \" + str(age)" } diff --git a/integration-tests/models/test_compressed_tensors_w8a8_int_dynamic_weight.py b/integration-tests/models/test_compressed_tensors_w8a8_int_dynamic_weight.py index 7cc82a4e..a0b0416b 100644 --- a/integration-tests/models/test_compressed_tensors_w8a8_int_dynamic_weight.py +++ b/integration-tests/models/test_compressed_tensors_w8a8_int_dynamic_weight.py @@ -64,7 +64,7 @@ async def test_compressed_tensors_w8a8_int_dynamic_weight_all_params( assert response.details.generated_tokens == 10 assert ( response.generated_text - == "What is deep learning?\n\nDeep Learning is an area of artificial intelligence" + == "What is deep learning?\n\nDeep Learning is an artificial intelligence (AI" ) assert response == response_snapshot