Image-Text-to-Text
Transformers
Safetensors
monkeyocrv2
text-generation
conversational
custom_code
Eval Results
Instructions to use zenosai/MonkeyOCRv2-S-Parsing with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use zenosai/MonkeyOCRv2-S-Parsing with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="zenosai/MonkeyOCRv2-S-Parsing", trust_remote_code=True) messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("zenosai/MonkeyOCRv2-S-Parsing", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use zenosai/MonkeyOCRv2-S-Parsing with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "zenosai/MonkeyOCRv2-S-Parsing" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "zenosai/MonkeyOCRv2-S-Parsing", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/zenosai/MonkeyOCRv2-S-Parsing
- SGLang
How to use zenosai/MonkeyOCRv2-S-Parsing 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 "zenosai/MonkeyOCRv2-S-Parsing" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "zenosai/MonkeyOCRv2-S-Parsing", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'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 "zenosai/MonkeyOCRv2-S-Parsing" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "zenosai/MonkeyOCRv2-S-Parsing", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use zenosai/MonkeyOCRv2-S-Parsing with Docker Model Runner:
docker model run hf.co/zenosai/MonkeyOCRv2-S-Parsing
Commit History
-
Update README.md
Verified signaturead223fa
-
Add Real5-OmniDocBench evaluation results for MonkeyOCRv2-S-Parsing (#4)
- Add Real5-OmniDocBench evaluation results for MonkeyOCRv2-S-Parsing (2bc081f276fa41f135ed3281758a779a292b4e59) - Clean up Real5-OmniDocBench evaluation metadata (2db9d4b3d635038166437fb11783a3d35cf386d2) Co-authored-by: chagndazhou <changdazhou@users.noreply.huggingface.co>efd808d
-
Update README.md
Verified signatureb3fe53b
-
Update README.md
Verified signature1a1972b
-
Update README.md
Verified signatureb71b028
-
Update README.md
Verified signature4b2b99d
-
Update MDPBench private evaluation result (#3)
- Update MDPBench private evaluation result (13fcc5b84f81b35c040072bb9731c5468e2c56c3) Co-authored-by: Delores Lin <Delores-Lin@users.noreply.huggingface.co>85abfcd
-
Update README.md
Verified signatureddc2813 -
Add MDPBench evaluation results (#2)
- Add MDPBench evaluation results (d9e830b6faa59031f22d327b081d75dc796f04f6) Co-authored-by: Delores Lin <Delores-Lin@users.noreply.huggingface.co>0132266 -
Add library_name: transformers to metadata (#1)
- Add library_name: transformers to metadata (396742ce3ddbc9472de8c7a20e57c56ff261fd28) Co-authored-by: Niels Rogge <nielsr@users.noreply.huggingface.co>bac36d9
-
Update README.md
Verified signature9ce1abc
-
Delete latest
Verified signatureb64d716
-
Upload folder using huggingface_hub
Verified signature8974fb7 -
initial commit
Verified signature6bb8cfe