Instructions to use lbin2021/my-lecture-ocr with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use lbin2021/my-lecture-ocr with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="lbin2021/my-lecture-ocr")# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("lbin2021/my-lecture-ocr") model = AutoModelForMultimodalLM.from_pretrained("lbin2021/my-lecture-ocr", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use lbin2021/my-lecture-ocr with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "lbin2021/my-lecture-ocr" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "lbin2021/my-lecture-ocr", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/lbin2021/my-lecture-ocr
- SGLang
How to use lbin2021/my-lecture-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 "lbin2021/my-lecture-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": "lbin2021/my-lecture-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 "lbin2021/my-lecture-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": "lbin2021/my-lecture-ocr", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use lbin2021/my-lecture-ocr with Docker Model Runner:
docker model run hf.co/lbin2021/my-lecture-ocr
my-lecture-ocr
This model is a fine-tuned version of lbin2021/my-lecture-ocr on an unknown dataset. It achieves the following results on the evaluation set:
- Loss: 0.3525
- Cer: 0.7297
Model description
More information needed
Intended uses & limitations
More information needed
Training and evaluation data
More information needed
Training procedure
Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 3e-05
- train_batch_size: 8
- eval_batch_size: 8
- seed: 42
- optimizer: Use OptimizerNames.ADAMW_TORCH_FUSED with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
- lr_scheduler_type: linear
- num_epochs: 3
- mixed_precision_training: Native AMP
Training results
| Training Loss | Epoch | Step | Validation Loss | Cer |
|---|---|---|---|---|
| No log | 0.16 | 200 | 0.6003 | 0.7381 |
| No log | 0.32 | 400 | 0.5825 | 0.7400 |
| 0.6879 | 0.48 | 600 | 0.5637 | 0.7371 |
| 0.6879 | 0.64 | 800 | 0.5127 | 0.7365 |
| 0.6150 | 0.8 | 1000 | 0.4855 | 0.7378 |
| 0.6150 | 0.96 | 1200 | 0.4794 | 0.7356 |
| 0.6150 | 1.12 | 1400 | 0.4669 | 0.7323 |
| 0.5016 | 1.28 | 1600 | 0.4416 | 0.7343 |
| 0.5016 | 1.44 | 1800 | 0.4361 | 0.7324 |
| 0.4392 | 1.6 | 2000 | 0.4196 | 0.7301 |
| 0.4392 | 1.76 | 2200 | 0.4000 | 0.7355 |
| 0.4392 | 1.92 | 2400 | 0.3955 | 0.7314 |
| 0.3985 | 2.08 | 2600 | 0.3870 | 0.7303 |
| 0.3985 | 2.24 | 2800 | 0.3801 | 0.7298 |
| 0.3166 | 2.4 | 3000 | 0.3731 | 0.7305 |
| 0.3166 | 2.56 | 3200 | 0.3604 | 0.7299 |
| 0.3166 | 2.7200 | 3400 | 0.3553 | 0.7316 |
| 0.2999 | 2.88 | 3600 | 0.3525 | 0.7297 |
Framework versions
- Transformers 5.0.0
- Pytorch 2.10.0+cu128
- Datasets 4.0.0
- Tokenizers 0.22.2
- Downloads last month
- 4
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support
Model tree for lbin2021/my-lecture-ocr
Unable to build the model tree, the base model loops to the model itself. Learn more.