Hugging Face's logo Hugging Face
  • Models
  • Datasets
  • Spaces
  • Buckets new
  • Docs
  • Enterprise
  • Pricing
    • Website
      • Tasks
      • HuggingChat
      • Collections
      • Languages
      • Organizations
    • Community
      • Blog
      • Posts
      • Daily Papers
      • Hardware
      • Learn
      • Discord
      • Forum
      • GitHub
    • Solutions
      • Team & Enterprise
      • Hugging Face PRO
      • Enterprise Support
      • Inference Providers
      • Inference Endpoints
      • Storage Buckets

  • Log In
  • Sign Up

habibi26
/
ocr_train

Image-Text-to-Text
Transformers
TensorBoard
Safetensors
git
Model card Files Files and versions
xet
Metrics Training metrics Community

Instructions to use habibi26/ocr_train with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • Transformers

    How to use habibi26/ocr_train with Transformers:

    # Use a pipeline as a high-level helper
    from transformers import pipeline
    
    pipe = pipeline("image-text-to-text", model="habibi26/ocr_train")
    # Load model directly
    from transformers import AutoProcessor, AutoModelForMultimodalLM
    
    processor = AutoProcessor.from_pretrained("habibi26/ocr_train")
    model = AutoModelForMultimodalLM.from_pretrained("habibi26/ocr_train", device_map="auto")
  • Notebooks
  • Google Colab
  • Kaggle
  • Local Apps Settings
  • vLLM

    How to use habibi26/ocr_train with vLLM:

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

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

    How to use habibi26/ocr_train with Docker Model Runner:

    docker model run hf.co/habibi26/ocr_train
ocr_train
710 MB
Ctrl+K
Ctrl+K
  • 1 contributor
History: 177 commits
habibi26's picture
habibi26
Upload processor
200d577 verified about 2 years ago
  • runs
    Training in progress, step 450 about 2 years ago
  • .gitattributes
    1.52 kB
    initial commit about 2 years ago
  • README.md
    5.17 kB
    Upload processor about 2 years ago
  • adapter_config.json
    659 Bytes
    Training in progress, step 50 about 2 years ago
  • adapter_model.safetensors
    1.77 MB
    xet
    Training in progress, step 450 about 2 years ago
  • config.json
    859 Bytes
    Training in progress, step 50 about 2 years ago
  • model.safetensors
    707 MB
    xet
    Training in progress, step 1000 about 2 years ago
  • preprocessor_config.json
    817 Bytes
    Upload processor about 2 years ago
  • special_tokens_map.json
    695 Bytes
    Upload processor about 2 years ago
  • tokenizer.json
    712 kB
    Upload processor about 2 years ago
  • tokenizer_config.json
    1.4 kB
    Upload processor about 2 years ago
  • training_args.bin

    Detected Pickle imports (10)

    • "transformers.trainer_pt_utils.AcceleratorConfig",
    • "transformers.training_args.TrainingArguments",
    • "torch.device",
    • "accelerate.utils.dataclasses.DistributedType",
    • "__builtin__.getattr",
    • "transformers.trainer_utils.SchedulerType",
    • "transformers.training_args.OptimizerNames",
    • "accelerate.state.PartialState",
    • "transformers.trainer_utils.HubStrategy",
    • "transformers.trainer_utils.IntervalStrategy"

    How to fix it?

    5.18 kB
    xet
    Training in progress, step 50 about 2 years ago
  • vocab.txt
    232 kB
    Upload processor about 2 years ago