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, step 50
Browse filesFiles changed (4)
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}}12345678910111213141516171819202122232425262728293031323334{"_name_or_path": "microsoft/git-base","architectures": ["GitForCausalLM"],"attention_probs_dropout_prob": 0.1,"bos_token_id": 101,"classifier_dropout": null,"eos_token_id": 102,"hidden_act": "gelu","hidden_dropout_prob": 0.1,"hidden_size": 768,"initializer_range": 0.02,"intermediate_size": 3072,"layer_norm_eps": 1e-12,"max_position_embeddings": 1024,"model_type": "git","num_attention_heads": 12,"num_hidden_layers": 6,"num_image_with_embedding": null,"pad_token_id": 0,"position_embedding_type": "absolute","tie_word_embeddings": false,"torch_dtype": "float32","transformers_version": "4.41.2","use_cache": true,"vision_config": {"dropout": 0.0,"initializer_factor": 1.0,"model_type": "git_vision_model","projection_dim": 512},"vocab_size": 30522}
123version https://git-lfs.github.com/spec/v1oid sha256:49c03479b04f2c0e6e032df5c5866b3f22f106410f5ee7962db6530a47c217bfsize 989717056123version https://git-lfs.github.com/spec/v1oid sha256:fbf6d433eeaf13e3d23ff0e40f381eb3710cf15ddb7a6921f49964a97b3baf29size 706516040
123version https://git-lfs.github.com/spec/v1oid sha256:ae3c2443eeb687c562951e7093690458e6a7fd05e23c056d82755e79fba5798csize 5483123version https://git-lfs.github.com/spec/v1oid sha256:39d8e0f36af0000e84ac4da697f3de7a674c06cbd291a33571202f57ea773c59size 5112123version https://git-lfs.github.com/spec/v1oid sha256:eb49cbc000cf2f61e3a30e6a10efd066e60f90e71b1faa2c5d42726c5eb3f432size 5112
config.json+24-17
model.safetensors+2-2
runs/Jul23_20-52-08_e3dd68bc9c3b/events.out.tfevents.1721767929.e3dd68bc9c3b.34.11Added+3
training_args.bin+1-1