Instructions to use yzk/trocr-large-printed-vedic with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use yzk/trocr-large-printed-vedic with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="yzk/trocr-large-printed-vedic")# Load model directly from transformers import AutoTokenizer, AutoModelForImageTextToText tokenizer = AutoTokenizer.from_pretrained("yzk/trocr-large-printed-vedic") model = AutoModelForImageTextToText.from_pretrained("yzk/trocr-large-printed-vedic") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use yzk/trocr-large-printed-vedic with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "yzk/trocr-large-printed-vedic" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "yzk/trocr-large-printed-vedic", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/yzk/trocr-large-printed-vedic
- SGLang
How to use yzk/trocr-large-printed-vedic 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 "yzk/trocr-large-printed-vedic" \ --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": "yzk/trocr-large-printed-vedic", "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 "yzk/trocr-large-printed-vedic" \ --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": "yzk/trocr-large-printed-vedic", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use yzk/trocr-large-printed-vedic with Docker Model Runner:
docker model run hf.co/yzk/trocr-large-printed-vedic
Model Card for Model ID
OCR for Vedic texts printed in Devanagari.
Note This version is limited to a type of texts with accents marked by vertical lines over Devanagari characters.
Model Details
Model Description
This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.
- Developed by: https://huggingface.co/yzk
- Funded by: https://kaken.nii.ac.jp/en/grant/KAKENHI-PROJECT-23K18646/
Training Details
Training Data
Schroeder's edition of Maitrāyaṇī Sam̐hitā: https://huggingface.co/datasets/yzk/veda-ocr-ms (will be public)
Training Hyperparameters
- Training regime: [More Information Needed]
params: max_length: 512 train_batch_size: 16 eval_batch_size: 16 learning_rate: 2e-5 weight_decay: 0.01 save_total_limit: 3 num_train_epochs: 20 logging_steps: 2 save_steps: 2000 eval_steps: 200Evaluation
Testing Data, Factors & Metrics
Testing Data
[More Information Needed]
Factors
[More Information Needed]
Metrics
[More Information Needed]
Results
[More Information Needed]
Summary
Citation [optional]
BibTeX:
[More Information Needed]
APA:
[More Information Needed]
- Downloads last month
- 8
Model tree for yzk/trocr-large-printed-vedic
Base model
microsoft/trocr-large-printed