Instructions to use learn2024/image_label_extraction with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use learn2024/image_label_extraction with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="learn2024/image_label_extraction")# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("learn2024/image_label_extraction") model = AutoModelForMultimodalLM.from_pretrained("learn2024/image_label_extraction") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use learn2024/image_label_extraction with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "learn2024/image_label_extraction" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "learn2024/image_label_extraction", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/learn2024/image_label_extraction
- SGLang
How to use learn2024/image_label_extraction with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "learn2024/image_label_extraction" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "learn2024/image_label_extraction", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "learn2024/image_label_extraction" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "learn2024/image_label_extraction", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use learn2024/image_label_extraction with Docker Model Runner:
docker model run hf.co/learn2024/image_label_extraction
Upload PaliGemmaForConditionalGeneration
Browse files- config.json +2 -2
- model-00001-of-00002.safetensors +3 -0
- model-00002-of-00002.safetensors +3 -0
- model.safetensors.index.json +0 -0
config.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
{
|
| 2 |
-
"_name_or_path": "/
|
| 3 |
"architectures": [
|
| 4 |
"PaliGemmaForConditionalGeneration"
|
| 5 |
],
|
|
@@ -22,7 +22,7 @@
|
|
| 22 |
"torch_dtype": "float32",
|
| 23 |
"vocab_size": 257216
|
| 24 |
},
|
| 25 |
-
"torch_dtype": "
|
| 26 |
"transformers_version": "4.42.4",
|
| 27 |
"vision_config": {
|
| 28 |
"hidden_size": 1152,
|
|
|
|
| 1 |
{
|
| 2 |
+
"_name_or_path": "google/paligemma-3b-pt-224",
|
| 3 |
"architectures": [
|
| 4 |
"PaliGemmaForConditionalGeneration"
|
| 5 |
],
|
|
|
|
| 22 |
"torch_dtype": "float32",
|
| 23 |
"vocab_size": 257216
|
| 24 |
},
|
| 25 |
+
"torch_dtype": "bfloat16",
|
| 26 |
"transformers_version": "4.42.4",
|
| 27 |
"vision_config": {
|
| 28 |
"hidden_size": 1152,
|
model-00001-of-00002.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:cf623089a7e583817a58037f519e3a8f953069dcd6e70bc04dac1eaed46f94c3
|
| 3 |
+
size 4985044392
|
model-00002-of-00002.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:33d81e32ce9c1a53b47513de112fdc215420f695d131c31920e2cbc6ba62e159
|
| 3 |
+
size 861970608
|
model.safetensors.index.json
CHANGED
|
The diff for this file is too large to render.
See raw diff
|
|
|