Image-Text-to-Text
Transformers
Safetensors
Chinese
English
qwen2_5_vl
ocr
document-parsing
multimodal
conversational
custom_code
Eval Results
text-generation-inference
Instructions to use XingChen-AGI/TeleOCR with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use XingChen-AGI/TeleOCR with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="XingChen-AGI/TeleOCR", 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 AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("XingChen-AGI/TeleOCR", trust_remote_code=True) model = AutoModelForMultimodalLM.from_pretrained("XingChen-AGI/TeleOCR", trust_remote_code=True, device_map="auto") 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?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use XingChen-AGI/TeleOCR with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "XingChen-AGI/TeleOCR" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "XingChen-AGI/TeleOCR", "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/XingChen-AGI/TeleOCR
- SGLang
How to use XingChen-AGI/TeleOCR 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 "XingChen-AGI/TeleOCR" \ --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": "XingChen-AGI/TeleOCR", "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 "XingChen-AGI/TeleOCR" \ --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": "XingChen-AGI/TeleOCR", "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 XingChen-AGI/TeleOCR with Docker Model Runner:
docker model run hf.co/XingChen-AGI/TeleOCR
Commit History
9 days ago
-
Add ParseBench evaluation results (#5)
- Add ParseBench evaluation results (5e9317b1ccd29d76ab6b4b1b8a685689bab70581) Co-authored-by: Boyang Zhang <boyang-runllama@users.noreply.huggingface.co>70a19ec
19 days ago
-
Update README.md
Verified signaturee925853
26 days ago
-
Update README.md
Verified signaturea614331 -
Update README.md
Verified signaturea06f146
-
Update README.md
Verified signature8706730 -
Update README.md
Verified signaturea99c4e1 -
Update README.md
Verified signature36e402f
-
Update README.md
Verified signature73759a2
-
Update README.md
Verified signature710ea2e -
Update README.md
Verified signature3b8a2e8
-
Update README.md
Verified signaturec394c1f
-
Update README.md
Verified signature0de5c3c -
Update README.md
Verified signaturee076e3c
-
Update README.md
Verified signaturec21590c
-
Update README.md
Verified signaturec717905
-
Update README.md
Verified signature09960cd
-
Update README.md
Verified signature36bd900 -
Update README.md
Verified signaturef9ac890
-
Update README.md
Verified signature807e29d -
Update README.md
Verified signatureb696084 -
Update README.md
Verified signature366fd08 -
Update README.md
Verified signaturee2bb158 -
Update README.md
Verified signature5f1d35b
-
Update README.md
Verified signature77ae066 -
Update README.md
Verified signature7484ad0 -
Update README.md
Verified signature38f1e44 -
Update README.md
Verified signaturea273d31 -
Update README.md
Verified signature3742bd8 -
Upload folder using huggingface_hub
Verified signature27d763e -
Upload folder using huggingface_hub
Verified signatured9aec25 -
Upload folder using huggingface_hub
Verified signature1861763
-
initial commit
Verified signature2a590a5