From 74ded00ecb3c7c7613c739ad8d379e0e346c40fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20de=20Kok?= Date: Wed, 14 May 2025 09:58:34 +0000 Subject: [PATCH] Attempt again to sync with CI --- .../test_flash_gemma3_image_cow.json | 8 ++-- .../test_flash_gemma3_image_cow_dog.json | 10 ++--- .../test_flash_pali_gemma_image.json | 40 +++++++++---------- .../test_idefics/test_idefics_two_images.json | 34 +++++++++------- .../test_flash_smolvlm_next_simple_url.json | 16 ++++---- integration-tests/models/test_flash_gemma3.py | 8 ++-- integration-tests/models/test_idefics.py | 2 +- 7 files changed, 62 insertions(+), 56 deletions(-) diff --git a/integration-tests/models/__snapshots__/test_flash_gemma3/test_flash_gemma3_image_cow.json b/integration-tests/models/__snapshots__/test_flash_gemma3/test_flash_gemma3_image_cow.json index c1a4b402..fbe95016 100644 --- a/integration-tests/models/__snapshots__/test_flash_gemma3/test_flash_gemma3_image_cow.json +++ b/integration-tests/models/__snapshots__/test_flash_gemma3/test_flash_gemma3_image_cow.json @@ -5,7 +5,7 @@ "index": 0, "logprobs": null, "message": { - "content": "Here's a description of what's shown in the image:\n\nThe image depicts a brown cow standing on a sandy beach. The cow has white markings on its face and ears. Behind the cow is a clear blue ocean with a distant island, and a bright blue sky with some scattered clouds. \n\nIt's a rather charming and unexpected sight – a cow enjoying a beach day!", + "content": "Here's a description of what's shown in the image:\n\nThe image depicts a brown cow standing on a sandy beach. The beach has turquoise water and a distant island visible in the background. The sky is bright blue with some white clouds. \n\nIt's a quite a humorous and unusual scene – a cow enjoying a beach day!", "name": null, "role": "assistant", "tool_calls": null @@ -13,14 +13,14 @@ "usage": null } ], - "created": 1747123513, + "created": 1747216083, "id": "", "model": "google/gemma-3-4b-it", "object": "chat.completion", "system_fingerprint": "3.3.0-dev0-native", "usage": { - "completion_tokens": 81, + "completion_tokens": 72, "prompt_tokens": 275, - "total_tokens": 356 + "total_tokens": 347 } } diff --git a/integration-tests/models/__snapshots__/test_flash_gemma3/test_flash_gemma3_image_cow_dog.json b/integration-tests/models/__snapshots__/test_flash_gemma3/test_flash_gemma3_image_cow_dog.json index 6dc6418c..40f317cc 100644 --- a/integration-tests/models/__snapshots__/test_flash_gemma3/test_flash_gemma3_image_cow_dog.json +++ b/integration-tests/models/__snapshots__/test_flash_gemma3/test_flash_gemma3_image_cow_dog.json @@ -1,11 +1,11 @@ { "choices": [ { - "finish_reason": "length", + "finish_reason": "stop", "index": 0, "logprobs": null, "message": { - "content": "Based on the image, the animal is a cow, not a dog! It appears to be a **Brazilian Fandangos** cow. \n\nHere's why:\n\n* **Color and markings:** The reddish-brown color and white markings are characteristic of this breed.\n* **Body shape:** They have a distinctive, sturdy build.\n* **Origin:** The Brazilian Fandangos breed originated in Brazil and is known for its ability to thrive in hot, tropical climates", + "content": "That's a fantastic question! However, the image doesn't show a dog. It shows a **Brown Swiss cow** standing on a beach. \n\nBrown Swiss cows are known for their beautiful reddish-brown coats and distinctive white markings. \n\nIf you'd like, you can send me another image, and I'll do my best to identify the animal in it!", "name": null, "role": "assistant", "tool_calls": null @@ -13,14 +13,14 @@ "usage": null } ], - "created": 1747123510, + "created": 1747216080, "id": "", "model": "google/gemma-3-4b-it", "object": "chat.completion", "system_fingerprint": "3.3.0-dev0-native", "usage": { - "completion_tokens": 100, + "completion_tokens": 80, "prompt_tokens": 279, - "total_tokens": 379 + "total_tokens": 359 } } diff --git a/integration-tests/models/__snapshots__/test_flash_pali_gemma2/test_flash_pali_gemma_image.json b/integration-tests/models/__snapshots__/test_flash_pali_gemma2/test_flash_pali_gemma_image.json index 78f5b5f2..90d787d4 100644 --- a/integration-tests/models/__snapshots__/test_flash_pali_gemma2/test_flash_pali_gemma_image.json +++ b/integration-tests/models/__snapshots__/test_flash_pali_gemma2/test_flash_pali_gemma_image.json @@ -8,121 +8,121 @@ "tokens": [ { "id": 108, - "logprob": -0.73046875, + "logprob": -0.48046875, "special": false, "text": "\n" }, { "id": 30234, - "logprob": -2.265625, + "logprob": -2.21875, "special": false, "text": "Brown" }, { "id": 108, - "logprob": -0.123535156, + "logprob": -0.119140625, "special": false, "text": "\n" }, { "id": 3726, - "logprob": -1.7109375, + "logprob": -1.703125, "special": false, "text": "Car" }, { "id": 108, - "logprob": -0.036132812, + "logprob": -0.0390625, "special": false, "text": "\n" }, { "id": 2915, - "logprob": -1.765625, + "logprob": -1.8203125, "special": false, "text": "Color" }, { "id": 108, - "logprob": -0.044433594, + "logprob": -0.035888672, "special": false, "text": "\n" }, { "id": 19178, - "logprob": -2.0, + "logprob": -2.015625, "special": false, "text": "Cool" }, { "id": 108, - "logprob": -0.080566406, + "logprob": -0.08105469, "special": false, "text": "\n" }, { "id": 40544, - "logprob": -2.125, + "logprob": -2.09375, "special": false, "text": "Decor" }, { "id": 108, - "logprob": -0.033935547, + "logprob": -0.038330078, "special": false, "text": "\n" }, { "id": 108, - "logprob": -1.625, + "logprob": -1.515625, "special": false, "text": "\n" }, { "id": 108, - "logprob": -1.921875, + "logprob": -1.8671875, "special": false, "text": "\n" }, { "id": 108, - "logprob": -1.5546875, + "logprob": -1.6328125, "special": false, "text": "\n" }, { "id": 108, - "logprob": -1.2265625, + "logprob": -1.265625, "special": false, "text": "\n" }, { "id": 108, - "logprob": -0.94921875, + "logprob": -1.0078125, "special": false, "text": "\n" }, { "id": 108, - "logprob": -1.078125, + "logprob": -1.03125, "special": false, "text": "\n" }, { "id": 235336, - "logprob": -1.2265625, + "logprob": -1.2109375, "special": false, "text": "?" }, { "id": 108, - "logprob": -0.3203125, + "logprob": -0.29101562, "special": false, "text": "\n" }, { "id": 235336, - "logprob": -0.07861328, + "logprob": -0.08935547, "special": false, "text": "?" } diff --git a/integration-tests/models/__snapshots__/test_idefics/test_idefics_two_images.json b/integration-tests/models/__snapshots__/test_idefics/test_idefics_two_images.json index a4727707..46e67856 100644 --- a/integration-tests/models/__snapshots__/test_idefics/test_idefics_two_images.json +++ b/integration-tests/models/__snapshots__/test_idefics/test_idefics_two_images.json @@ -2,84 +2,90 @@ "details": { "best_of_sequences": null, "finish_reason": "eos_token", - "generated_tokens": 12, + "generated_tokens": 13, "prefill": [], "seed": null, "tokens": [ { "id": 450, - "logprob": -0.26342773, + "logprob": -0.2602539, "special": false, "text": " The" }, { "id": 21282, - "logprob": -0.01838684, + "logprob": -0.018463135, "special": false, "text": " cow" }, { "id": 322, - "logprob": -0.18041992, + "logprob": -0.1829834, "special": false, "text": " and" }, { "id": 521, - "logprob": -0.62841797, + "logprob": -0.62109375, "special": false, "text": " ch" }, { "id": 21475, - "logprob": -0.0037956238, + "logprob": -0.0037403107, "special": false, "text": "icken" }, { "id": 526, - "logprob": -0.018737793, + "logprob": -0.018920898, "special": false, "text": " are" }, + { + "id": 13407, + "logprob": -1.0732422, + "special": false, + "text": " standing" + }, { "id": 373, - "logprob": -1.0820312, + "logprob": -0.5292969, "special": false, "text": " on" }, { "id": 263, - "logprob": -0.5083008, + "logprob": -0.47070312, "special": false, "text": " a" }, { "id": 25695, - "logprob": -0.07128906, + "logprob": -0.25708008, "special": false, "text": " beach" }, { "id": 29889, - "logprob": -0.12573242, + "logprob": -0.17578125, "special": false, "text": "." }, { "id": 32002, - "logprob": -0.0029792786, + "logprob": -0.0023422241, "special": true, "text": "" }, { "id": 2, - "logprob": -0.00024962425, + "logprob": -0.00030851364, "special": true, "text": "" } ], "top_tokens": null }, - "generated_text": " The cow and chicken are on a beach." + "generated_text": " The cow and chicken are standing on a beach." } diff --git a/integration-tests/models/__snapshots__/test_smolvlm/test_flash_smolvlm_next_simple_url.json b/integration-tests/models/__snapshots__/test_smolvlm/test_flash_smolvlm_next_simple_url.json index 17a69d0d..5a30fd80 100644 --- a/integration-tests/models/__snapshots__/test_smolvlm/test_flash_smolvlm_next_simple_url.json +++ b/integration-tests/models/__snapshots__/test_smolvlm/test_flash_smolvlm_next_simple_url.json @@ -8,49 +8,49 @@ "tokens": [ { "id": 330, - "logprob": -0.118652344, + "logprob": -0.107421875, "special": false, "text": " A" }, { "id": 11426, - "logprob": -0.28320312, + "logprob": -0.30078125, "special": false, "text": " bee" }, { "id": 335, - "logprob": -0.95703125, + "logprob": -0.9609375, "special": false, "text": " on" }, { "id": 253, - "logprob": -0.06982422, + "logprob": -0.0703125, "special": false, "text": " a" }, { "id": 11986, - "logprob": -0.49414062, + "logprob": -0.5, "special": false, "text": " pink" }, { "id": 8525, - "logprob": -0.07763672, + "logprob": -0.09716797, "special": false, "text": " flower" }, { "id": 30, - "logprob": -1.0703125, + "logprob": -1.078125, "special": false, "text": "." }, { "id": 49154, - "logprob": -0.092285156, + "logprob": -0.110839844, "special": true, "text": "" } diff --git a/integration-tests/models/test_flash_gemma3.py b/integration-tests/models/test_flash_gemma3.py index c852f446..cd9d98ea 100644 --- a/integration-tests/models/test_flash_gemma3.py +++ b/integration-tests/models/test_flash_gemma3.py @@ -53,9 +53,9 @@ async def test_flash_gemma3_image_cow_dog(flash_gemma3, response_snapshot): assert ( response.choices[0].message.content - == "Based on the image, the animal is a cow, not a dog! It appears to be a **Brazilian Fandangos** cow. \n\nHere's why:\n\n* **Color and markings:** The reddish-brown color and white markings are characteristic of this breed.\n* **Body shape:** They have a distinctive, sturdy build.\n* **Origin:** The Brazilian Fandangos breed originated in Brazil and is known for its ability to thrive in hot, tropical climates" + == "That's a fantastic question! However, the image doesn't show a dog. It shows a **Brown Swiss cow** standing on a beach. \n\nBrown Swiss cows are known for their beautiful reddish-brown coats and distinctive white markings. \n\nIf you'd like, you can send me another image, and I'll do my best to identify the animal in it!" ) - assert response.usage["completion_tokens"] == 100 + assert response.usage["completion_tokens"] == 80 assert response == response_snapshot @@ -76,9 +76,9 @@ async def test_flash_gemma3_image_cow(flash_gemma3, response_snapshot): ) assert ( response.choices[0].message.content - == "Here's a description of what's shown in the image:\n\nThe image depicts a brown cow standing on a sandy beach. The cow has white markings on its face and ears. Behind the cow is a clear blue ocean with a distant island, and a bright blue sky with some scattered clouds. \n\nIt's a rather charming and unexpected sight – a cow enjoying a beach day!" + == "Here's a description of what's shown in the image:\n\nThe image depicts a brown cow standing on a sandy beach. The beach has turquoise water and a distant island visible in the background. The sky is bright blue with some white clouds. \n\nIt's a quite a humorous and unusual scene – a cow enjoying a beach day!" ) - assert response.usage["completion_tokens"] == 81 + assert response.usage["completion_tokens"] == 72 assert response == response_snapshot diff --git a/integration-tests/models/test_idefics.py b/integration-tests/models/test_idefics.py index e5d08bb7..848a6674 100644 --- a/integration-tests/models/test_idefics.py +++ b/integration-tests/models/test_idefics.py @@ -39,7 +39,7 @@ async def test_idefics_two_images(idefics, response_snapshot, chicken, cow_beach max_new_tokens=20, ) assert ( - response.generated_text == " The cow and chicken are on a beach." + response.generated_text == " The cow and chicken are standing on a beach." ), f"{repr(response.generated_text)}" assert response == response_snapshot