Fix some annoying perturbations

This commit is contained in:
Daniël de Kok 2025-01-08 14:49:55 +00:00
parent 4e6990267e
commit eb4d34352d
6 changed files with 120 additions and 120 deletions

View File

@ -32,7 +32,7 @@
}, },
{ {
"id": 1101, "id": 1101,
"logprob": -1.0947266, "logprob": -1.0136719,
"special": false, "special": false,
"text": " also" "text": " also"
}, },
@ -56,13 +56,13 @@
}, },
{ {
"id": 4009, "id": 4009,
"logprob": -0.15563965, "logprob": -0.21923828,
"special": false, "special": false,
"text": " network" "text": " network"
}, },
{ {
"id": 477, "id": 477,
"logprob": -1.4003906, "logprob": -1.4824219,
"special": false, "special": false,
"text": " or" "text": " or"
} }

View File

@ -8,7 +8,7 @@
"tokens": [ "tokens": [
{ {
"id": 1939, "id": 1939,
"logprob": -2.2675781, "logprob": -2.2460938,
"special": false, "special": false,
"text": "?\n\n" "text": "?\n\n"
}, },
@ -20,13 +20,13 @@
}, },
{ {
"id": 20909, "id": 20909,
"logprob": -0.37695312, "logprob": -0.48608398,
"special": false, "special": false,
"text": " Learning" "text": " Learning"
}, },
{ {
"id": 4102, "id": 4102,
"logprob": -1.9316406, "logprob": -2.265625,
"special": false, "special": false,
"text": " " "text": " "
}, },
@ -38,25 +38,13 @@
}, },
{ {
"id": 458, "id": 458,
"logprob": -0.80859375, "logprob": -0.6328125,
"special": false, "special": false,
"text": " an" "text": " an"
}, },
{
"id": 3082,
"logprob": -1.4541016,
"special": false,
"text": " area"
},
{
"id": 315,
"logprob": 0.0,
"special": false,
"text": " of"
},
{ {
"id": 20443, "id": 20443,
"logprob": -0.5136719, "logprob": -0.1796875,
"special": false, "special": false,
"text": " artificial" "text": " artificial"
}, },
@ -65,9 +53,21 @@
"logprob": 0.0, "logprob": 0.0,
"special": false, "special": false,
"text": " intelligence" "text": " intelligence"
},
{
"id": 320,
"logprob": -0.37695312,
"special": false,
"text": " ("
},
{
"id": 15469,
"logprob": 0.0,
"special": false,
"text": "AI"
} }
], ],
"top_tokens": null "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"
} }

View File

