Image-Text-to-Text
Transformers
Safetensors
deepseek_vl_v2
feature-extraction
forkjoin-ai
edge-deployment
aether
custom_code
Instructions to use forkjoin-ai/deepseek-ocr-2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use forkjoin-ai/deepseek-ocr-2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="forkjoin-ai/deepseek-ocr-2", trust_remote_code=True)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("forkjoin-ai/deepseek-ocr-2", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use forkjoin-ai/deepseek-ocr-2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "forkjoin-ai/deepseek-ocr-2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "forkjoin-ai/deepseek-ocr-2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/forkjoin-ai/deepseek-ocr-2
- SGLang
How to use forkjoin-ai/deepseek-ocr-2 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 "forkjoin-ai/deepseek-ocr-2" \ --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": "forkjoin-ai/deepseek-ocr-2", "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 "forkjoin-ai/deepseek-ocr-2" \ --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": "forkjoin-ai/deepseek-ocr-2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use forkjoin-ai/deepseek-ocr-2 with Docker Model Runner:
docker model run hf.co/forkjoin-ai/deepseek-ocr-2
Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -1,74 +1,53 @@
|
|
| 1 |
---
|
| 2 |
language:
|
| 3 |
- en
|
| 4 |
-
license:
|
| 5 |
-
library_name:
|
| 6 |
tags:
|
| 7 |
- gguf
|
| 8 |
-
- deepseek
|
| 9 |
-
- ocr
|
| 10 |
-
- document
|
| 11 |
- vision
|
|
|
|
| 12 |
- affectively
|
| 13 |
-
|
| 14 |
-
- aether
|
| 15 |
-
- distributed-inference
|
| 16 |
-
- edge-deployment
|
| 17 |
-
base_model: deepseek-ai/deepseek-vl2-tiny
|
| 18 |
-
base_model_relation: quantized
|
| 19 |
pipeline_tag: image-text-to-text
|
| 20 |
---
|
| 21 |
|
| 22 |
-
#
|
| 23 |
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
## Highlights
|
| 27 |
-
|
| 28 |
-
- **~2B parameters** — Second-generation OCR model based on DeepSeek VL2. Improved text extraction accuracy.
|
| 29 |
-
- **~2 GB** Q4_K_M quantized — optimized for distributed edge inference
|
| 30 |
-
- **LLaMA architecture** — proven, stable, well-tested
|
| 31 |
-
- **Aether runtime compatible** — layer-sharded across distributed nodes via [Edgework.ai](https://edgework.ai)
|
| 32 |
|
| 33 |
## Model Details
|
| 34 |
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
| Parameters | ~2B |
|
| 39 |
-
| Architecture | LLaMA |
|
| 40 |
-
| Quantization | Q4_K_M |
|
| 41 |
-
| Format | GGUF |
|
| 42 |
-
| Size | ~2 GB |
|
| 43 |
-
| License | mit |
|
| 44 |
|
| 45 |
## Usage
|
| 46 |
|
| 47 |
### With llama.cpp
|
| 48 |
|
| 49 |
```bash
|
| 50 |
-
./llama-cli -m deepseek-ocr-2-
|
| 51 |
```
|
| 52 |
|
| 53 |
-
### With
|
| 54 |
-
|
| 55 |
-
This model is deployed across the [Aether](https://github.com/affectively-ai/aether) distributed inference network. Weights are layer-sharded and distributed across multiple edge nodes for parallel inference.
|
| 56 |
-
|
| 57 |
-
## Deployment Architecture
|
| 58 |
|
| 59 |
-
|
|
|
|
|
|
|
|
|
|
| 60 |
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
|
| 66 |
-
|
| 67 |
|
| 68 |
-
|
| 69 |
|
| 70 |
-
|
| 71 |
|
| 72 |
-
|
| 73 |
|
| 74 |
-
|
|
|
|
| 1 |
---
|
| 2 |
language:
|
| 3 |
- en
|
| 4 |
+
license: apache-2.0
|
| 5 |
+
library_name: llama-cpp
|
| 6 |
tags:
|
| 7 |
- gguf
|
|
|
|
|
|
|
|
|
|
| 8 |
- vision
|
| 9 |
+
- multimodal
|
| 10 |
- affectively
|
| 11 |
+
base_model: deepseek-ai/DeepSeek-OCR-2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
pipeline_tag: image-text-to-text
|
| 13 |
---
|
| 14 |
|
| 15 |
+
# Deepseek Ocr 2
|
| 16 |
|
| 17 |
+
AFFECTIVELY conversion of [deepseek-ai/DeepSeek-OCR-2](https://huggingface.co/deepseek-ai/DeepSeek-OCR-2) to GGUF format for edge deployment.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
|
| 19 |
## Model Details
|
| 20 |
|
| 21 |
+
- **Source Model**: [deepseek-ai/DeepSeek-OCR-2](https://huggingface.co/deepseek-ai/DeepSeek-OCR-2)
|
| 22 |
+
- **Format**: GGUF
|
| 23 |
+
- **Converted by**: [AFFECTIVELY](https://affectively.ai)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 24 |
|
| 25 |
## Usage
|
| 26 |
|
| 27 |
### With llama.cpp
|
| 28 |
|
| 29 |
```bash
|
| 30 |
+
./llama-cli -m deepseek-ocr-2-gguf.gguf -p "Your prompt here" -n 256
|
| 31 |
```
|
| 32 |
|
| 33 |
+
### With Ollama
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
|
| 35 |
+
Create a `Modelfile`:
|
| 36 |
+
```
|
| 37 |
+
FROM ./deepseek-ocr-2-gguf.gguf
|
| 38 |
+
```
|
| 39 |
|
| 40 |
+
```bash
|
| 41 |
+
ollama create deepseek-ocr-2-gguf -f Modelfile
|
| 42 |
+
ollama run deepseek-ocr-2-gguf
|
| 43 |
+
```
|
| 44 |
|
| 45 |
+
## About AFFECTIVELY
|
| 46 |
|
| 47 |
+
[AFFECTIVELY](https://affectively.ai) is an emotion intelligence platform that runs AI models at the edge -- in-browser, on-device, zero cloud cost. These converted models power the platform's real-time emotion analysis, speech recognition, and natural language capabilities.
|
| 48 |
|
| 49 |
+
All conversions are optimized for edge deployment within browser and mobile memory constraints.
|
| 50 |
|
| 51 |
+
## License
|
| 52 |
|
| 53 |
+
Apache 2.0 (follows upstream model license)
|