Attempt again to sync with CI

This commit is contained in:
Daniël de Kok 2025-05-14 09:58:34 +00:00
parent 6d4e98dae3
commit 74ded00ecb
7 changed files with 62 additions and 56 deletions

View File

@ -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
}
}

View File

@ -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
}
}

View File

@ -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": "?"
}

View File

@ -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": "<end_of_utterance>"
},
{
"id": 2,
"logprob": -0.00024962425,
"logprob": -0.00030851364,
"special": true,
"text": "</s>"
}
],
"top_tokens": null
},
"generated_text": " The cow and chicken are on a beach."
"generated_text": " The cow and chicken are standing on a beach."
}

View File

@ -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": "<end_of_utterance>"
}

View File

@ -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

View File

@ -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