Instructions to use arvisioncode/florence_custom_uom1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use arvisioncode/florence_custom_uom1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="arvisioncode/florence_custom_uom1", trust_remote_code=True)# Load model directly from transformers import AutoProcessor, AutoModelForImageTextToText processor = AutoProcessor.from_pretrained("arvisioncode/florence_custom_uom1", trust_remote_code=True) model = AutoModelForImageTextToText.from_pretrained("arvisioncode/florence_custom_uom1", trust_remote_code=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use arvisioncode/florence_custom_uom1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "arvisioncode/florence_custom_uom1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "arvisioncode/florence_custom_uom1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/arvisioncode/florence_custom_uom1
- SGLang
How to use arvisioncode/florence_custom_uom1 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 "arvisioncode/florence_custom_uom1" \ --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": "arvisioncode/florence_custom_uom1", "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 "arvisioncode/florence_custom_uom1" \ --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": "arvisioncode/florence_custom_uom1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use arvisioncode/florence_custom_uom1 with Docker Model Runner:
docker model run hf.co/arvisioncode/florence_custom_uom1
Update config.json
Browse files- config.json +13 -13
config.json
CHANGED
|
@@ -12,7 +12,7 @@
|
|
| 12 |
"ignore_index": -100,
|
| 13 |
"model_type": "florence2",
|
| 14 |
"pad_token_id": 1,
|
| 15 |
-
"projection_dim":
|
| 16 |
"text_config": {
|
| 17 |
"vocab_size": 51289,
|
| 18 |
"activation_dropout": 0.1,
|
|
@@ -23,18 +23,18 @@
|
|
| 23 |
"bos_token_id": 0,
|
| 24 |
"classif_dropout": 0.1,
|
| 25 |
"classifier_dropout": 0.0,
|
| 26 |
-
"d_model":
|
| 27 |
-
"decoder_attention_heads":
|
| 28 |
-
"decoder_ffn_dim":
|
| 29 |
"decoder_layerdrop": 0.0,
|
| 30 |
-
"decoder_layers":
|
| 31 |
"decoder_start_token_id": 2,
|
| 32 |
"dropout": 0.1,
|
| 33 |
"early_stopping": true,
|
| 34 |
-
"encoder_attention_heads":
|
| 35 |
-
"encoder_ffn_dim":
|
| 36 |
"encoder_layerdrop": 0.0,
|
| 37 |
-
"encoder_layers":
|
| 38 |
"eos_token_id": 2,
|
| 39 |
"forced_eos_token_id": 2,
|
| 40 |
"forced_bos_token_id": 0,
|
|
@@ -49,7 +49,7 @@
|
|
| 49 |
"max_position_embeddings": 1024,
|
| 50 |
"no_repeat_ngram_size": 3,
|
| 51 |
"normalize_before": false,
|
| 52 |
-
"num_hidden_layers":
|
| 53 |
"pad_token_id": 1,
|
| 54 |
"scale_embedding": false,
|
| 55 |
"num_beams": 3
|
|
@@ -62,12 +62,12 @@
|
|
| 62 |
"patch_padding": [3, 1, 1, 1],
|
| 63 |
"patch_prenorm": [false, true, true, true],
|
| 64 |
"enable_checkpoint": false,
|
| 65 |
-
"dim_embed": [
|
| 66 |
-
"num_heads": [
|
| 67 |
-
"num_groups": [
|
| 68 |
"depths": [1, 1, 9, 1],
|
| 69 |
"window_size": 12,
|
| 70 |
-
"projection_dim":
|
| 71 |
"visual_temporal_embedding": {
|
| 72 |
"type": "COSINE",
|
| 73 |
"max_temporal_embeddings": 100
|
|
|
|
| 12 |
"ignore_index": -100,
|
| 13 |
"model_type": "florence2",
|
| 14 |
"pad_token_id": 1,
|
| 15 |
+
"projection_dim": 1024,
|
| 16 |
"text_config": {
|
| 17 |
"vocab_size": 51289,
|
| 18 |
"activation_dropout": 0.1,
|
|
|
|
| 23 |
"bos_token_id": 0,
|
| 24 |
"classif_dropout": 0.1,
|
| 25 |
"classifier_dropout": 0.0,
|
| 26 |
+
"d_model": 1024,
|
| 27 |
+
"decoder_attention_heads": 16,
|
| 28 |
+
"decoder_ffn_dim": 4096,
|
| 29 |
"decoder_layerdrop": 0.0,
|
| 30 |
+
"decoder_layers": 12,
|
| 31 |
"decoder_start_token_id": 2,
|
| 32 |
"dropout": 0.1,
|
| 33 |
"early_stopping": true,
|
| 34 |
+
"encoder_attention_heads": 16,
|
| 35 |
+
"encoder_ffn_dim": 4096,
|
| 36 |
"encoder_layerdrop": 0.0,
|
| 37 |
+
"encoder_layers": 12,
|
| 38 |
"eos_token_id": 2,
|
| 39 |
"forced_eos_token_id": 2,
|
| 40 |
"forced_bos_token_id": 0,
|
|
|
|
| 49 |
"max_position_embeddings": 1024,
|
| 50 |
"no_repeat_ngram_size": 3,
|
| 51 |
"normalize_before": false,
|
| 52 |
+
"num_hidden_layers": 12,
|
| 53 |
"pad_token_id": 1,
|
| 54 |
"scale_embedding": false,
|
| 55 |
"num_beams": 3
|
|
|
|
| 62 |
"patch_padding": [3, 1, 1, 1],
|
| 63 |
"patch_prenorm": [false, true, true, true],
|
| 64 |
"enable_checkpoint": false,
|
| 65 |
+
"dim_embed": [256, 512, 1024, 2048],
|
| 66 |
+
"num_heads": [8, 16, 32, 64],
|
| 67 |
+
"num_groups": [8, 16, 32, 64],
|
| 68 |
"depths": [1, 1, 9, 1],
|
| 69 |
"window_size": 12,
|
| 70 |
+
"projection_dim": 1024,
|
| 71 |
"visual_temporal_embedding": {
|
| 72 |
"type": "COSINE",
|
| 73 |
"max_temporal_embeddings": 100
|