Image-Text-to-Text
Transformers
Safetensors
vision-encoder-decoder
image-to-latex
Generated from Trainer
Instructions to use fklska/trocr_latex with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use fklska/trocr_latex with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="fklska/trocr_latex")# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("fklska/trocr_latex") model = AutoModelForMultimodalLM.from_pretrained("fklska/trocr_latex") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use fklska/trocr_latex with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "fklska/trocr_latex" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "fklska/trocr_latex", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/fklska/trocr_latex
- SGLang
How to use fklska/trocr_latex 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 "fklska/trocr_latex" \ --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": "fklska/trocr_latex", "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 "fklska/trocr_latex" \ --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": "fklska/trocr_latex", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use fklska/trocr_latex with Docker Model Runner:
docker model run hf.co/fklska/trocr_latex
- Xet hash:
- 7a7a531f97292898a2798e83d81ca3e785925d6ec57eaa76e16b80030e6c4987
- Size of remote file:
- 5.39 kB
- SHA256:
- 49799c2f553465838fa1d9ddafc572132ed326c7046772b9c938c05b3788eb60
·
Xet efficiently stores Large Files inside Git, intelligently splitting files into unique chunks and accelerating uploads and downloads. More info.