Instructions to use Sprakbanken/trocr_smi_nor_pred_synth with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Sprakbanken/trocr_smi_nor_pred_synth with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="Sprakbanken/trocr_smi_nor_pred_synth")# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("Sprakbanken/trocr_smi_nor_pred_synth") model = AutoModelForMultimodalLM.from_pretrained("Sprakbanken/trocr_smi_nor_pred_synth") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Sprakbanken/trocr_smi_nor_pred_synth with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Sprakbanken/trocr_smi_nor_pred_synth" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Sprakbanken/trocr_smi_nor_pred_synth", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Sprakbanken/trocr_smi_nor_pred_synth
- SGLang
How to use Sprakbanken/trocr_smi_nor_pred_synth 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 "Sprakbanken/trocr_smi_nor_pred_synth" \ --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": "Sprakbanken/trocr_smi_nor_pred_synth", "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 "Sprakbanken/trocr_smi_nor_pred_synth" \ --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": "Sprakbanken/trocr_smi_nor_pred_synth", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Sprakbanken/trocr_smi_nor_pred_synth with Docker Model Runner:
docker model run hf.co/Sprakbanken/trocr_smi_nor_pred_synth
Update README.md
Browse files
README.md
CHANGED
|
@@ -55,7 +55,7 @@ See our paper for more details.
|
|
| 55 |
### Model Sources
|
| 56 |
|
| 57 |
- **Repository:** https://github.com/Sprakbanken/nodalida25_sami_ocr
|
| 58 |
-
- **Paper:** "Enstad T, Trosterud T, Røsok MI, Beyer Y, Roald M. Comparative analysis of optical character recognition methods for Sámi texts from the National Library of Norway. Accepted for publication in Proceedings of the 25th Nordic Conference on Computational Linguistics (NoDaLiDa) 2025."
|
| 59 |
|
| 60 |
|
| 61 |
## Collection details
|
|
|
|
| 55 |
### Model Sources
|
| 56 |
|
| 57 |
- **Repository:** https://github.com/Sprakbanken/nodalida25_sami_ocr
|
| 58 |
+
- **Paper:** "Enstad T, Trosterud T, Røsok MI, Beyer Y, Roald M. Comparative analysis of optical character recognition methods for Sámi texts from the National Library of Norway. Accepted for publication in Proceedings of the 25th Nordic Conference on Computational Linguistics (NoDaLiDa) 2025." [preprint](https://arxiv.org/abs/2501.07300)
|
| 59 |
|
| 60 |
|
| 61 |
## Collection details
|