Image-Text-to-Text
Transformers
TensorBoard
Safetensors
vision-encoder-decoder
Generated from Trainer
Instructions to use emisilab/model-ocr-ktp-v1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use emisilab/model-ocr-ktp-v1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="emisilab/model-ocr-ktp-v1")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("emisilab/model-ocr-ktp-v1") model = AutoModelForMultimodalLM.from_pretrained("emisilab/model-ocr-ktp-v1", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use emisilab/model-ocr-ktp-v1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "emisilab/model-ocr-ktp-v1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "emisilab/model-ocr-ktp-v1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/emisilab/model-ocr-ktp-v1
- SGLang
How to use emisilab/model-ocr-ktp-v1 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 "emisilab/model-ocr-ktp-v1" \ --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": "emisilab/model-ocr-ktp-v1", "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 "emisilab/model-ocr-ktp-v1" \ --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": "emisilab/model-ocr-ktp-v1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use emisilab/model-ocr-ktp-v1 with Docker Model Runner:
docker model run hf.co/emisilab/model-ocr-ktp-v1
Training in progress, epoch 1
Browse files
config.json
CHANGED
|
@@ -188,5 +188,5 @@
|
|
| 188 |
"pad_token_id": 1,
|
| 189 |
"tie_word_embeddings": false,
|
| 190 |
"torch_dtype": "float32",
|
| 191 |
-
"transformers_version": "4.39.
|
| 192 |
}
|
|
|
|
| 188 |
"pad_token_id": 1,
|
| 189 |
"tie_word_embeddings": false,
|
| 190 |
"torch_dtype": "float32",
|
| 191 |
+
"transformers_version": "4.39.1"
|
| 192 |
}
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 809226392
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:842fec74e97fd42f3f7e8c093a6bbd95dd7b56113a0e65171432013afdb2113d
|
| 3 |
size 809226392
|
runs/Mar25_10-16-32_515a9fb0dfd2/events.out.tfevents.1711361798.515a9fb0dfd2.14131.0
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0999bb10827b88aae383364af37c379e50c478440b0de99670c565500ad9a859
|
| 3 |
+
size 9263
|
training_args.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4984
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:86f53e2142989ce91051a41f06ca08645e0b744ca3a0e3196adbbd463933aaf0
|
| 3 |
size 4984
|