From efd7cec4a3af8a52f17199c107022f7ffd147a6c Mon Sep 17 00:00:00 2001 From: Nicolas Patry Date: Sat, 7 Sep 2024 11:39:18 +0200 Subject: [PATCH] Adding numpy to diff. --- ..._llama_completion_many_prompts_stream.json | 264 +++++++++--------- integration-tests/pyproject.toml | 2 +- integration-tests/requirements.txt | 68 ++--- 3 files changed, 167 insertions(+), 167 deletions(-) diff --git a/integration-tests/models/__snapshots__/test_completion_prompts/test_flash_llama_completion_many_prompts_stream.json b/integration-tests/models/__snapshots__/test_completion_prompts/test_flash_llama_completion_many_prompts_stream.json index e7fb5740..b8104471 100644 --- a/integration-tests/models/__snapshots__/test_completion_prompts/test_flash_llama_completion_many_prompts_stream.json +++ b/integration-tests/models/__snapshots__/test_completion_prompts/test_flash_llama_completion_many_prompts_stream.json @@ -8,7 +8,7 @@ "text": "\n" } ], - "created": 1724833943, + "created": 1725701598, "id": "", "model": "TinyLlama/TinyLlama-1.1B-Chat-v1.0", "object": "text_completion", @@ -23,7 +23,7 @@ "text": "\n" } ], - "created": 1724833943, + "created": 1725701598, "id": "", "model": "TinyLlama/TinyLlama-1.1B-Chat-v1.0", "object": "text_completion", @@ -38,7 +38,7 @@ "text": "\n" } ], - "created": 1724833943, + "created": 1725701598, "id": "", "model": "TinyLlama/TinyLlama-1.1B-Chat-v1.0", "object": "text_completion", @@ -53,7 +53,7 @@ "text": "hd" } ], - "created": 1724833943, + "created": 1725701598, "id": "", "model": "TinyLlama/TinyLlama-1.1B-Chat-v1.0", "object": "text_completion", @@ -68,7 +68,7 @@ "text": "\n" } ], - "created": 1724833943, + "created": 1725701598, "id": "", "model": "TinyLlama/TinyLlama-1.1B-Chat-v1.0", "object": "text_completion", @@ -83,7 +83,7 @@ "text": "\n" } ], - "created": 1724833943, + "created": 1725701598, "id": "", "model": "TinyLlama/TinyLlama-1.1B-Chat-v1.0", "object": "text_completion", @@ -95,10 +95,10 @@ "finish_reason": "", "index": 2, "logprobs": null, - "text": "\n" + "text": "hd" } ], - "created": 1724833943, + "created": 1725701598, "id": "", "model": "TinyLlama/TinyLlama-1.1B-Chat-v1.0", "object": "text_completion", @@ -110,10 +110,10 @@ "finish_reason": "", "index": 3, "logprobs": null, - "text": "aho" + "text": "hd" } ], - "created": 1724833943, + "created": 1725701598, "id": "", "model": "TinyLlama/TinyLlama-1.1B-Chat-v1.0", "object": "text_completion", @@ -128,7 +128,7 @@ "text": "2" } ], - "created": 1724833943, + "created": 1725701598, "id": "", "model": "TinyLlama/TinyLlama-1.1B-Chat-v1.0", "object": "text_completion", @@ -143,7 +143,7 @@ "text": "2" } ], - "created": 1724833943, + "created": 1725701598, "id": "", "model": "TinyLlama/TinyLlama-1.1B-Chat-v1.0", "object": "text_completion", @@ -155,25 +155,25 @@ "finish_reason": "", "index": 2, "logprobs": null, + "text": " Business" + } + ], + "created": 1725701598, + "id": "", + "model": "TinyLlama/TinyLlama-1.1B-Chat-v1.0", + "object": "text_completion", + "system_fingerprint": "2.2.1-dev0-native" + }, + { + "choices": [ + { + "finish_reason": "", + "index": 3, + "logprobs": null, "text": "2" } ], - "created": 1724833943, - "id": "", - "model": "TinyLlama/TinyLlama-1.1B-Chat-v1.0", - "object": "text_completion", - "system_fingerprint": "2.2.1-dev0-native" - }, - { - "choices": [ - { - "finish_reason": "", - "index": 3, - "logprobs": null, - "text": "ima" - } - ], - "created": 1724833943, + "created": 1725701598, "id": "", "model": "TinyLlama/TinyLlama-1.1B-Chat-v1.0", "object": "text_completion", @@ -185,10 +185,10 @@ "finish_reason": "", "index": 0, "logprobs": null, - "text": "." + "text": " Given" } ], - "created": 1724833943, + "created": 1725701598, "id": "", "model": "TinyLlama/TinyLlama-1.1B-Chat-v1.0", "object": "text_completion", @@ -203,7 +203,7 @@ "text": "." } ], - "created": 1724833943, + "created": 1725701598, "id": "", "model": "TinyLlama/TinyLlama-1.1B-Chat-v1.0", "object": "text_completion", @@ -215,10 +215,10 @@ "finish_reason": "", "index": 2, "logprobs": null, - "text": "." + "text": " up" } ], - "created": 1724833943, + "created": 1725701598, "id": "", "model": "TinyLlama/TinyLlama-1.1B-Chat-v1.0", "object": "text_completion", @@ -230,10 +230,10 @@ "finish_reason": "", "index": 3, "logprobs": null, - "text": "\n" + "text": " si" } ], - "created": 1724833943, + "created": 1725701598, "id": "", "model": "TinyLlama/TinyLlama-1.1B-Chat-v1.0", "object": "text_completion", @@ -245,10 +245,10 @@ "finish_reason": "", "index": 0, "logprobs": null, - "text": " Sarah" + "text": " the" } ], - "created": 1724833943, + "created": 1725701598, "id": "", "model": "TinyLlama/TinyLlama-1.1B-Chat-v1.0", "object": "text_completion", @@ -260,10 +260,10 @@ "finish_reason": "", "index": 1, "logprobs": null, - "text": " Yes" + "text": " Is" } ], - "created": 1724833943, + "created": 1725701598, "id": "", "model": "TinyLlama/TinyLlama-1.1B-Chat-v1.0", "object": "text_completion", @@ -275,70 +275,10 @@ "finish_reason": "", "index": 2, "logprobs": null, - "text": " And" - } - ], - "created": 1724833943, - "id": "", - "model": "TinyLlama/TinyLlama-1.1B-Chat-v1.0", - "object": "text_completion", - "system_fingerprint": "2.2.1-dev0-native" - }, - { - "choices": [ - { - "finish_reason": "", - "index": 3, - "logprobs": null, "text": "i" } ], - "created": 1724833943, - "id": "", - "model": "TinyLlama/TinyLlama-1.1B-Chat-v1.0", - "object": "text_completion", - "system_fingerprint": "2.2.1-dev0-native" - }, - { - "choices": [ - { - "finish_reason": "", - "index": 0, - "logprobs": null, - "text": "'" - } - ], - "created": 1724833943, - "id": "", - "model": "TinyLlama/TinyLlama-1.1B-Chat-v1.0", - "object": "text_completion", - "system_fingerprint": "2.2.1-dev0-native" - }, - { - "choices": [ - { - "finish_reason": "", - "index": 1, - "logprobs": null, - "text": "," - } - ], - "created": 1724833943, - "id": "", - "model": "TinyLlama/TinyLlama-1.1B-Chat-v1.0", - "object": "text_completion", - "system_fingerprint": "2.2.1-dev0-native" - }, - { - "choices": [ - { - "finish_reason": "", - "index": 2, - "logprobs": null, - "text": " what" - } - ], - "created": 1724833943, + "created": 1725701598, "id": "", "model": "TinyLlama/TinyLlama-1.1B-Chat-v1.0", "object": "text_completion", @@ -350,10 +290,10 @@ "finish_reason": "", "index": 3, "logprobs": null, - "text": "'" + "text": "ri" } ], - "created": 1724833943, + "created": 1725701598, "id": "", "model": "TinyLlama/TinyLlama-1.1B-Chat-v1.0", "object": "text_completion", @@ -365,10 +305,70 @@ "finish_reason": "", "index": 0, "logprobs": null, - "text": "s" + "text": " sun" } ], - "created": 1724833943, + "created": 1725701598, + "id": "", + "model": "TinyLlama/TinyLlama-1.1B-Chat-v1.0", + "object": "text_completion", + "system_fingerprint": "2.2.1-dev0-native" + }, + { + "choices": [ + { + "finish_reason": "", + "index": 1, + "logprobs": null, + "text": " sugar" + } + ], + "created": 1725701598, + "id": "", + "model": "TinyLlama/TinyLlama-1.1B-Chat-v1.0", + "object": "text_completion", + "system_fingerprint": "2.2.1-dev0-native" + }, + { + "choices": [ + { + "finish_reason": "", + "index": 2, + "logprobs": null, + "text": "2" + } + ], + "created": 1725701598, + "id": "", + "model": "TinyLlama/TinyLlama-1.1B-Chat-v1.0", + "object": "text_completion", + "system_fingerprint": "2.2.1-dev0-native" + }, + { + "choices": [ + { + "finish_reason": "", + "index": 3, + "logprobs": null, + "text": " away" + } + ], + "created": 1725701598, + "id": "", + "model": "TinyLlama/TinyLlama-1.1B-Chat-v1.0", + "object": "text_completion", + "system_fingerprint": "2.2.1-dev0-native" + }, + { + "choices": [ + { + "finish_reason": "", + "index": 0, + "logprobs": null, + "text": "ny" + } + ], + "created": 1725701598, "id": "", "model": "TinyLlama/TinyLlama-1.1B-Chat-v1.0", "object": "text_completion", @@ -383,7 +383,7 @@ "text": " Moh" } ], - "created": 1724833943, + "created": 1725701598, "id": "", "model": "TinyLlama/TinyLlama-1.1B-Chat-v1.0", "object": "text_completion", @@ -395,10 +395,10 @@ "finish_reason": "", "index": 2, "logprobs": null, - "text": " is" + "text": "7" } ], - "created": 1724833943, + "created": 1725701598, "id": "", "model": "TinyLlama/TinyLlama-1.1B-Chat-v1.0", "object": "text_completion", @@ -410,10 +410,10 @@ "finish_reason": "", "index": 3, "logprobs": null, - "text": "m" + "text": "2" } ], - "created": 1724833943, + "created": 1725701598, "id": "", "model": "TinyLlama/TinyLlama-1.1B-Chat-v1.0", "object": "text_completion", @@ -425,10 +425,10 @@ "finish_reason": "", "index": 0, "logprobs": null, - "text": " Room" + "text": "?" } ], - "created": 1724833943, + "created": 1725701598, "id": "", "model": "TinyLlama/TinyLlama-1.1B-Chat-v1.0", "object": "text_completion", @@ -443,7 +443,7 @@ "text": "s" } ], - "created": 1724833943, + "created": 1725701598, "id": "", "model": "TinyLlama/TinyLlama-1.1B-Chat-v1.0", "object": "text_completion", @@ -455,10 +455,10 @@ "finish_reason": "", "index": 2, "logprobs": null, - "text": " the" + "text": "s" } ], - "created": 1724833943, + "created": 1725701598, "id": "", "model": "TinyLlama/TinyLlama-1.1B-Chat-v1.0", "object": "text_completion", @@ -470,10 +470,10 @@ "finish_reason": "", "index": 3, "logprobs": null, - "text": " tired" + "text": " has" } ], - "created": 1724833943, + "created": 1725701598, "id": "", "model": "TinyLlama/TinyLlama-1.1B-Chat-v1.0", "object": "text_completion", @@ -485,10 +485,10 @@ "finish_reason": "", "index": 0, "logprobs": null, - "text": ":" + "text": " a" } ], - "created": 1724833943, + "created": 1725701598, "id": "", "model": "TinyLlama/TinyLlama-1.1B-Chat-v1.0", "object": "text_completion", @@ -500,10 +500,10 @@ "finish_reason": "", "index": 1, "logprobs": null, - "text": "'" + "text": "?" } ], - "created": 1724833943, + "created": 1725701598, "id": "", "model": "TinyLlama/TinyLlama-1.1B-Chat-v1.0", "object": "text_completion", @@ -515,10 +515,10 @@ "finish_reason": "", "index": 2, "logprobs": null, - "text": " capital" + "text": " a" } ], - "created": 1724833943, + "created": 1725701598, "id": "", "model": "TinyLlama/TinyLlama-1.1B-Chat-v1.0", "object": "text_completion", @@ -530,10 +530,10 @@ "finish_reason": "", "index": 3, "logprobs": null, - "text": "," + "text": " a" } ], - "created": 1724833943, + "created": 1725701598, "id": "", "model": "TinyLlama/TinyLlama-1.1B-Chat-v1.0", "object": "text_completion", @@ -545,10 +545,10 @@ "finish_reason": "length", "index": 0, "logprobs": null, - "text": " She" + "text": " sc" } ], - "created": 1724833943, + "created": 1725701598, "id": "", "model": "TinyLlama/TinyLlama-1.1B-Chat-v1.0", "object": "text_completion", @@ -560,10 +560,10 @@ "finish_reason": "length", "index": 1, "logprobs": null, - "text": " scale" + "text": " Is" } ], - "created": 1724833943, + "created": 1725701598, "id": "", "model": "TinyLlama/TinyLlama-1.1B-Chat-v1.0", "object": "text_completion", @@ -575,10 +575,10 @@ "finish_reason": "length", "index": 2, "logprobs": null, - "text": " of" + "text": " sc" } ], - "created": 1724833943, + "created": 1725701598, "id": "", "model": "TinyLlama/TinyLlama-1.1B-Chat-v1.0", "object": "text_completion", @@ -590,10 +590,10 @@ "finish_reason": "length", "index": 3, "logprobs": null, - "text": " its" + "text": " sc" } ], - "created": 1724833943, + "created": 1725701598, "id": "", "model": "TinyLlama/TinyLlama-1.1B-Chat-v1.0", "object": "text_completion", diff --git a/integration-tests/pyproject.toml b/integration-tests/pyproject.toml index 123c1167..bc3529fe 100644 --- a/integration-tests/pyproject.toml +++ b/integration-tests/pyproject.toml @@ -6,7 +6,7 @@ authors = ["Nicolas Patry "] [tool.poetry.dependencies] pydantic = "> 2, < 3" -python = ">=3.9,<3.13" +python = ">=3.10,<3.13" syrupy = "^4.7.1" text-generation = "^0.6.0" pytest = "^7.4.0" diff --git a/integration-tests/requirements.txt b/integration-tests/requirements.txt index f3f0569b..ba1c2433 100644 --- a/integration-tests/requirements.txt +++ b/integration-tests/requirements.txt @@ -1,34 +1,34 @@ -aiohttp==3.8.5 ; python_version >= "3.9" and python_version < "3.13" -aiosignal==1.3.1 ; python_version >= "3.9" and python_version < "3.13" -annotated-types==0.6.0 ; python_version >= "3.9" and python_version < "3.13" -async-timeout==4.0.3 ; python_version >= "3.9" and python_version < "3.13" -attrs==23.1.0 ; python_version >= "3.9" and python_version < "3.13" -certifi==2023.7.22 ; python_version >= "3.9" and python_version < "3.13" -charset-normalizer==3.2.0 ; python_version >= "3.9" and python_version < "3.13" -colorama==0.4.6 ; python_version >= "3.9" and python_version < "3.13" and (sys_platform == "win32" or platform_system == "Windows") -docker==6.1.3 ; python_version >= "3.9" and python_version < "3.13" -exceptiongroup==1.1.3 ; python_version >= "3.9" and python_version < "3.11" -filelock==3.12.3 ; python_version >= "3.9" and python_version < "3.13" -frozenlist==1.4.0 ; python_version >= "3.9" and python_version < "3.13" -fsspec==2023.6.0 ; python_version >= "3.9" and python_version < "3.13" -huggingface-hub==0.16.4 ; python_version >= "3.9" and python_version < "3.13" -idna==3.4 ; python_version >= "3.9" and python_version < "3.13" -iniconfig==2.0.0 ; python_version >= "3.9" and python_version < "3.13" -multidict==6.0.4 ; python_version >= "3.9" and python_version < "3.13" -packaging==23.1 ; python_version >= "3.9" and python_version < "3.13" -pluggy==1.3.0 ; python_version >= "3.9" and python_version < "3.13" -pydantic-core==2.16.3 ; python_version >= "3.9" and python_version < "3.13" -pydantic==2.6.4 ; python_version >= "3.9" and python_version < "3.13" -pytest-asyncio==0.21.1 ; python_version >= "3.9" and python_version < "3.13" -pytest==7.4.0 ; python_version >= "3.9" and python_version < "3.13" -pywin32==306 ; python_version >= "3.9" and python_version < "3.13" and sys_platform == "win32" -pyyaml==6.0.1 ; python_version >= "3.9" and python_version < "3.13" -requests==2.31.0 ; python_version >= "3.9" and python_version < "3.13" -syrupy==4.7.1 ; python_version >= "3.9" and python_version < "3.13" -text-generation==0.6.1 ; python_version >= "3.9" and python_version < "3.13" -tomli==2.0.1 ; python_version >= "3.9" and python_version < "3.11" -tqdm==4.66.1 ; python_version >= "3.9" and python_version < "3.13" -typing-extensions==4.7.1 ; python_version >= "3.9" and python_version < "3.13" -urllib3==2.0.4 ; python_version >= "3.9" and python_version < "3.13" -websocket-client==1.6.2 ; python_version >= "3.9" and python_version < "3.13" -yarl==1.9.2 ; python_version >= "3.9" and python_version < "3.13" +aiohttp==3.8.5 ; python_version >= "3.10" and python_version < "3.13" +aiosignal==1.3.1 ; python_version >= "3.10" and python_version < "3.13" +annotated-types==0.6.0 ; python_version >= "3.10" and python_version < "3.13" +async-timeout==4.0.3 ; python_version >= "3.10" and python_version < "3.13" +attrs==23.1.0 ; python_version >= "3.10" and python_version < "3.13" +certifi==2023.7.22 ; python_version >= "3.10" and python_version < "3.13" +charset-normalizer==3.2.0 ; python_version >= "3.10" and python_version < "3.13" +colorama==0.4.6 ; python_version >= "3.10" and python_version < "3.13" and (sys_platform == "win32" or platform_system == "Windows") +docker==6.1.3 ; python_version >= "3.10" and python_version < "3.13" +exceptiongroup==1.1.3 ; python_version >= "3.10" and python_version < "3.11" +filelock==3.12.3 ; python_version >= "3.10" and python_version < "3.13" +frozenlist==1.4.0 ; python_version >= "3.10" and python_version < "3.13" +fsspec==2023.6.0 ; python_version >= "3.10" and python_version < "3.13" +huggingface-hub==0.16.4 ; python_version >= "3.10" and python_version < "3.13" +idna==3.4 ; python_version >= "3.10" and python_version < "3.13" +iniconfig==2.0.0 ; python_version >= "3.10" and python_version < "3.13" +multidict==6.0.4 ; python_version >= "3.10" and python_version < "3.13" +packaging==23.1 ; python_version >= "3.10" and python_version < "3.13" +pluggy==1.3.0 ; python_version >= "3.10" and python_version < "3.13" +pydantic-core==2.16.3 ; python_version >= "3.10" and python_version < "3.13" +pydantic==2.6.4 ; python_version >= "3.10" and python_version < "3.13" +pytest-asyncio==0.21.1 ; python_version >= "3.10" and python_version < "3.13" +pytest==7.4.0 ; python_version >= "3.10" and python_version < "3.13" +pywin32==306 ; python_version >= "3.10" and python_version < "3.13" and sys_platform == "win32" +pyyaml==6.0.1 ; python_version >= "3.10" and python_version < "3.13" +requests==2.31.0 ; python_version >= "3.10" and python_version < "3.13" +syrupy==4.7.1 ; python_version >= "3.10" and python_version < "3.13" +text-generation==0.6.1 ; python_version >= "3.10" and python_version < "3.13" +tomli==2.0.1 ; python_version >= "3.10" and python_version < "3.11" +tqdm==4.66.1 ; python_version >= "3.10" and python_version < "3.13" +typing-extensions==4.7.1 ; python_version >= "3.10" and python_version < "3.13" +urllib3==2.0.4 ; python_version >= "3.10" and python_version < "3.13" +websocket-client==1.6.2 ; python_version >= "3.10" and python_version < "3.13" +yarl==1.9.2 ; python_version >= "3.10" and python_version < "3.13"