Image-Text-to-Text
Safetensors
English
Chinese
dots_ocr
auto-round
gptq
vllm
multimodal
ocr
document-parse
4bit
conversational
custom_code
4-bit precision
Instructions to use OpenTensorLab/dots.mocr-W4A16-AutoRound-GPTQ with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Local Apps Settings
- vLLM
How to use OpenTensorLab/dots.mocr-W4A16-AutoRound-GPTQ with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "OpenTensorLab/dots.mocr-W4A16-AutoRound-GPTQ" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "OpenTensorLab/dots.mocr-W4A16-AutoRound-GPTQ", "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/OpenTensorLab/dots.mocr-W4A16-AutoRound-GPTQ
- SGLang
How to use OpenTensorLab/dots.mocr-W4A16-AutoRound-GPTQ 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 "OpenTensorLab/dots.mocr-W4A16-AutoRound-GPTQ" \ --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": "OpenTensorLab/dots.mocr-W4A16-AutoRound-GPTQ", "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 "OpenTensorLab/dots.mocr-W4A16-AutoRound-GPTQ" \ --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": "OpenTensorLab/dots.mocr-W4A16-AutoRound-GPTQ", "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 OpenTensorLab/dots.mocr-W4A16-AutoRound-GPTQ with Docker Model Runner:
docker model run hf.co/OpenTensorLab/dots.mocr-W4A16-AutoRound-GPTQ
Download config.json from OpenTensorLab/dots.mocr-W4A16-AutoRound-GPTQ: direct link, hf CLI and curl.
- Browser
- Download file 2.49 kB
-
https://huggingface.co/OpenTensorLab/dots.mocr-W4A16-AutoRound-GPTQ/resolve/main/config.json
- Command line
-
hf download hf://OpenTensorLab/dots.mocr-W4A16-AutoRound-GPTQ/config.json
-
curl -L -o config.json https://huggingface.co/OpenTensorLab/dots.mocr-W4A16-AutoRound-GPTQ/resolve/main/config.json
2.49 kB
| { | |
| "architectures": [ | |
| "DotsOCRForCausalLM" | |
| ], | |
| "attention_bias": true, | |
| "attention_dropout": 0.0, | |
| "auto_map": { | |
| "AutoConfig": "configuration_dots.DotsOCRConfig", | |
| "AutoModelForCausalLM": "modeling_dots_ocr.DotsOCRForCausalLM" | |
| }, | |
| "bos_token_id": null, | |
| "dtype": "float16", | |
| "eos_token_id": null, | |
| "hidden_act": "silu", | |
| "hidden_size": 1536, | |
| "image_token_id": 151665, | |
| "initializer_range": 0.02, | |
| "intermediate_size": 8960, | |
| "layer_types": [ | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention" | |
| ], | |
| "max_position_embeddings": 131072, | |
| "max_window_layers": 28, | |
| "model_type": "dots_ocr", | |
| "num_attention_heads": 12, | |
| "num_hidden_layers": 28, | |
| "num_key_value_heads": 2, | |
| "pad_token_id": null, | |
| "quantization_config": { | |
| "autoround_version": "0.16.0", | |
| "bits": 4, | |
| "damp_percent": 0.01, | |
| "data_type": "int", | |
| "desc_act": false, | |
| "group_size": 32, | |
| "iters": 1000, | |
| "lm_head": false, | |
| "provider": "auto-round", | |
| "quant_method": "gptq", | |
| "sym": true, | |
| "true_sequential": false | |
| }, | |
| "rms_norm_eps": 1e-06, | |
| "rope_parameters": { | |
| "rope_theta": 1000000, | |
| "rope_type": "default" | |
| }, | |
| "sliding_window": null, | |
| "tie_word_embeddings": false, | |
| "transformers_version": "5.19.0", | |
| "use_cache": true, | |
| "use_sliding_window": false, | |
| "video_token_id": 151656, | |
| "vision_config": { | |
| "attn_implementation": "flash_attention_2", | |
| "embed_dim": 1536, | |
| "gradient_checkpointing": false, | |
| "hidden_size": 1536, | |
| "init_merger_std": 0.02, | |
| "initializer_range": 0.02, | |
| "intermediate_size": 4224, | |
| "is_causal": false, | |
| "model_type": "dots_vit", | |
| "num_attention_heads": 12, | |
| "num_channels": 3, | |
| "num_hidden_layers": 42, | |
| "patch_size": 14, | |
| "post_norm": true, | |
| "rms_norm_eps": 1e-05, | |
| "spatial_merge_size": 2, | |
| "temporal_patch_size": 1, | |
| "use_bias": false | |
| }, | |
| "vocab_size": 151936, | |
| "torch_dtype": "float16" | |
| } |