Image-Text-to-Text
Transformers
Safetensors
Chinese
English
vision-encoder-decoder
document-parsing
document-understanding
document-intelligence
ocr
layout-analysis
table-extraction
multimodal
vision-language-model
Instructions to use ByteDance/Dolphin with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ByteDance/Dolphin with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="ByteDance/Dolphin")# Load model directly from transformers import AutoTokenizer, AutoModelForImageTextToText tokenizer = AutoTokenizer.from_pretrained("ByteDance/Dolphin") model = AutoModelForImageTextToText.from_pretrained("ByteDance/Dolphin") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use ByteDance/Dolphin with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ByteDance/Dolphin" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ByteDance/Dolphin", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/ByteDance/Dolphin
- SGLang
How to use ByteDance/Dolphin 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 "ByteDance/Dolphin" \ --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": "ByteDance/Dolphin", "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 "ByteDance/Dolphin" \ --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": "ByteDance/Dolphin", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use ByteDance/Dolphin with Docker Model Runner:
docker model run hf.co/ByteDance/Dolphin
Update README.md
Browse files
README.md
CHANGED
|
@@ -23,11 +23,11 @@ library_name: transformers
|
|
| 23 |
|
| 24 |
<a href="https://github.com/bytedance/Dolphin"><img src="https://img.shields.io/badge/Code-Github-blue"></a>
|
| 25 |
|
| 26 |
-
|
| 27 |
<div align="center">
|
| 28 |
<img src="https://cdn.wandeer.world/null/dolphin_demo.gif" width="800">
|
| 29 |
</div>
|
| 30 |
-
|
| 31 |
|
| 32 |
## Model Description
|
| 33 |
|
|
@@ -40,9 +40,9 @@ Document image parsing is challenging due to its complexly intertwined elements
|
|
| 40 |
1. **🔍 Stage 1**: Comprehensive page-level layout analysis by generating element sequence in natural reading order
|
| 41 |
2. **🧩 Stage 2**: Efficient parallel parsing of document elements using heterogeneous anchors and task-specific prompts
|
| 42 |
|
| 43 |
-
<div align="center">
|
| 44 |
<img src="https://cdn.wandeer.world/null/dolphin_framework.png" width="680">
|
| 45 |
-
</div>
|
| 46 |
|
| 47 |
Dolphin achieves promising performance across diverse page-level and element-level parsing tasks while ensuring superior efficiency through its lightweight architecture and parallel parsing mechanism.
|
| 48 |
|
|
|
|
| 23 |
|
| 24 |
<a href="https://github.com/bytedance/Dolphin"><img src="https://img.shields.io/badge/Code-Github-blue"></a>
|
| 25 |
|
| 26 |
+
<!--
|
| 27 |
<div align="center">
|
| 28 |
<img src="https://cdn.wandeer.world/null/dolphin_demo.gif" width="800">
|
| 29 |
</div>
|
| 30 |
+
-->
|
| 31 |
|
| 32 |
## Model Description
|
| 33 |
|
|
|
|
| 40 |
1. **🔍 Stage 1**: Comprehensive page-level layout analysis by generating element sequence in natural reading order
|
| 41 |
2. **🧩 Stage 2**: Efficient parallel parsing of document elements using heterogeneous anchors and task-specific prompts
|
| 42 |
|
| 43 |
+
<!-- <div align="center">
|
| 44 |
<img src="https://cdn.wandeer.world/null/dolphin_framework.png" width="680">
|
| 45 |
+
</div> -->
|
| 46 |
|
| 47 |
Dolphin achieves promising performance across diverse page-level and element-level parsing tasks while ensuring superior efficiency through its lightweight architecture and parallel parsing mechanism.
|
| 48 |
|