Instructions to use Techno03/gta-captioner with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Techno03/gta-captioner with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="Techno03/gta-captioner")# Load model directly from transformers import AutoProcessor, AutoModelForImageTextToText processor = AutoProcessor.from_pretrained("Techno03/gta-captioner") model = AutoModelForImageTextToText.from_pretrained("Techno03/gta-captioner") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Techno03/gta-captioner with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Techno03/gta-captioner" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Techno03/gta-captioner", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Techno03/gta-captioner
- SGLang
How to use Techno03/gta-captioner 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 "Techno03/gta-captioner" \ --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": "Techno03/gta-captioner", "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 "Techno03/gta-captioner" \ --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": "Techno03/gta-captioner", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Techno03/gta-captioner with Docker Model Runner:
docker model run hf.co/Techno03/gta-captioner
Upload folder using huggingface_hub
Browse files- config.json +6 -6
- generation_config.json +1 -1
- model.safetensors +2 -2
config.json
CHANGED
|
@@ -21,23 +21,23 @@
|
|
| 21 |
"position_embedding_type": "absolute",
|
| 22 |
"tie_word_embeddings": false,
|
| 23 |
"torch_dtype": "float32",
|
| 24 |
-
"transformers_version": "4.
|
| 25 |
"use_cache": true,
|
| 26 |
"vision_config": {
|
| 27 |
"attention_dropout": 0.0,
|
| 28 |
"dropout": 0.0,
|
| 29 |
"hidden_act": "quick_gelu",
|
| 30 |
-
"hidden_size":
|
| 31 |
"image_size": 224,
|
| 32 |
"initializer_factor": 1.0,
|
| 33 |
"initializer_range": 0.02,
|
| 34 |
-
"intermediate_size":
|
| 35 |
"layer_norm_eps": 1e-05,
|
| 36 |
"model_type": "git_vision_model",
|
| 37 |
-
"num_attention_heads":
|
| 38 |
"num_channels": 3,
|
| 39 |
-
"num_hidden_layers":
|
| 40 |
-
"patch_size":
|
| 41 |
"projection_dim": 512,
|
| 42 |
"torch_dtype": "float32"
|
| 43 |
},
|
|
|
|
| 21 |
"position_embedding_type": "absolute",
|
| 22 |
"tie_word_embeddings": false,
|
| 23 |
"torch_dtype": "float32",
|
| 24 |
+
"transformers_version": "4.55.0",
|
| 25 |
"use_cache": true,
|
| 26 |
"vision_config": {
|
| 27 |
"attention_dropout": 0.0,
|
| 28 |
"dropout": 0.0,
|
| 29 |
"hidden_act": "quick_gelu",
|
| 30 |
+
"hidden_size": 1024,
|
| 31 |
"image_size": 224,
|
| 32 |
"initializer_factor": 1.0,
|
| 33 |
"initializer_range": 0.02,
|
| 34 |
+
"intermediate_size": 4096,
|
| 35 |
"layer_norm_eps": 1e-05,
|
| 36 |
"model_type": "git_vision_model",
|
| 37 |
+
"num_attention_heads": 16,
|
| 38 |
"num_channels": 3,
|
| 39 |
+
"num_hidden_layers": 24,
|
| 40 |
+
"patch_size": 14,
|
| 41 |
"projection_dim": 512,
|
| 42 |
"torch_dtype": "float32"
|
| 43 |
},
|
generation_config.json
CHANGED
|
@@ -3,5 +3,5 @@
|
|
| 3 |
"bos_token_id": 101,
|
| 4 |
"eos_token_id": 102,
|
| 5 |
"pad_token_id": 0,
|
| 6 |
-
"transformers_version": "4.
|
| 7 |
}
|
|
|
|
| 3 |
"bos_token_id": 101,
|
| 4 |
"eos_token_id": 102,
|
| 5 |
"pad_token_id": 0,
|
| 6 |
+
"transformers_version": "4.55.0"
|
| 7 |
}
|
model.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:b44f57e571da1d8edad3163d3e400789f0243b3af7b69ca26d3d90662259c372
|
| 3 |
+
size 1576851440
|