Run this model with HF Jobs
Run habibi26/ocr_train on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/habibi26/ocr_train. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/habibi26/ocr_train on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/habibi26/ocr_train. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/habibi26/ocr_train. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
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")# pip install -U transformers accelerate # 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
Training in progress, epoch 1
Browse filesFiles changed (9)
- config.jsonAdded+27
- model.safetensorsAdded+3
- runs/Jul23_06-42-31_2ad50ddec206/events.out.tfevents.1721716952.2ad50ddec206.34.0Added+3
- runs/Jul23_06-43-17_2ad50ddec206/events.out.tfevents.1721716998.2ad50ddec206.34.1Added+3
- runs/Jul23_06-44-09_2ad50ddec206/events.out.tfevents.1721717050.2ad50ddec206.34.2Added+3
- runs/Jul23_06-45-02_2ad50ddec206/events.out.tfevents.1721717103.2ad50ddec206.34.3Added+3
- runs/Jul23_06-45-19_2ad50ddec206/events.out.tfevents.1721717119.2ad50ddec206.34.4Added+3
- runs/Jul23_06-47-09_2ad50ddec206/events.out.tfevents.1721717230.2ad50ddec206.34.5Added+3
- training_args.binAdded+3
123456789101112131415161718192021222324252627{ "_name_or_path": "Salesforce/blip-image-captioning-base", "architectures": [ "BlipForConditionalGeneration" ], "image_text_hidden_size": 256, "initializer_factor": 1.0, "initializer_range": 0.02, "label_smoothing": 0.0, "logit_scale_init_value": 2.6592, "model_type": "blip", "projection_dim": 512, "text_config": { "initializer_factor": 1.0, "model_type": "blip_text_model", "num_attention_heads": 12 }, "torch_dtype": "float32", "transformers_version": "4.41.2", "vision_config": { "dropout": 0.0, "initializer_factor": 1.0, "initializer_range": 0.02, "model_type": "blip_vision_model", "num_channels": 3 }}123version https://git-lfs.github.com/spec/v1oid sha256:41a358c373bb50419c1fc5dad8c40a283bf4b70001cba90a7624752cc1e1a7f7size 989717056123version https://git-lfs.github.com/spec/v1oid sha256:65764a37edff054754f183eabf51894ed10baaf9adb59479d850b3660146cf37size 4842123version https://git-lfs.github.com/spec/v1oid sha256:adaa8971f1db18aeb617e0ee91a38a0b76d888404492cfef7368790d1f77b982size 4842123version https://git-lfs.github.com/spec/v1oid sha256:819e7b7305ad601e41429a2e7e5a27fd3c1a2eb13072db7e9f46b1ef8b59a419size 4842123version https://git-lfs.github.com/spec/v1oid sha256:7d40c07d4a37884bfe26248a83e82c47d133922b193bd6ff75cc5075e66accbdsize 4829123version https://git-lfs.github.com/spec/v1oid sha256:032cd1d1812cde99269ac08b9b8a7df7bb4d0362de33c5188d9d694415b1e685size 5036123version https://git-lfs.github.com/spec/v1oid sha256:2a38707264e06eeae95aabb181343d48085ecab565c05a396a4ee206b7bee9desize 5361123version https://git-lfs.github.com/spec/v1oid sha256:b8f07544143dc337609dd0271cb12739c6b1692d69d000d32968e51389ca8ff8size 5112config.jsonAdded+27
model.safetensorsAdded+3
runs/Jul23_06-42-31_2ad50ddec206/events.out.tfevents.1721716952.2ad50ddec206.34.0Added+3
runs/Jul23_06-43-17_2ad50ddec206/events.out.tfevents.1721716998.2ad50ddec206.34.1Added+3
runs/Jul23_06-44-09_2ad50ddec206/events.out.tfevents.1721717050.2ad50ddec206.34.2Added+3
runs/Jul23_06-45-02_2ad50ddec206/events.out.tfevents.1721717103.2ad50ddec206.34.3Added+3
runs/Jul23_06-45-19_2ad50ddec206/events.out.tfevents.1721717119.2ad50ddec206.34.4Added+3
runs/Jul23_06-47-09_2ad50ddec206/events.out.tfevents.1721717230.2ad50ddec206.34.5Added+3
training_args.binAdded+3