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

  • Log In
  • Sign Up

Thatphum
/
got-ocr-2-0-fixed

Image-Text-to-Text
Transformers
Safetensors
multilingual
got_ocr2
got
vision-language
ocr2.0
Model card Files Files and versions
xet
Community

Instructions to use Thatphum/got-ocr-2-0-fixed with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • Transformers

    How to use Thatphum/got-ocr-2-0-fixed with Transformers:

    # Use a pipeline as a high-level helper
    from transformers import pipeline
    
    pipe = pipeline("image-text-to-text", model="Thatphum/got-ocr-2-0-fixed")
    # Load model directly
    from transformers import AutoProcessor, AutoModelForImageTextToText
    
    processor = AutoProcessor.from_pretrained("Thatphum/got-ocr-2-0-fixed")
    model = AutoModelForImageTextToText.from_pretrained("Thatphum/got-ocr-2-0-fixed")
  • Notebooks
  • Google Colab
  • Kaggle
  • Local Apps
  • vLLM

    How to use Thatphum/got-ocr-2-0-fixed with vLLM:

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

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

    How to use Thatphum/got-ocr-2-0-fixed with Docker Model Runner:

    docker model run hf.co/Thatphum/got-ocr-2-0-fixed
got-ocr-2-0-fixed
1.45 GB
Ctrl+K
Ctrl+K
  • 1 contributor
History: 15 commits
Thatphum's picture
Thatphum
Upload model.safetensors
9cb8663 verified 8 months ago
  • assets
    Upload folder using huggingface_hub 9 months ago
  • .DS_Store
    6.15 kB
    Upload folder using huggingface_hub 9 months ago
  • .gitattributes
    1.57 kB
    Upload tokenizer.json 9 months ago
  • README.md
    12.1 kB
    Upload folder using huggingface_hub 9 months ago
  • config.json
    608 Bytes
    Upload folder using huggingface_hub 9 months ago
  • generation_config.json
    74 Bytes
    Upload folder using huggingface_hub 9 months ago
  • model.safetensors
    1.43 GB
    xet
    Upload model.safetensors 8 months ago
  • preprocessor_config.json
    439 Bytes
    Upload folder using huggingface_hub 9 months ago
  • special_tokens_map.json
    213 Bytes
    Upload folder using huggingface_hub 9 months ago
  • tokenizer.json
    18.7 MB
    xet
    Upload tokenizer.json 9 months ago
  • tokenizer_config.json
    39.2 kB
    Upload folder using huggingface_hub 9 months ago