Image-Text-to-Text
Transformers
TensorBoard
Safetensors
florence2
Generated from Trainer
custom_code
Instructions to use Mit1208/Florence-2-large-DocLayNet with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Mit1208/Florence-2-large-DocLayNet with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="Mit1208/Florence-2-large-DocLayNet", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("Mit1208/Florence-2-large-DocLayNet", trust_remote_code=True) model = AutoModelForMultimodalLM.from_pretrained("Mit1208/Florence-2-large-DocLayNet", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Mit1208/Florence-2-large-DocLayNet with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Mit1208/Florence-2-large-DocLayNet" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Mit1208/Florence-2-large-DocLayNet", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Mit1208/Florence-2-large-DocLayNet
- SGLang
How to use Mit1208/Florence-2-large-DocLayNet 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 "Mit1208/Florence-2-large-DocLayNet" \ --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": "Mit1208/Florence-2-large-DocLayNet", "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 "Mit1208/Florence-2-large-DocLayNet" \ --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": "Mit1208/Florence-2-large-DocLayNet", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Mit1208/Florence-2-large-DocLayNet with Docker Model Runner:
docker model run hf.co/Mit1208/Florence-2-large-DocLayNet
Commit History
-
Training in progress, epoch 10
Verified signatureaad6787 -
Training in progress, epoch 9
Verified signature72421ee -
Training in progress, epoch 8
Verified signature440e07b -
Training in progress, epoch 7
Verified signature2ddda29 -
Training in progress, epoch 6
Verified signature2e00faf -
Training in progress, epoch 5
Verified signatureef0dec8 -
Training in progress, epoch 4
Verified signaturee5aa67e -
Training in progress, epoch 3
Verified signatureacef44e -
Training in progress, epoch 2
Verified signature42093df -
Training in progress, epoch 1
Verified signaturee97ade0
-
Training in progress, epoch 10
Verified signature53089ff -
Training in progress, epoch 9
Verified signature21fd2cf -
Training in progress, epoch 8
Verified signature22ce2ea -
Training in progress, epoch 7
Verified signature1f4757c -
Training in progress, epoch 6
Verified signaturecdd24af -
Training in progress, epoch 5
Verified signaturefbb06ae -
Training in progress, epoch 3
Verified signature84da24b -
Training in progress, epoch 2
Verified signature4b8865d -
Training in progress, epoch 1
Verified signature0721d5d -
Training in progress, epoch 5
Verified signature8a20c2f -
Training in progress, epoch 4
Verified signaturece43488 -
Training in progress, epoch 3
Verified signaturefa20d29 -
Training in progress, epoch 2
Verified signaturefb2778c -
Training in progress, epoch 1
Verified signature455348d