Hugging Face's logo Hugging Face
  • Models
  • Datasets
  • Spaces
  • Buckets new
  • Docs
  • Enterprise
  • Pricing

  • Log In
  • Sign Up

Durgaram
/
dots.mocr-4bit

Image-Text-to-Text
Transformers
Safetensors
dots_ocr
text-generation
ocr
image-to-text
document-parse
quantized
4bit
bitsandbytes
multilingual
conversational
custom_code
4-bit precision
Model card Files Files and versions
xet
Community

Instructions to use Durgaram/dots.mocr-4bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • Transformers

    How to use Durgaram/dots.mocr-4bit with Transformers:

    # Use a pipeline as a high-level helper
    from transformers import pipeline
    
    pipe = pipeline("image-text-to-text", model="Durgaram/dots.mocr-4bit", 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)
    # Load model directly
    from transformers import AutoModelForCausalLM
    model = AutoModelForCausalLM.from_pretrained("Durgaram/dots.mocr-4bit", trust_remote_code=True, dtype="auto")
  • Notebooks
  • Google Colab
  • Kaggle
  • Local Apps
  • vLLM

    How to use Durgaram/dots.mocr-4bit with vLLM:

    Install from pip and serve model
    # Install vLLM from pip:
    pip install vllm
    # Start the vLLM server:
    vllm serve "Durgaram/dots.mocr-4bit"
    # Call the server using curl (OpenAI-compatible API):
    curl -X POST "http://localhost:8000/v1/chat/completions" \
    	-H "Content-Type: application/json" \
    	--data '{
    		"model": "Durgaram/dots.mocr-4bit",
    		"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/Durgaram/dots.mocr-4bit
  • SGLang

    How to use Durgaram/dots.mocr-4bit 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 "Durgaram/dots.mocr-4bit" \
        --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": "Durgaram/dots.mocr-4bit",
    		"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 "Durgaram/dots.mocr-4bit" \
            --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": "Durgaram/dots.mocr-4bit",
    		"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 Durgaram/dots.mocr-4bit with Docker Model Runner:

    docker model run hf.co/Durgaram/dots.mocr-4bit
dots.mocr-4bit
2.28 GB
Ctrl+K
Ctrl+K
  • 1 contributor
History: 6 commits
Durgaram's picture
Durgaram
Update README.md
dc74505 verified about 2 months ago
  • .gitattributes
    1.57 kB
    Upload 16 files about 2 months ago
  • README.md
    3.07 kB
    Update README.md about 2 months ago
  • added_tokens.json
    1.21 kB
    Upload 16 files about 2 months ago
  • chat_template.jinja
    1.12 kB
    Upload 16 files about 2 months ago
  • config.json
    2.51 kB
    Upload 16 files about 2 months ago
  • configuration_dots.py
    3.14 kB
    Upload 16 files about 2 months ago
  • generation_config.json
    122 Bytes
    Upload 16 files about 2 months ago
  • merges.txt
    1.67 MB
    Upload 16 files about 2 months ago
  • model.safetensors
    2.26 GB
    xet
    Upload 16 files about 2 months ago
  • modeling_dots_ocr.py
    4.98 kB
    Upload 16 files about 2 months ago
  • modeling_dots_vision.py
    14.9 kB
    Upload 16 files about 2 months ago
  • preprocessor_config.json
    904 Bytes
    Upload 16 files about 2 months ago
  • processor_config.json
    122 Bytes
    Upload 16 files about 2 months ago
  • special_tokens_map.json
    608 Bytes
    Upload 16 files about 2 months ago
  • tokenizer.json
    11.4 MB
    xet
    Upload 16 files about 2 months ago
  • tokenizer_config.json
    8.93 kB
    Upload 16 files about 2 months ago
  • video_preprocessor_config.json
    988 Bytes
    Upload 16 files about 2 months ago
  • vocab.json
    2.78 MB
    Upload 16 files about 2 months ago