Instructions to use ariG23498/tiny-pali-gemma-test with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ariG23498/tiny-pali-gemma-test with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="ariG23498/tiny-pali-gemma-test")# Load model directly from transformers import AutoProcessor, AutoModelForImageTextToText processor = AutoProcessor.from_pretrained("ariG23498/tiny-pali-gemma-test") model = AutoModelForImageTextToText.from_pretrained("ariG23498/tiny-pali-gemma-test") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use ariG23498/tiny-pali-gemma-test with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ariG23498/tiny-pali-gemma-test" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ariG23498/tiny-pali-gemma-test", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/ariG23498/tiny-pali-gemma-test
- SGLang
How to use ariG23498/tiny-pali-gemma-test 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 "ariG23498/tiny-pali-gemma-test" \ --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": "ariG23498/tiny-pali-gemma-test", "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 "ariG23498/tiny-pali-gemma-test" \ --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": "ariG23498/tiny-pali-gemma-test", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use ariG23498/tiny-pali-gemma-test with Docker Model Runner:
docker model run hf.co/ariG23498/tiny-pali-gemma-test
Upload PaliGemmaForConditionalGeneration
Browse files- config.json +2 -2
- model-00001-of-00002.safetensors +1 -1
- model-00002-of-00002.safetensors +2 -2
- model.safetensors.index.json +1 -1
config.json
CHANGED
|
@@ -10,7 +10,7 @@
|
|
| 10 |
"image_token_index": 257152,
|
| 11 |
"model_type": "paligemma",
|
| 12 |
"pad_token_id": 0,
|
| 13 |
-
"projection_dim":
|
| 14 |
"text_config": {
|
| 15 |
"hidden_size": 32,
|
| 16 |
"intermediate_size": 32,
|
|
@@ -33,7 +33,7 @@
|
|
| 33 |
"num_hidden_layers": 1,
|
| 34 |
"num_image_tokens": 256,
|
| 35 |
"patch_size": 14,
|
| 36 |
-
"projection_dim":
|
| 37 |
"projector_hidden_act": "gelu_fast",
|
| 38 |
"vision_use_head": false
|
| 39 |
},
|
|
|
|
| 10 |
"image_token_index": 257152,
|
| 11 |
"model_type": "paligemma",
|
| 12 |
"pad_token_id": 0,
|
| 13 |
+
"projection_dim": 32,
|
| 14 |
"text_config": {
|
| 15 |
"hidden_size": 32,
|
| 16 |
"intermediate_size": 32,
|
|
|
|
| 33 |
"num_hidden_layers": 1,
|
| 34 |
"num_image_tokens": 256,
|
| 35 |
"patch_size": 14,
|
| 36 |
+
"projection_dim": 32,
|
| 37 |
"projector_hidden_act": "gelu_fast",
|
| 38 |
"vision_use_head": false
|
| 39 |
},
|
model-00001-of-00002.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 32923800
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:facb506651aab3a7f3a095a2c724c15fbeff8dfe4e594421db2f5b9ed53154e6
|
| 3 |
size 32923800
|
model-00002-of-00002.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:94927467303e1e2b226d54b4cbec0f95e95fe91da74bd1034b5e97aa79292f2c
|
| 3 |
+
size 744984
|
model.safetensors.index.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
{
|
| 2 |
"metadata": {
|
| 3 |
-
"total_size":
|
| 4 |
},
|
| 5 |
"weight_map": {
|
| 6 |
"language_model.model.embed_tokens.weight": "model-00001-of-00002.safetensors",
|
|
|
|
| 1 |
{
|
| 2 |
"metadata": {
|
| 3 |
+
"total_size": 33664640
|
| 4 |
},
|
| 5 |
"weight_map": {
|
| 6 |
"language_model.model.embed_tokens.weight": "model-00001-of-00002.safetensors",
|