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, "index": 0,
"logprobs": null, "logprobs": null,
"message": { "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, "name": null,
"role": "assistant", "role": "assistant",
"tool_calls": null "tool_calls": null
@ -13,14 +13,14 @@
"usage": null "usage": null
} }
], ],
"created": 1747123513, "created": 1747216083,
"id": "", "id": "",
"model": "google/gemma-3-4b-it", "model": "google/gemma-3-4b-it",
"object": "chat.completion", "object": "chat.completion",
"system_fingerprint": "3.3.0-dev0-native", "system_fingerprint": "3.3.0-dev0-native",
"usage": { "usage": {
"completion_tokens": 81, "completion_tokens": 72,
"prompt_tokens": 275, "prompt_tokens": 275,
"total_tokens": 356 "total_tokens": 347
} }
} }

View File

@ -1,11 +1,11 @@
{ {
"choices": [ "choices": [
{ {
"finish_reason": "length", "finish_reason": "stop",
"index": 0, "index": 0,
"logprobs": null, "logprobs": null,
"message": { "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, "name": null,
"role": "assistant", "role": "assistant",
"tool_calls": null "tool_calls": null
@ -13,14 +13,14 @@
"usage": null "usage": null
} }
], ],
"created": 1747123510, "created": 1747216080,
"id": "", "id": "",
"model": "google/gemma-3-4b-it", "model": "google/gemma-3-4b-it",
"object": "chat.completion", "object": "chat.completion",
"system_fingerprint": "3.3.0-dev0-native", "system_fingerprint": "3.3.0-dev0-native",
"usage": { "usage": {
"completion_tokens": 100, "completion_tokens": 80,
"prompt_tokens": 279, "prompt_tokens": 279,
"total_tokens": 379 "total_tokens": 359
} }
} }

View File

@ -8,121 +8,121 @@
"tokens": [ "tokens": [
{ {
"id": 108, "id": 108,
"logprob": -0.73046875, "logprob": -0.48046875,
"special": false, "special": false,
"text": "\n" "text": "\n"
}, },
{ {
"id": 30234, "id": 30234,
"logprob": -2.265625, "logprob": -2.21875,
"special": false, "special": false,
"text": "Brown" "text": "Brown"
}, },
{ {
"id": 108, "id": 108,
"logprob": -0.123535156, "logprob": -0.119140625,
"special": false, "special": false,
"text": "\n" "text": "\n"
}, },
{ {
"id": 3726, "id": 3726,
"logprob": -1.7109375, "logprob": -1.703125,
"special": false, "special": false,
"text": "Car" "text": "Car"
}, },
{ {
"id": 108, "id": 108,
"logprob": -0.036132812, "logprob": -0.0390625,
"special": false, "special": false,
"text": "\n" "text": "\n"
}, },
{ {
"id": 2915, "id": 2915,
"logprob": -1.765625, "logprob": -1.8203125,
"special": false, "special": false,
"text": "Color" "text": "Color"
}, },
{ {
"id": 108, "id": 108,
"logprob": -0.044433594, "logprob": -0.035888672,
"special": false, "special": false,
"text": "\n" "text": "\n"
}, },
{ {
"id": 19178, "id": 19178,
"logprob": -2.0, "logprob": -2.015625,
"special": false, "special": false,
"text": "Cool" "text": "Cool"
}, },
{ {
"id": 108, "id": 108,
"logprob": -0.080566406, "logprob": -0.08105469,
"special": false, "special": false,
"text": "\n" "text": "\n"
}, },
{ {
"id": 40544, "id": 40544,
"logprob": -2.125, "logprob": -2.09375,
"special": false, "special": false,
"text": "Decor" "text": "Decor"
}, },
{ {
"id": 108, "id": 108,
"logprob": -0.033935547, "logprob": -0.038330078,
"special": false, "special": false,
"text": "\n" "text": "\n"
}, },
{ {
"id": 108, "id": 108,
"logprob": -1.625, "logprob": -1.515625,
"special": false, "special": false,
"text": "\n" "text": "\n"
}, },
{ {
"id": 108, "id": 108,
"logprob": -1.921875, "logprob": -1.8671875,
"special": false, "special": false,
"text": "\n" "text": "\n"
}, },
{ {
"id": 108, "id": 108,
"logprob": -1.5546875, "logprob": -1.6328125,
"special": false, "special": false,
"text": "\n" "text": "\n"
}, },
{ {
"id": 108, "id": 108,
"logprob": -1.2265625, "logprob": -1.265625,
"special": false, "special": false,
"text": "\n" "text": "\n"
}, },
{ {
"id": 108, "id": 108,
"logprob": -0.94921875, "logprob": -1.0078125,
"special": false, "special": false,
"text": "\n" "text": "\n"
}, },
{ {
"id": 108, "id": 108,
"logprob": -1.078125, "logprob": -1.03125,
"special": false, "special": false,
"text": "\n" "text": "\n"
}, },
{ {
"id": 235336, "id": 235336,
"logprob": -1.2265625, "logprob": -1.2109375,
"special": false, "special": false,
"text": "?" "text": "?"
}, },
{ {
"id": 108, "id": 108,
"logprob": -0.3203125, "logprob": -0.29101562,
"special": false, "special": false,
"text": "\n" "text": "\n"
}, },
{ {
"id": 235336, "id": 235336,
"logprob": -0.07861328, "logprob": -0.08935547,
"special": false, "special": false,
"text": "?" "text": "?"
} }

View File

@ -2,84 +2,90 @@
"details": { "details": {
"best_of_sequences": null, "best_of_sequences": null,
"finish_reason": "eos_token", "finish_reason": "eos_token",
"generated_tokens": 12, "generated_tokens": 13,
"prefill": [], "prefill": [],
"seed": null, "seed": null,
"tokens": [ "tokens": [
{ {
"id": 450, "id": 450,
"logprob": -0.26342773, "logprob": -0.2602539,
"special": false, "special": false,
"text": " The" "text": " The"
}, },
{ {
"id": 21282, "id": 21282,
"logprob": -0.01838684, "logprob": -0.018463135,
"special": false, "special": false,
"text": " cow" "text": " cow"
}, },
{ {
"id": 322, "id": 322,
"logprob": -0.18041992, "logprob": -0.1829834,
"special": false, "special": false,
"text": " and" "text": " and"
}, },
{ {
"id": 521, "id": 521,
"logprob": -0.62841797, "logprob": -0.62109375,
"special": false, "special": false,
"text": " ch" "text": " ch"
}, },
{ {
"id": 21475, "id": 21475,
"logprob": -0.0037956238, "logprob": -0.0037403107,
"special": false, "special": false,
"text": "icken" "text": "icken"
}, },
{ {
"id": 526, "id": 526,
"logprob": -0.018737793, "logprob": -0.018920898,
"special": false, "special": false,
"text": " are" "text": " are"
}, },
{
"id": 13407,
"logprob": -1.0732422,
"special": false,
"text": " standing"
},
{ {
"id": 373, "id": 373,
"logprob": -1.0820312, "logprob": -0.5292969,
"special": false, "special": false,
"text": " on" "text": " on"
}, },
{ {
"id": 263, "id": 263,
"logprob": -0.5083008, "logprob": -0.47070312,
"special": false, "special": false,
"text": " a" "text": " a"
}, },
{ {
"id": 25695, "id": 25695,
"logprob": -0.07128906, "logprob": -0.25708008,
"special": false, "special": false,
"text": " beach" "text": " beach"
}, },
{ {
"id": 29889, "id": 29889,
"logprob": -0.12573242, "logprob": -0.17578125,
"special": false, "special": false,
"text": "." "text": "."
}, },
{ {
"id": 32002, "id": 32002,
"logprob": -0.0029792786, "logprob": -0.0023422241,
"special": true, "special": true,
"text": "<end_of_utterance>" "text": "<end_of_utterance>"
}, },
{ {
"id": 2, "id": 2,
"logprob": -0.00024962425, "logprob": -0.00030851364,
"special": true, "special": true,
"text": "</s>" "text": "</s>"
} }
], ],
"top_tokens": null "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": [ "tokens": [
{ {
"id": 330, "id": 330,
"logprob": -0.118652344, "logprob": -0.107421875,
"special": false, "special": false,
"text": " A" "text": " A"
}, },
{ {
"id": 11426, "id": 11426,
"logprob": -0.28320312, "logprob": -0.30078125,
"special": false, "special": false,
"text": " bee" "text": " bee"
}, },
{ {
"id": 335, "id": 335,
"logprob": -0.95703125, "logprob": -0.9609375,
"special": false, "special": false,
"text": " on" "text": " on"
}, },
{ {
"id": 253, "id": 253,
"logprob": -0.06982422, "logprob": -0.0703125,
"special": false, "special": false,
"text": " a" "text": " a"
}, },
{ {
"id": 11986, "id": 11986,
"logprob": -0.49414062, "logprob": -0.5,
"special": false, "special": false,
"text": " pink" "text": " pink"
}, },
{ {
"id": 8525, "id": 8525,
"logprob": -0.07763672, "logprob": -0.09716797,
"special": false, "special": false,
"text": " flower" "text": " flower"
}, },
{ {
"id": 30, "id": 30,
"logprob": -1.0703125, "logprob": -1.078125,
"special": false, "special": false,
"text": "." "text": "."
}, },
{ {
"id": 49154, "id": 49154,
"logprob": -0.092285156, "logprob": -0.110839844,
"special": true, "special": true,
"text": "<end_of_utterance>" "text": "<end_of_utterance>"
} }

View File

@ -53,9 +53,9 @@ async def test_flash_gemma3_image_cow_dog(flash_gemma3, response_snapshot):
assert ( assert (
response.choices[0].message.content 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 assert response == response_snapshot
@ -76,9 +76,9 @@ async def test_flash_gemma3_image_cow(flash_gemma3, response_snapshot):
) )
assert ( assert (
response.choices[0].message.content 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 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, max_new_tokens=20,
) )
assert ( 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)}" ), f"{repr(response.generated_text)}"
assert response == response_snapshot assert response == response_snapshot