Image-Text-to-Text
Transformers
TensorBoard
Safetensors
florence2
Generated from Trainer
custom_code
Instructions to use jena-shreyas/florence_ft with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use jena-shreyas/florence_ft with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="jena-shreyas/florence_ft", trust_remote_code=True)# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("jena-shreyas/florence_ft", trust_remote_code=True) model = AutoModelForMultimodalLM.from_pretrained("jena-shreyas/florence_ft", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use jena-shreyas/florence_ft with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "jena-shreyas/florence_ft" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "jena-shreyas/florence_ft", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/jena-shreyas/florence_ft
- SGLang
How to use jena-shreyas/florence_ft 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 "jena-shreyas/florence_ft" \ --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": "jena-shreyas/florence_ft", "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 "jena-shreyas/florence_ft" \ --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": "jena-shreyas/florence_ft", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use jena-shreyas/florence_ft with Docker Model Runner:
docker model run hf.co/jena-shreyas/florence_ft
| library_name: transformers | |
| base_model: HuggingFaceM4/Florence-2-DocVQA | |
| tags: | |
| - generated_from_trainer | |
| model-index: | |
| - name: florence_ft | |
| results: [] | |
| <!-- This model card has been generated automatically according to the information the Trainer had access to. You | |
| should probably proofread and complete it, then remove this comment. --> | |
| # florence_ft | |
| This model is a fine-tuned version of [HuggingFaceM4/Florence-2-DocVQA](https://huggingface.co/HuggingFaceM4/Florence-2-DocVQA) on an unknown dataset. | |
| It achieves the following results on the evaluation set: | |
| - Loss: 1.0833 | |
| ## Model description | |
| More information needed | |
| ## Intended uses & limitations | |
| More information needed | |
| ## Training and evaluation data | |
| More information needed | |
| ## Training procedure | |
| ### Training hyperparameters | |
| The following hyperparameters were used during training: | |
| - learning_rate: 5e-06 | |
| - train_batch_size: 8 | |
| - eval_batch_size: 8 | |
| - seed: 42 | |
| - gradient_accumulation_steps: 4 | |
| - total_train_batch_size: 32 | |
| - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 | |
| - lr_scheduler_type: linear | |
| - lr_scheduler_warmup_ratio: 0.05 | |
| - num_epochs: 1 | |
| ### Training results | |
| | Training Loss | Epoch | Step | Validation Loss | | |
| |:-------------:|:------:|:----:|:---------------:| | |
| | 4.4629 | 0.0123 | 25 | 4.6140 | | |
| | 4.0165 | 0.0245 | 50 | 3.9075 | | |
| | 3.0887 | 0.0368 | 75 | 2.4186 | | |
| | 1.3752 | 0.0491 | 100 | 1.4240 | | |
| | 1.1205 | 0.0613 | 125 | 1.2705 | | |
| | 1.0809 | 0.0736 | 150 | 1.2144 | | |
| | 1.0946 | 0.0859 | 175 | 1.1813 | | |
| | 1.0311 | 0.0982 | 200 | 1.1653 | | |
| | 1.0611 | 0.1104 | 225 | 1.1503 | | |
| | 1.0209 | 0.1227 | 250 | 1.1423 | | |
| | 1.052 | 0.1350 | 275 | 1.1384 | | |
| | 1.0129 | 0.1472 | 300 | 1.1273 | | |
| | 0.9764 | 0.1595 | 325 | 1.1218 | | |
| | 0.9707 | 0.1718 | 350 | 1.1155 | | |
| | 1.0024 | 0.1840 | 375 | 1.1151 | | |
| | 1.0446 | 0.1963 | 400 | 1.1112 | | |
| | 0.9691 | 0.2086 | 425 | 1.1081 | | |
| | 1.0018 | 0.2209 | 450 | 1.1040 | | |
| | 0.9806 | 0.2331 | 475 | 1.0989 | | |
| | 1.0555 | 0.2454 | 500 | 1.0980 | | |
| | 0.9778 | 0.2577 | 525 | 1.0981 | | |
| | 0.988 | 0.2699 | 550 | 1.0962 | | |
| | 0.988 | 0.2822 | 575 | 1.0939 | | |
| | 0.9572 | 0.2945 | 600 | 1.0969 | | |
| | 0.9802 | 0.3067 | 625 | 1.0952 | | |
| | 0.9504 | 0.3190 | 650 | 1.0933 | | |
| | 1.0194 | 0.3313 | 675 | 1.0948 | | |
| | 0.9697 | 0.3436 | 700 | 1.0935 | | |
| | 0.96 | 0.3558 | 725 | 1.0903 | | |
| | 0.9665 | 0.3681 | 750 | 1.0924 | | |
| | 0.9895 | 0.3804 | 775 | 1.0920 | | |
| | 1.004 | 0.3926 | 800 | 1.0914 | | |
| | 1.0054 | 0.4049 | 825 | 1.0909 | | |
| | 0.9514 | 0.4172 | 850 | 1.0890 | | |
| | 0.9996 | 0.4294 | 875 | 1.0906 | | |
| | 0.99 | 0.4417 | 900 | 1.0896 | | |
| | 0.9427 | 0.4540 | 925 | 1.0887 | | |
| | 1.0014 | 0.4663 | 950 | 1.0883 | | |
| | 0.9639 | 0.4785 | 975 | 1.0864 | | |
| | 1.0073 | 0.4908 | 1000 | 1.0877 | | |
| | 0.9895 | 0.5031 | 1025 | 1.0863 | | |
| | 0.9594 | 0.5153 | 1050 | 1.0841 | | |
| | 0.9559 | 0.5276 | 1075 | 1.0849 | | |
| | 1.0034 | 0.5399 | 1100 | 1.0849 | | |
| | 0.9795 | 0.5521 | 1125 | 1.0844 | | |
| | 0.9661 | 0.5644 | 1150 | 1.0834 | | |
| | 0.9533 | 0.5767 | 1175 | 1.0830 | | |
| | 0.976 | 0.5890 | 1200 | 1.0830 | | |
| | 0.9932 | 0.6012 | 1225 | 1.0846 | | |
| | 1.0067 | 0.6135 | 1250 | 1.0861 | | |
| | 0.9543 | 0.6258 | 1275 | 1.0854 | | |
| | 0.9733 | 0.6380 | 1300 | 1.0844 | | |
| | 0.9673 | 0.6503 | 1325 | 1.0837 | | |
| | 0.9378 | 0.6626 | 1350 | 1.0837 | | |
| | 0.9713 | 0.6748 | 1375 | 1.0840 | | |
| | 0.9913 | 0.6871 | 1400 | 1.0838 | | |
| | 0.9302 | 0.6994 | 1425 | 1.0837 | | |
| | 0.9873 | 0.7117 | 1450 | 1.0836 | | |
| | 0.9618 | 0.7239 | 1475 | 1.0835 | | |
| | 1.0042 | 0.7362 | 1500 | 1.0835 | | |
| | 0.9627 | 0.7485 | 1525 | 1.0827 | | |
| | 0.9635 | 0.7607 | 1550 | 1.0827 | | |
| | 0.9658 | 0.7730 | 1575 | 1.0828 | | |
| | 0.9446 | 0.7853 | 1600 | 1.0832 | | |
| | 0.9844 | 0.7975 | 1625 | 1.0833 | | |
| | 0.9641 | 0.8098 | 1650 | 1.0837 | | |
| | 1.0 | 0.8221 | 1675 | 1.0835 | | |
| | 0.9514 | 0.8344 | 1700 | 1.0837 | | |
| | 1.0094 | 0.8466 | 1725 | 1.0835 | | |
| | 0.9379 | 0.8589 | 1750 | 1.0834 | | |
| | 0.9617 | 0.8712 | 1775 | 1.0835 | | |
| | 0.9674 | 0.8834 | 1800 | 1.0836 | | |
| | 0.9867 | 0.8957 | 1825 | 1.0838 | | |
| | 0.9442 | 0.9080 | 1850 | 1.0832 | | |
| | 0.9603 | 0.9202 | 1875 | 1.0838 | | |
| | 0.9766 | 0.9325 | 1900 | 1.0833 | | |
| | 0.9806 | 0.9448 | 1925 | 1.0835 | | |
| | 0.9676 | 0.9571 | 1950 | 1.0835 | | |
| | 0.9856 | 0.9693 | 1975 | 1.0838 | | |
| | 0.9339 | 0.9816 | 2000 | 1.0836 | | |
| | 0.9553 | 0.9939 | 2025 | 1.0833 | | |
| ### Framework versions | |
| - Transformers 4.44.2 | |
| - Pytorch 2.0.1+cu117 | |
| - Tokenizers 0.19.1 | |