Skip to content

Commit 7e531f4

Browse files
authored
Update to Torch 2.7.0 (#3221)
* Update to Torch 2.7.0 * Try to fix typer/click issue * Pin click to fix incompatibility with typer * Fix some test outputs with slight deviations * Attempt again to sync with CI * Mamba too * Fixup mllama Also switch to `unsloth/Llama-3.2-11B-Vision-Instruct` for testing from the EU :).
1 parent 535ce23 commit 7e531f4

27 files changed

+875
-600
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ FROM nvidia/cuda:12.4.1-devel-ubuntu22.04 AS pytorch-install
4848
WORKDIR /usr/src/
4949

5050
# NOTE: When updating PyTorch version, beware to remove `pip install nvidia-nccl-cu12==2.22.3` below in the Dockerfile. Context: https://github.com/huggingface/text-generation-inference/pull/2099
51-
ARG PYTORCH_VERSION=2.6
51+
ARG PYTORCH_VERSION=2.7
5252
ARG PYTHON_VERSION=3.11
5353

5454
# Keep in sync with `server/pyproject.toml

flake.lock

Lines changed: 4 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
inputs.nixpkgs.follows = "tgi-nix/nixpkgs";
66
};
77
nix-filter.url = "github:numtide/nix-filter";
8-
tgi-nix.url = "github:huggingface/text-generation-inference-nix";
8+
tgi-nix.url = "github:huggingface/text-generation-inference-nix/torch-2.7";
99
nixpkgs.follows = "tgi-nix/nixpkgs";
1010
flake-utils.url = "github:numtide/flake-utils";
1111
rust-overlay = {

integration-tests/models/__snapshots__/test_flash_gemma3/test_flash_gemma3_image_base64_rgb_jpg.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,22 @@
55
"index": 0,
66
"logprobs": null,
77
"message": {
8-
"content": "Okay, let's analyze the image.\n\nThe image is a solid, bright white color. There is nothing else visible within it. \n\nIt's essentially a blank white canvas or a completely white square. \n\nIs there anything specific you'd like me to do with this image, such as describe it further or imagine what it might represent?",
8+
"content": "Okay, let's analyze the image.\n\nThe image is a solid, bright white color. There is nothing else visible within it. \n\nIt's essentially a blank white square or rectangle.",
99
"name": null,
1010
"role": "assistant",
1111
"tool_calls": null
1212
},
1313
"usage": null
1414
}
1515
],
16-
"created": 1741965894,
16+
"created": 1747062956,
1717
"id": "",
1818
"model": "google/gemma-3-4b-it",
1919
"object": "chat.completion",
20-
"system_fingerprint": "3.2.1-dev0-native",
20+
"system_fingerprint": "3.3.0-dev0-native",
2121
"usage": {
22-
"completion_tokens": 74,
22+
"completion_tokens": 42,
2323
"prompt_tokens": 277,
24-
"total_tokens": 351
24+
"total_tokens": 319
2525
}
2626
}
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
{
22
"choices": [
33
{
4-
"finish_reason": "length",
4+
"finish_reason": "stop",
55
"index": 0,
66
"logprobs": null,
77
"message": {
8-
"content": "Okay, let's analyze the image. \n\nThe image is entirely white, with a very subtle, faint outline of a stylized, cartoonish figure. It appears to be a simplified depiction of a person, likely a child, with a wide-eyed expression and a small, rounded body. \n\nIt's almost like a minimalist, iconic representation. \n\nDo you want me to try and describe it in more detail, or perhaps suggest what this image might represent (e.g",
8+
"content": "Okay, let's analyze the image. \n\nThe image is a very plain, solid white square. That's it! \n\nIt's essentially a blank canvas. \n\nDo you want me to describe it in more detail, or are you interested in something else regarding this image?",
99
"name": null,
1010
"role": "assistant",
1111
"tool_calls": null
1212
},
1313
"usage": null
1414
}
1515
],
16-
"created": 1744396706,
16+
"created": 1747062955,
1717
"id": "",
1818
"model": "google/gemma-3-4b-it",
1919
"object": "chat.completion",
2020
"system_fingerprint": "3.3.0-dev0-native",
2121
"usage": {
22-
"completion_tokens": 100,
22+
"completion_tokens": 62,
2323
"prompt_tokens": 277,
24-
"total_tokens": 377
24+
"total_tokens": 339
2525
}
2626
}

