Instructions to use cheenmaya/gt3 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use cheenmaya/gt3 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="cheenmaya/gt3", trust_remote_code=True)# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("cheenmaya/gt3", trust_remote_code=True) model = AutoModelForMultimodalLM.from_pretrained("cheenmaya/gt3", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use cheenmaya/gt3 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "cheenmaya/gt3" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "cheenmaya/gt3", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/cheenmaya/gt3
- SGLang
How to use cheenmaya/gt3 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 "cheenmaya/gt3" \ --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": "cheenmaya/gt3", "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 "cheenmaya/gt3" \ --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": "cheenmaya/gt3", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use cheenmaya/gt3 with Docker Model Runner:
docker model run hf.co/cheenmaya/gt3
Upload folder using huggingface_hub
Browse files- config.json +4 -4
- generation_config.json +4 -4
- preprocessor_config.json +0 -17
config.json
CHANGED
|
@@ -7,12 +7,12 @@
|
|
| 7 |
"AutoConfig": "microsoft/Florence-2-base-ft--configuration_florence2.Florence2Config",
|
| 8 |
"AutoModelForCausalLM": "microsoft/Florence-2-base-ft--modeling_florence2.Florence2ForConditionalGeneration"
|
| 9 |
},
|
| 10 |
-
"bos_token_id":
|
| 11 |
-
"eos_token_id":
|
| 12 |
"ignore_index": -100,
|
| 13 |
"is_encoder_decoder": true,
|
| 14 |
"model_type": "florence2",
|
| 15 |
-
"pad_token_id":
|
| 16 |
"projection_dim": 768,
|
| 17 |
"text_config": {
|
| 18 |
"_name_or_path": "",
|
|
@@ -105,7 +105,7 @@
|
|
| 105 |
"vocab_size": 51289
|
| 106 |
},
|
| 107 |
"torch_dtype": "float32",
|
| 108 |
-
"transformers_version": "4.
|
| 109 |
"vision_config": {
|
| 110 |
"_name_or_path": "",
|
| 111 |
"add_cross_attention": false,
|
|
|
|
| 7 |
"AutoConfig": "microsoft/Florence-2-base-ft--configuration_florence2.Florence2Config",
|
| 8 |
"AutoModelForCausalLM": "microsoft/Florence-2-base-ft--modeling_florence2.Florence2ForConditionalGeneration"
|
| 9 |
},
|
| 10 |
+
"bos_token_id": 0,
|
| 11 |
+
"eos_token_id": 2,
|
| 12 |
"ignore_index": -100,
|
| 13 |
"is_encoder_decoder": true,
|
| 14 |
"model_type": "florence2",
|
| 15 |
+
"pad_token_id": 1,
|
| 16 |
"projection_dim": 768,
|
| 17 |
"text_config": {
|
| 18 |
"_name_or_path": "",
|
|
|
|
| 105 |
"vocab_size": 51289
|
| 106 |
},
|
| 107 |
"torch_dtype": "float32",
|
| 108 |
+
"transformers_version": "4.42.4",
|
| 109 |
"vision_config": {
|
| 110 |
"_name_or_path": "",
|
| 111 |
"add_cross_attention": false,
|
generation_config.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
| 1 |
{
|
| 2 |
"_from_model_config": true,
|
| 3 |
-
"bos_token_id":
|
| 4 |
"decoder_start_token_id": 2,
|
| 5 |
"early_stopping": true,
|
| 6 |
-
"eos_token_id":
|
| 7 |
"forced_bos_token_id": 0,
|
| 8 |
"forced_eos_token_id": 2,
|
| 9 |
"no_repeat_ngram_size": 3,
|
| 10 |
"num_beams": 3,
|
| 11 |
-
"pad_token_id":
|
| 12 |
-
"transformers_version": "4.
|
| 13 |
}
|
|
|
|
| 1 |
{
|
| 2 |
"_from_model_config": true,
|
| 3 |
+
"bos_token_id": 0,
|
| 4 |
"decoder_start_token_id": 2,
|
| 5 |
"early_stopping": true,
|
| 6 |
+
"eos_token_id": 2,
|
| 7 |
"forced_bos_token_id": 0,
|
| 8 |
"forced_eos_token_id": 2,
|
| 9 |
"no_repeat_ngram_size": 3,
|
| 10 |
"num_beams": 3,
|
| 11 |
+
"pad_token_id": 1,
|
| 12 |
+
"transformers_version": "4.42.4"
|
| 13 |
}
|
preprocessor_config.json
CHANGED
|
@@ -1,21 +1,4 @@
|
|
| 1 |
{
|
| 2 |
-
"_valid_processor_keys": [
|
| 3 |
-
"images",
|
| 4 |
-
"do_resize",
|
| 5 |
-
"size",
|
| 6 |
-
"resample",
|
| 7 |
-
"do_center_crop",
|
| 8 |
-
"crop_size",
|
| 9 |
-
"do_rescale",
|
| 10 |
-
"rescale_factor",
|
| 11 |
-
"do_normalize",
|
| 12 |
-
"image_mean",
|
| 13 |
-
"image_std",
|
| 14 |
-
"do_convert_rgb",
|
| 15 |
-
"return_tensors",
|
| 16 |
-
"data_format",
|
| 17 |
-
"input_data_format"
|
| 18 |
-
],
|
| 19 |
"auto_map": {
|
| 20 |
"AutoProcessor": "microsoft/Florence-2-base-ft--processing_florence2.Florence2Processor"
|
| 21 |
},
|
|
|
|
| 1 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
"auto_map": {
|
| 3 |
"AutoProcessor": "microsoft/Florence-2-base-ft--processing_florence2.Florence2Processor"
|
| 4 |
},
|