2023-08-03 15:00:59 -06:00
|
|
|
backoff==2.2.1 ; python_version >= "3.9" and python_version < "3.13"
|
2024-02-16 09:50:57 -07:00
|
|
|
certifi==2024.2.2 ; python_version >= "3.9" and python_version < "3.13"
|
2023-11-23 05:38:50 -07:00
|
|
|
charset-normalizer==3.3.2 ; python_version >= "3.9" and python_version < "3.13"
|
2023-08-29 06:28:22 -06:00
|
|
|
click==8.1.7 ; python_version >= "3.9" and python_version < "3.13"
|
2023-08-03 15:00:59 -06:00
|
|
|
colorama==0.4.6 ; python_version >= "3.9" and python_version < "3.13" and (sys_platform == "win32" or platform_system == "Windows")
|
|
|
|
deprecated==1.2.14 ; python_version >= "3.9" and python_version < "3.13"
|
|
|
|
einops==0.6.1 ; python_version >= "3.9" and python_version < "3.13"
|
2024-04-30 10:15:35 -06:00
|
|
|
filelock==3.14.0 ; python_version >= "3.9" and python_version < "3.13"
|
|
|
|
fsspec==2024.3.1 ; python_version >= "3.9" and python_version < "3.13"
|
2024-03-22 10:59:25 -06:00
|
|
|
googleapis-common-protos==1.63.0 ; python_version >= "3.9" and python_version < "3.13"
|
2023-11-23 05:38:50 -07:00
|
|
|
grpc-interceptor==0.15.4 ; python_version >= "3.9" and python_version < "3.13"
|
2024-04-30 10:15:35 -06:00
|
|
|
grpcio-reflection==1.62.2 ; python_version >= "3.9" and python_version < "3.13"
|
|
|
|
grpcio-status==1.62.2 ; python_version >= "3.9" and python_version < "3.13"
|
2024-05-13 05:46:29 -06:00
|
|
|
grpcio==1.63.0 ; python_version >= "3.9" and python_version < "3.13"
|
2024-03-22 10:59:25 -06:00
|
|
|
hf-transfer==0.1.6 ; python_version >= "3.9" and python_version < "3.13"
|
Pali gemma modeling (#1895)
This PR adds paligemma modeling code
Blog post: https://huggingface.co/blog/paligemma
Transformers PR: https://github.com/huggingface/transformers/pull/30814
install the latest changes and run with
```bash
# get the weights
# text-generation-server download-weights gv-hf/PaliGemma-base-224px-hf
# run TGI
text-generation-launcher --model-id gv-hf/PaliGemma-base-224px-hf
```
basic example sending various requests
```python
from huggingface_hub import InferenceClient
client = InferenceClient("http://127.0.0.1:3000")
images = [
"https://huggingface.co/datasets/hf-internal-testing/fixtures-captioning/resolve/main/cow_beach_1.png",
"https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/rabbit.png",
]
prompts = [
"What animal is in this image?",
"Name three colors in this image.",
"What are 10 colors in this image?",
"Where is the cow standing?",
"answer en Where is the cow standing?",
"Is there a bird in the image?",
"Is ther a cow in the image?",
"Is there a rabbit in the image?",
"how many birds are in the image?",
"how many rabbits are in the image?",
]
for img in images:
print(f"\nImage: {img.split('/')[-1]}")
for prompt in prompts:
inputs = f"![]({img}){prompt}\n"
json_data = {
"inputs": inputs,
"parameters": {
"max_new_tokens": 30,
"do_sample": False,
},
}
generated_output = client.text_generation(prompt, max_new_tokens=30, stream=False)
print([f"{prompt}\n{generated_output}"])
```
---------
Co-authored-by: Nicolas Patry <patry.nicolas@protonmail.com>
2024-05-15 22:58:47 -06:00
|
|
|
huggingface-hub==0.23.0 ; python_version >= "3.9" and python_version < "3.13"
|
2024-04-18 09:17:40 -06:00
|
|
|
idna==3.7 ; python_version >= "3.9" and python_version < "3.13"
|
2023-08-03 15:00:59 -06:00
|
|
|
loguru==0.6.0 ; python_version >= "3.9" and python_version < "3.13"
|
2024-02-16 09:50:57 -07:00
|
|
|
numpy==1.26.4 ; python_version >= "3.9" and python_version < "3.13"
|
2023-08-03 15:00:59 -06:00
|
|
|
opentelemetry-api==1.15.0 ; python_version >= "3.9" and python_version < "3.13"
|
|
|
|
opentelemetry-exporter-otlp-proto-grpc==1.15.0 ; python_version >= "3.9" and python_version < "3.13"
|
|
|
|
opentelemetry-exporter-otlp-proto-http==1.15.0 ; python_version >= "3.9" and python_version < "3.13"
|
|
|
|
opentelemetry-exporter-otlp==1.15.0 ; python_version >= "3.9" and python_version < "3.13"
|
|
|
|
opentelemetry-instrumentation-grpc==0.36b0 ; python_version >= "3.9" and python_version < "3.13"
|
|
|
|
opentelemetry-instrumentation==0.36b0 ; python_version >= "3.9" and python_version < "3.13"
|
|
|
|
opentelemetry-proto==1.15.0 ; python_version >= "3.9" and python_version < "3.13"
|
|
|
|
opentelemetry-sdk==1.15.0 ; python_version >= "3.9" and python_version < "3.13"
|
|
|
|
opentelemetry-semantic-conventions==0.36b0 ; python_version >= "3.9" and python_version < "3.13"
|
2024-03-22 10:59:25 -06:00
|
|
|
packaging==24.0 ; python_version >= "3.9" and python_version < "3.13"
|
2024-04-11 02:37:35 -06:00
|
|
|
pillow==10.3.0 ; python_version >= "3.9" and python_version < "3.13"
|
2024-04-30 10:15:35 -06:00
|
|
|
prometheus-client==0.20.0 ; python_version >= "3.9" and python_version < "3.13"
|
2024-02-16 09:50:57 -07:00
|
|
|
protobuf==4.25.3 ; python_version >= "3.9" and python_version < "3.13"
|
2024-04-30 10:15:35 -06:00
|
|
|
py-cpuinfo==9.0.0 ; python_version >= "3.9" and python_version < "3.13"
|
2023-08-03 15:00:59 -06:00
|
|
|
pyyaml==6.0.1 ; python_version >= "3.9" and python_version < "3.13"
|
2024-05-13 05:46:29 -06:00
|
|
|
regex==2024.5.10 ; python_version >= "3.9" and python_version < "3.13"
|
2023-08-03 15:00:59 -06:00
|
|
|
requests==2.31.0 ; python_version >= "3.9" and python_version < "3.13"
|
2024-04-18 09:17:40 -06:00
|
|
|
safetensors==0.4.3 ; python_version >= "3.9" and python_version < "3.13"
|
2024-04-11 02:37:35 -06:00
|
|
|
scipy==1.13.0 ; python_version >= "3.9" and python_version < "3.13"
|
2023-08-03 15:00:59 -06:00
|
|
|
sentencepiece==0.1.99 ; python_version >= "3.9" and python_version < "3.13"
|
2024-04-18 09:17:40 -06:00
|
|
|
setuptools==69.5.1 ; python_version >= "3.9" and python_version < "3.13"
|
|
|
|
tokenizers==0.19.1 ; python_version >= "3.9" and python_version < "3.13"
|
2024-05-13 05:46:29 -06:00
|
|
|
tqdm==4.66.4 ; python_version >= "3.9" and python_version < "3.13"
|
Pali gemma modeling (#1895)
This PR adds paligemma modeling code
Blog post: https://huggingface.co/blog/paligemma
Transformers PR: https://github.com/huggingface/transformers/pull/30814
install the latest changes and run with
```bash
# get the weights
# text-generation-server download-weights gv-hf/PaliGemma-base-224px-hf
# run TGI
text-generation-launcher --model-id gv-hf/PaliGemma-base-224px-hf
```
basic example sending various requests
```python
from huggingface_hub import InferenceClient
client = InferenceClient("http://127.0.0.1:3000")
images = [
"https://huggingface.co/datasets/hf-internal-testing/fixtures-captioning/resolve/main/cow_beach_1.png",
"https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/rabbit.png",
]
prompts = [
"What animal is in this image?",
"Name three colors in this image.",
"What are 10 colors in this image?",
"Where is the cow standing?",
"answer en Where is the cow standing?",
"Is there a bird in the image?",
"Is ther a cow in the image?",
"Is there a rabbit in the image?",
"how many birds are in the image?",
"how many rabbits are in the image?",
]
for img in images:
print(f"\nImage: {img.split('/')[-1]}")
for prompt in prompts:
inputs = f"![]({img}){prompt}\n"
json_data = {
"inputs": inputs,
"parameters": {
"max_new_tokens": 30,
"do_sample": False,
},
}
generated_output = client.text_generation(prompt, max_new_tokens=30, stream=False)
print([f"{prompt}\n{generated_output}"])
```
---------
Co-authored-by: Nicolas Patry <patry.nicolas@protonmail.com>
2024-05-15 22:58:47 -06:00
|
|
|
transformers @ git+https://github.com/huggingface/transformers.git@b8aee2e918d7ba2d5e9e80162ae26b4806873307 ; python_version >= "3.9" and python_version < "3.13"
|
2023-08-03 15:00:59 -06:00
|
|
|
typer==0.6.1 ; python_version >= "3.9" and python_version < "3.13"
|
2024-04-11 02:37:35 -06:00
|
|
|
typing-extensions==4.11.0 ; python_version >= "3.9" and python_version < "3.13"
|
2024-03-22 10:59:25 -06:00
|
|
|
urllib3==2.2.1 ; python_version >= "3.9" and python_version < "3.13"
|
2023-08-03 15:00:59 -06:00
|
|
|
win32-setctime==1.1.0 ; python_version >= "3.9" and python_version < "3.13" and sys_platform == "win32"
|
2023-11-23 05:38:50 -07:00
|
|
|
wrapt==1.16.0 ; python_version >= "3.9" and python_version < "3.13"
|