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

  • Log In
  • Sign Up

specsGuy
/
Deepseek-ocr

Image-Text-to-Text
Transformers
Safetensors
multilingual
deepseekocr
feature-extraction
deepseek
vision-language
ocr
custom_code
Model card Files Files and versions
xet
Community
1

Instructions to use specsGuy/Deepseek-ocr with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • Transformers

    How to use specsGuy/Deepseek-ocr with Transformers:

    # Use a pipeline as a high-level helper
    from transformers import pipeline
    
    pipe = pipeline("image-text-to-text", model="specsGuy/Deepseek-ocr", trust_remote_code=True)
    # Load model directly
    from transformers import AutoModel
    model = AutoModel.from_pretrained("specsGuy/Deepseek-ocr", trust_remote_code=True, dtype="auto")
  • Notebooks
  • Google Colab
  • Kaggle
  • Local Apps
  • vLLM

    How to use specsGuy/Deepseek-ocr with vLLM:

    Install from pip and serve model
    # Install vLLM from pip:
    pip install vllm
    # Start the vLLM server:
    vllm serve "specsGuy/Deepseek-ocr"
    # Call the server using curl (OpenAI-compatible API):
    curl -X POST "http://localhost:8000/v1/completions" \
    	-H "Content-Type: application/json" \
    	--data '{
    		"model": "specsGuy/Deepseek-ocr",
    		"prompt": "Once upon a time,",
    		"max_tokens": 512,
    		"temperature": 0.5
    	}'
    Use Docker
    docker model run hf.co/specsGuy/Deepseek-ocr
  • SGLang

    How to use specsGuy/Deepseek-ocr 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 "specsGuy/Deepseek-ocr" \
        --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": "specsGuy/Deepseek-ocr",
    		"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 "specsGuy/Deepseek-ocr" \
            --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": "specsGuy/Deepseek-ocr",
    		"prompt": "Once upon a time,",
    		"max_tokens": 512,
    		"temperature": 0.5
    	}'
  • Docker Model Runner

    How to use specsGuy/Deepseek-ocr with Docker Model Runner:

    docker model run hf.co/specsGuy/Deepseek-ocr
Deepseek-ocr
Ctrl+K
Ctrl+K
  • 1 contributor
History: 11 commits
specsGuy's picture
specsGuy
Update modeling_deepseekv2.py
10c913d verified 6 months ago
  • .ipynb_checkpoints
    initial upload 6 months ago
  • assets
    initial upload 6 months ago
  • .gitattributes
    1.78 kB
    initial upload 6 months ago
  • LICENSE
    1.06 kB
    initial upload 6 months ago
  • README.md
    6.31 kB
    initial upload 6 months ago
  • __init__.py
    12 Bytes
    add init to enable remote import 6 months ago
  • config.json
    2.74 kB
    Update config.json 6 months ago
  • configuration_deepseek_v2.py
    10.6 kB
    initial upload 6 months ago
  • configuration_deepseekocr.py
    2.03 kB
    Update configuration_deepseekocr.py 6 months ago
  • conversation.py
    9.25 kB
    initial upload 6 months ago
  • deepencoder.py
    38 kB
    initial upload 6 months ago
  • model-00001-of-000001.safetensors
    6.67 GB
    xet
    initial upload 6 months ago
  • model.safetensors.index.json
    247 kB
    initial upload 6 months ago
  • modeling_deepseekocr.py
    40.1 kB
    Update modeling_deepseekocr.py 6 months ago
  • modeling_deepseekv2.py
    82.5 kB
    Update modeling_deepseekv2.py 6 months ago
  • processor_config.json
    460 Bytes
    initial upload 6 months ago
  • special_tokens_map.json
    801 Bytes
    initial upload 6 months ago
  • tokenization_deepseekocr.py
    458 Bytes
    initial upload 6 months ago
  • tokenizer.json
    9.98 MB
    initial upload 6 months ago
  • tokenizer_config.json
    166 kB
    initial upload 6 months ago