integration-tests/models/__snapshots__/test_flash_gemma3/test_flash_gemma3_image_base64_rgba.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,22 @@
55
"index": 0,
66
"logprobs": null,
77
"message": {
8-
"content": "Okay, let's analyze the image. \n\nThe transparent image reveals a stylized depiction of **a human head**. It's a minimalist, geometric representation, showing the basic shapes of the skull, eye sockets, and head outline. \n\nIf you'd like, you can give me more details about the image or ask me to focus on a specific aspect of it.",
8+
"content": "Okay, let's analyze the image. \n\nThe transparent image reveals a stylized depiction of **a human head**. It's a minimalist, geometric representation, showing the basic shapes of the skull, eye sockets, and head outline. \n\nDo you want me to describe any specific element of the image in more detail?",
99
"name": null,
1010
"role": "assistant",
1111
"tool_calls": null
1212
},
1313
"usage": null
1414
}
1515
],
16-
"created": 1744396703,
16+
"created": 1747062952,
1717
"id": "",
1818
"model": "google/gemma-3-4b-it",
1919
"object": "chat.completion",
2020
"system_fingerprint": "3.3.0-dev0-native",
2121
"usage": {
22-
"completion_tokens": 78,
22+
"completion_tokens": 67,
2323
"prompt_tokens": 277,
24-
"total_tokens": 355
24+
"total_tokens": 344
2525
}
2626
}

integration-tests/models/__snapshots__/test_flash_gemma3/test_flash_gemma3_image_cow.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,22 @@
55
"index": 0,
66
"logprobs": null,
77
"message": {
8-
"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 day at the beach!",
8+
"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!",
99
"name": null,
1010
"role": "assistant",
1111
"tool_calls": null
1212
},
1313
"usage": null
1414
}
1515
],
16-
"created": 1744396699,
16+
"created": 1747216083,
1717
"id": "",
1818
"model": "google/gemma-3-4b-it",
1919
"object": "chat.completion",
2020
"system_fingerprint": "3.3.0-dev0-native",
2121
"usage": {
22-
"completion_tokens": 74,
22+
"completion_tokens": 72,
2323
"prompt_tokens": 275,
24-
"total_tokens": 349
24+
"total_tokens": 347
2525
}
2626
}

integration-tests/models/__snapshots__/test_flash_gemma3/test_flash_gemma3_image_cow_dog.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,22 @@
55
"index": 0,
66
"logprobs": null,
77
"message": {
8-
"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 reddish-brown color and distinctive white markings. \n\nIf you'd like, you can send me another image and Ill do my best to identify it!",
8+
"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!",
99
"name": null,
1010
"role": "assistant",
1111
"tool_calls": null
1212
},
1313
"usage": null
1414
}
1515
],
16-
"created": 1744396697,
16+
"created": 1747216080,
1717
"id": "",
1818
"model": "google/gemma-3-4b-it",
1919
"object": "chat.completion",
2020
"system_fingerprint": "3.3.0-dev0-native",
2121
"usage": {
22-
"completion_tokens": 75,
22+
"completion_tokens": 80,
2323
"prompt_tokens": 279,
24-
"total_tokens": 354
24+
"total_tokens": 359
2525
}
2626
}

