Skip to main content

1. Model Introduction

DeepSeek-OCR is DeepSeek’s advanced OCR (Optical Character Recognition) model designed for high-accuracy text extraction from images. The model is optimized for various document processing and image-to-text conversion tasks. Key Features:
  • Advanced OCR: High-accuracy text recognition from images and documents
  • Multi-Modality: Supports various image formats and document types
Available Models: License: To use DeepSeek-OCR, you must agree to DeepSeek’s Community License. See LICENSE for details. For more details, please refer to the official DeepSeek-OCR repository.

2. SGLang Installation

Please refer to the official SGLang installation guide for installation instructions. For SGLang CPU installation, please refer to the CPU version installation guide.

3. Model Deployment

This section provides deployment configurations optimized for different hardware platforms and use cases.

3.1 Basic Configuration

Interactive Command Generator: Use the configuration selector below to automatically generate the appropriate deployment command for your hardware platform, quantization method, and deployment strategy.

4. Model Invocation

4.1 Basic Usage

For basic API usage and request examples, please refer to:

4.2 OCR-Specific Prompts

DeepSeek-OCR accepts recommended prompts from the model card:
OpenAI-compatible image request example:
Example

5. Benchmark

5.1 Speed Benchmark

Test Environment:
  • Hardware: AMD MI300X GPU (1x)
  • Model: DeepSeek-OCR
  • Tensor Parallelism: 1
  • sglang version: 0.5.7
We use SGLang’s built-in benchmarking tool to conduct performance evaluation on the ShareGPT_Vicuna_unfiltered dataset. This dataset contains real conversation data and can better reflect performance in actual use scenarios. To simulate real-world usage patterns, we configure each request with 1024 input tokens and 1024 output tokens, representing typical medium-length conversations with detailed responses.

5.1.1 Latency-Sensitive Benchmark

  • Model Deployment Command:
Command
  • Benchmark Command:
Command
  • Test Results:
Output

5.1.2 Throughput-Sensitive Benchmark

  • Model Deployment Command:
Command
  • Benchmark Command:
Command
  • Test Results:
Output