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 files- adapter_model.safetensors +1 -1
- runs/Jul24_04-47-32_gurame007/events.out.tfevents.1721771253.gurame007.18056.0 +2 -2
- runs/Jul24_09-15-56_gurame007/events.out.tfevents.1721787357.gurame007.49579.0 +3 -0
- runs/Jul24_09-24-27_gurame007/events.out.tfevents.1721787868.gurame007.52078.0 +3 -0
- runs/Jul24_09-25-36_gurame007/events.out.tfevents.1721787936.gurame007.52370.0 +3 -0
- training_args.bin +2 -2
adapter_model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 1774480
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5cbbd3e8d51703fd588f1199553d1a7fc4a76d35a04a47070d8de15c5273769d
|
| 3 |
size 1774480
|
runs/Jul24_04-47-32_gurame007/events.out.tfevents.1721771253.gurame007.18056.0
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:32ee26014842ed1e5ed6656c139bd8a5a8c56412e2667d92677f4143abbdf813
|
| 3 |
+
size 54342
|
runs/Jul24_09-15-56_gurame007/events.out.tfevents.1721787357.gurame007.49579.0
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8d995b270dc301405d140eb28e5b1bf056f9edaaf38b167be8e2aa5dc4c46fc8
|
| 3 |
+
size 20059
|
runs/Jul24_09-24-27_gurame007/events.out.tfevents.1721787868.gurame007.52078.0
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fad96afbcaa10a05b788426fec29cbad0cd86c2eeabeb38f0162f8fdbf177139
|
| 3 |
+
size 5506
|
runs/Jul24_09-25-36_gurame007/events.out.tfevents.1721787936.gurame007.52370.0
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ccad2bac018df64e8cfda5239f3054b859608b1b11b539afd5cb189f10862c4e
|
| 3 |
+
size 7303
|
training_args.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c49b8d6aa2d240cf4f3e581fc3d01b7b1f159976cd493c3209504d2ff76875c0
|
| 3 |
+
size 5176
|