Image-Text-to-Text
Transformers
TensorBoard
Safetensors
paligemma
Generated from Trainer
text-generation-inference
Instructions to use linhtrann21/ft_paligemma_ocr with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use linhtrann21/ft_paligemma_ocr with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="linhtrann21/ft_paligemma_ocr")# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("linhtrann21/ft_paligemma_ocr") model = AutoModelForMultimodalLM.from_pretrained("linhtrann21/ft_paligemma_ocr", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use linhtrann21/ft_paligemma_ocr with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "linhtrann21/ft_paligemma_ocr" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "linhtrann21/ft_paligemma_ocr", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/linhtrann21/ft_paligemma_ocr
- SGLang
How to use linhtrann21/ft_paligemma_ocr 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 "linhtrann21/ft_paligemma_ocr" \ --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": "linhtrann21/ft_paligemma_ocr", "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 "linhtrann21/ft_paligemma_ocr" \ --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": "linhtrann21/ft_paligemma_ocr", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use linhtrann21/ft_paligemma_ocr with Docker Model Runner:
docker model run hf.co/linhtrann21/ft_paligemma_ocr
Training in progress, step 8000
Browse files
model-00001-of-00002.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4985044392
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:09cf2d659c6a5c3926a6b209616dadd6958033eaaa819ed7fb932d8b201ae7bc
|
| 3 |
size 4985044392
|
model-00002-of-00002.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 861970608
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:020eaf4d20d1eb62fac341727e805066df4c6b6aba675ebcc43ae23fd64eccc4
|
| 3 |
size 861970608
|
runs/Dec10_02-42-02_9a6afece985e/events.out.tfevents.1733798702.9a6afece985e.6735.1
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:fcddfc9be5ee832f209c6f5076cec63466f5098ad9e5406b37534bd7d582ed68
|
| 3 |
+
size 22225
|