@ -9,61 +9,61 @@
"tokens": [ "tokens": [
{ {
"id": 18183, "id": 18183,
"logprob": -1.6669922, "logprob": -1.4912109,
"special": false, "special": false,
"text": " Deep" "text": " Deep"
}, },
{ {
"id": 6832, "id": 6832,
"logprob": -0.08959961, "logprob": -0.075683594,
"special": false, "special": false,
"text": " learning" "text": " learning"
}, },
{ {
"id": 374, "id": 374,
"logprob": -0.14685059, "logprob": -0.12408447,
"special": false, "special": false,
"text": " is" "text": " is"
}, },
{ {
"id": 264, "id": 264,
"logprob": -0.125, "logprob": -0.12768555,
"special": false, "special": false,
"text": " a" "text": " a"
}, },
{ {
"id": 25993, "id": 25993,
"logprob": -0.81640625, "logprob": -0.82128906,
"special": false, "special": false,
"text": " subset" "text": " subset"
}, },
{ {
"id": 315, "id": 315,
"logprob": -0.0013418198, "logprob": -0.0012636185,
"special": false, "special": false,
"text": " of" "text": " of"
}, },
{ {
"id": 5662, "id": 5662,
"logprob": -0.16259766, "logprob": -0.12878418,
"special": false, "special": false,
"text": " machine" "text": " machine"
}, },
{ {
"id": 6832, "id": 6832,
"logprob": -0.0016393661, "logprob": -0.0015888214,
"special": false, "special": false,
"text": " learning" "text": " learning"
}, },
{ {
"id": 429, "id": 429,
"logprob": -0.4477539, "logprob": -0.49194336,
"special": false, "special": false,
"text": " that" "text": " that"
}, },
{ {
"id": 5711, "id": 5711,
"logprob": -1.2802734, "logprob": -1.2626953,
"special": false, "special": false,
"text": " uses" "text": " uses"
} }
@ -82,61 +82,61 @@
"tokens": [ "tokens": [
{ {
"id": 18183, "id": 18183,
"logprob": -1.6669922, "logprob": -1.4912109,
"special": false, "special": false,
"text": " Deep" "text": " Deep"
}, },
{ {
"id": 6832, "id": 6832,
"logprob": -0.08959961, "logprob": -0.075683594,
"special": false, "special": false,
"text": " learning" "text": " learning"
}, },
{ {
"id": 374, "id": 374,
"logprob": -0.14685059, "logprob": -0.12408447,
"special": false, "special": false,
"text": " is" "text": " is"
}, },
{ {
"id": 264, "id": 264,
"logprob": -0.125, "logprob": -0.12768555,
"special": false, "special": false,
"text": " a" "text": " a"
}, },
{ {
"id": 25993, "id": 25993,
"logprob": -0.81640625, "logprob": -0.82128906,
"special": false, "special": false,
"text": " subset" "text": " subset"
}, },
{ {
"id": 315, "id": 315,
"logprob": -0.0013418198, "logprob": -0.0012636185,
"special": false, "special": false,
"text": " of" "text": " of"
}, },
{ {
"id": 5662, "id": 5662,
"logprob": -0.16259766, "logprob": -0.12878418,
"special": false, "special": false,
"text": " machine" "text": " machine"
}, },
{ {
"id": 6832, "id": 6832,
"logprob": -0.0016393661, "logprob": -0.0015888214,
"special": false, "special": false,
"text": " learning" "text": " learning"
}, },
{ {
"id": 429, "id": 429,
"logprob": -0.4477539, "logprob": -0.49194336,
"special": false, "special": false,
"text": " that" "text": " that"
}, },
{ {
"id": 5711, "id": 5711,
"logprob": -1.2802734, "logprob": -1.2626953,
"special": false, "special": false,
"text": " uses" "text": " uses"
} }
@ -155,61 +155,61 @@
"tokens": [ "tokens": [
{ {
"id": 18183, "id": 18183,
"logprob": -1.6669922, "logprob": -1.4912109,
"special": false, "special": false,
"text": " Deep" "text": " Deep"
}, },
{ {
"id": 6832, "id": 6832,
"logprob": -0.08959961, "logprob": -0.075683594,
"special": false, "special": false,
"text": " learning" "text": " learning"
}, },
{ {
"id": 374, "id": 374,
"logprob": -0.14685059, "logprob": -0.12408447,
"special": false, "special": false,
"text": " is" "text": " is"
}, },
{ {
"id": 264, "id": 264,
"logprob": -0.125, "logprob": -0.12768555,
"special": false, "special": false,
"text": " a" "text": " a"
}, },
{ {
"id": 25993, "id": 25993,
"logprob": -0.81640625, "logprob": -0.82128906,
"special": false, "special": false,
"text": " subset" "text": " subset"
}, },
{ {
"id": 315, "id": 315,
"logprob": -0.0013418198, "logprob": -0.0012636185,
"special": false, "special": false,
"text": " of" "text": " of"
}, },
{ {
"id": 5662, "id": 5662,
"logprob": -0.16259766, "logprob": -0.12878418,
"special": false, "special": false,
"text": " machine" "text": " machine"
}, },
{ {
"id": 6832, "id": 6832,
"logprob": -0.0016393661, "logprob": -0.0015888214,
"special": false, "special": false,
"text": " learning" "text": " learning"
}, },
{ {
"id": 429, "id": 429,
"logprob": -0.4477539, "logprob": -0.49194336,
"special": false, "special": false,
"text": " that" "text": " that"
}, },
{ {
"id": 5711, "id": 5711,
"logprob": -1.2802734, "logprob": -1.2626953,
"special": false, "special": false,
"text": " uses" "text": " uses"
} }
@ -228,61 +228,61 @@
"tokens": [ "tokens": [
{ {
"id": 18183, "id": 18183,
"logprob": -1.6669922, "logprob": -1.4912109,
"special": false, "special": false,
"text": " Deep" "text": " Deep"
}, },
{ {
"id": 6832, "id": 6832,
"logprob": -0.08959961, "logprob": -0.075683594,
"special": false, "special": false,
"text": " learning" "text": " learning"
}, },
{ {
"id": 374, "id": 374,
"logprob": -0.14685059, "logprob": -0.12408447,
"special": false, "special": false,
"text": " is" "text": " is"
}, },
{ {
"id": 264, "id": 264,
"logprob": -0.125, "logprob": -0.12768555,
"special": false, "special": false,
"text": " a" "text": " a"
}, },
{ {
"id": 25993, "id": 25993,
"logprob": -0.81640625, "logprob": -0.82128906,
"special": false, "special": false,
"text": " subset" "text": " subset"
}, },
{ {
"id": 315, "id": 315,
"logprob": -0.0013418198, "logprob": -0.0012636185,
"special": false, "special": false,
"text": " of" "text": " of"
}, },
{ {
"id": 5662, "id": 5662,
"logprob": -0.16259766, "logprob": -0.12878418,
"special": false, "special": false,
"text": " machine" "text": " machine"
}, },
{ {
"id": 6832, "id": 6832,
"logprob": -0.0016393661, "logprob": -0.0015888214,
"special": false, "special": false,
"text": " learning" "text": " learning"
}, },
{ {
"id": 429, "id": 429,
"logprob": -0.4477539, "logprob": -0.49194336,
"special": false, "special": false,
"text": " that" "text": " that"
}, },
{ {
"id": 5711, "id": 5711,
"logprob": -1.2802734, "logprob": -1.2626953,
"special": false, "special": false,
"text": " uses" "text": " uses"
} }

View File

@ -44,7 +44,7 @@
}, },
{ {
"id": 38397, "id": 38397,
"logprob": -0.12695312, "logprob": 0.0,
"special": false, "special": false,
"text": " subset" "text": " subset"
}, },

View File

@ -8,7 +8,7 @@
"tokens": [ "tokens": [
{ {
"id": 2284, "id": 2284,
"logprob": -0.296875, "logprob": -0.31323242,
"special": false, "special": false,
"text": "():" "text": "():"
}, },
@ -38,13 +38,13 @@
}, },
{ {
"id": 10914, "id": 10914,
"logprob": -0.7734375, "logprob": -0.7871094,
"special": false, "special": false,
"text": " World" "text": " World"
}, },
{ {
"id": 16013, "id": 16013,
"logprob": -0.61816406, "logprob": -0.64746094,
"special": false, "special": false,
"text": "!\")" "text": "!\")"
}, },
@ -62,7 +62,7 @@
}, },
{ {
"id": 610, "id": 610,
"logprob": -0.4152832, "logprob": -0.41064453,
"special": false, "special": false,
"text": "def" "text": "def"
}, },
@ -92,7 +92,7 @@
}, },
{ {
"id": 444, "id": 444,
"logprob": -0.21618652, "logprob": -0.21655273,
"special": false, "special": false,
"text": "name" "text": "name"
}, },
@ -139,28 +139,16 @@
"text": "Hello" "text": "Hello"
}, },
{ {
"id": 925, "id": 332,
"logprob": -3.3476562, "logprob": -0.034698486,
"special": false, "special": false,
"text": " %" "text": " \""
}, },
{ {
"id": 120, "id": 494,
"logprob": 0.0, "logprob": 0.0,
"special": false, "special": false,
"text": "s" "text": " +"
},
{
"id": 11571,
"logprob": -0.08892822,
"special": false,
"text": "!\""
},
{
"id": 925,
"logprob": 0.0,
"special": false,
"text": " %"
}, },
{ {
"id": 655, "id": 655,
@ -169,10 +157,22 @@
"text": " name" "text": " name"
}, },
{ {
"id": 46, "id": 494,
"logprob": -0.20141602,
"special": false,
"text": " +"
},
{
"id": 332,
"logprob": 0.0, "logprob": 0.0,
"special": false, "special": false,
"text": ")" "text": " \""
},
{
"id": 16013,
"logprob": 0.0,
"special": false,
"text": "!\")"
}, },
{ {
"id": 222, "id": 222,
@ -230,7 +230,7 @@
}, },
{ {
"id": 400, "id": 400,
"logprob": -0.074279785, "logprob": 0.0,
"special": false, "special": false,
"text": "age" "text": "age"
}, },
@ -289,22 +289,34 @@
"text": "Hello" "text": "Hello"
}, },
{ {
"id": 925, "id": 332,
"logprob": 0.0, "logprob": 0.0,
"special": false, "special": false,
"text": " %" "text": " \""
}, },
{ {
"id": 120, "id": 494,
"logprob": 0.0, "logprob": 0.0,
"special": false, "special": false,
"text": "s" "text": " +"
}, },
{ {
"id": 49, "id": 655,
"logprob": -0.07891846, "logprob": 0.0,
"special": false, "special": false,
"text": "," "text": " name"
},
{
"id": 494,
"logprob": 0.0,
"special": false,
"text": " +"
},
{
"id": 3021,
"logprob": -0.5761719,
"special": false,
"text": " \","
}, },
{ {
"id": 863, "id": 863,
@ -319,55 +331,43 @@
"text": " are" "text": " are"
}, },
{ {
"id": 925, "id": 332,
"logprob": 0.0, "logprob": 0.0,
"special": false, "special": false,
"text": " %" "text": " \""
}, },
{ {
"id": 105, "id": 494,
"logprob": 0.0, "logprob": 0.0,
"special": false, "special": false,
"text": "d" "text": " +"
}, },
{ {
"id": 11339, "id": 615,
"logprob": 0.0, "logprob": 0.0,
"special": false, "special": false,
"text": " years" "text": " str"
}, },
{ {
"id": 3627, "id": 45,
"logprob": 0.0, "logprob": 0.0,
"special": false, "special": false,
"text": " old" "text": "("
}, },
{ {
"id": 11571, "id": 400,
"logprob": 0.0, "logprob": 0.0,
"special": false, "special": false,
"text": "!\"" "text": "age"
}, },
{ {
"id": 925, "id": 46,
"logprob": 0.0, "logprob": 0.0,
"special": false, "special": false,
"text": " %" "text": ")"
},
{
"id": 327,
"logprob": 0.0,
"special": false,
"text": " ("
},
{
"id": 444,
"logprob": 0.0,
"special": false,
"text": "name"
} }
], ],
"top_tokens": null "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)"
} }

View File

@ -64,7 +64,7 @@ async def test_compressed_tensors_w8a8_int_dynamic_weight_all_params(
assert response.details.generated_tokens == 10 assert response.details.generated_tokens == 10
assert ( assert (
response.generated_text 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 assert response == response_snapshot