integration-tests/models/__snapshots__/test_flash_pali_gemma2/test_flash_pali_gemma_image.json

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -8,126 +8,126 @@
88
"tokens": [
99
{
1010
"id": 108,
11-
"logprob": -0.73046875,
11+
"logprob": -0.48046875,
1212
"special": false,
1313
"text": "\n"
1414
},
1515
{
1616
"id": 30234,
17-
"logprob": -2.328125,
17+
"logprob": -2.21875,
1818
"special": false,
1919
"text": "Brown"
2020
},
2121
{
2222
"id": 108,
23-
"logprob": -0.12060547,
23+
"logprob": -0.119140625,
2424
"special": false,
2525
"text": "\n"
2626
},
2727
{
2828
"id": 3726,
29-
"logprob": -1.7734375,
29+
"logprob": -1.703125,
3030
"special": false,
3131
"text": "Car"
3232
},
3333
{
3434
"id": 108,
35-
"logprob": -0.041503906,
35+
"logprob": -0.0390625,
3636
"special": false,
3737
"text": "\n"
3838
},
3939
{
4040
"id": 2915,
41-
"logprob": -1.796875,
41+
"logprob": -1.8203125,
4242
"special": false,
4343
"text": "Color"
4444
},
4545
{
4646
"id": 108,
47-
"logprob": -0.039794922,
47+
"logprob": -0.035888672,
4848
"special": false,
4949
"text": "\n"
5050
},
5151
{
5252
"id": 19178,
53-
"logprob": -1.96875,
53+
"logprob": -2.015625,
5454
"special": false,
5555
"text": "Cool"
5656
},
5757
{
5858
"id": 108,
59-
"logprob": -0.080566406,
59+
"logprob": -0.08105469,
6060
"special": false,
6161
"text": "\n"
6262
},
6363
{
6464
"id": 40544,
65-
"logprob": -2.1875,
65+
"logprob": -2.09375,
6666
"special": false,
6767
"text": "Decor"
6868
},
6969
{
7070
"id": 108,
71-
"logprob": -0.033935547,
71+
"logprob": -0.038330078,
7272
"special": false,
7373
"text": "\n"
7474
},
7575
{
76-
"id": 13936,
77-
"logprob": -1.6328125,
76+
"id": 108,
77+
"logprob": -1.515625,
7878
"special": false,
79-
"text": "Green"
79+
"text": "\n"
8080
},
8181
{
8282
"id": 108,
83-
"logprob": -0.16210938,
83+
"logprob": -1.8671875,
8484
"special": false,
8585
"text": "\n"
8686
},
8787
{
88-
"id": 955,
89-
"logprob": -2.015625,
88+
"id": 108,
89+
"logprob": -1.6328125,
9090
"special": false,
91-
"text": "..."
91+
"text": "\n"
9292
},
9393
{
9494
"id": 108,
95-
"logprob": -0.14746094,
95+
"logprob": -1.265625,
9696
"special": false,
9797
"text": "\n"
9898
},
9999
{
100-
"id": 955,
101-
"logprob": -0.73828125,
100+
"id": 108,
101+
"logprob": -1.0078125,
102102
"special": false,
103-
"text": "..."
103+
"text": "\n"
104104
},
105105
{
106106
"id": 108,
107-
"logprob": -0.051513672,
107+
"logprob": -1.03125,
108108
"special": false,
109109
"text": "\n"
110110
},
111111
{
112-
"id": 955,
113-
"logprob": -0.34765625,
112+
"id": 235336,
113+
"logprob": -1.2109375,
114114
"special": false,
115-
"text": "..."
115+
"text": "?"
116116
},
117117
{
118118
"id": 108,
119-
"logprob": -0.020141602,
119+
"logprob": -0.29101562,
120120
"special": false,
121121
"text": "\n"
122122
},
123123
{
124-
"id": 955,
125-
"logprob": -0.11767578,
124+
"id": 235336,
125+
"logprob": -0.08935547,
126126
"special": false,
127-
"text": "..."
127+
"text": "?"
128128
}
129129
],
130130
"top_tokens": null
131131
},
132-
"generated_text": "\nBrown\nCar\nColor\nCool\nDecor\nGreen\n...\n...\n...\n..."
132+
"generated_text": "\nBrown\nCar\nColor\nCool\nDecor\n\n\n\n\n\n\n?\n?"
133133
}

0 commit comments

Comments
 (0)