Instructions to use machinelearningzuu/sinhala-book-captioning-repo with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use machinelearningzuu/sinhala-book-captioning-repo with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="machinelearningzuu/sinhala-book-captioning-repo")# Load model directly from transformers import AutoProcessor, AutoModelForImageTextToText processor = AutoProcessor.from_pretrained("machinelearningzuu/sinhala-book-captioning-repo") model = AutoModelForImageTextToText.from_pretrained("machinelearningzuu/sinhala-book-captioning-repo") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use machinelearningzuu/sinhala-book-captioning-repo with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "machinelearningzuu/sinhala-book-captioning-repo" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "machinelearningzuu/sinhala-book-captioning-repo", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/machinelearningzuu/sinhala-book-captioning-repo
- SGLang
How to use machinelearningzuu/sinhala-book-captioning-repo 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 "machinelearningzuu/sinhala-book-captioning-repo" \ --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": "machinelearningzuu/sinhala-book-captioning-repo", "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 "machinelearningzuu/sinhala-book-captioning-repo" \ --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": "machinelearningzuu/sinhala-book-captioning-repo", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use machinelearningzuu/sinhala-book-captioning-repo with Docker Model Runner:
docker model run hf.co/machinelearningzuu/sinhala-book-captioning-repo
sinhala-book-captioning-repo
This model is a fine-tuned version of microsoft/git-base on the None dataset. It achieves the following results on the evaluation set:
- Loss: 0.0053
- Wer Score: 1.3218
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: 5e-05
- train_batch_size: 1
- eval_batch_size: 1
- seed: 42
- gradient_accumulation_steps: 2
- total_train_batch_size: 2
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- num_epochs: 5
Training results
| Training Loss | Epoch | Step | Validation Loss | Wer Score |
|---|---|---|---|---|
| 5.2519 | 0.3 | 50 | 4.5638 | 1.0 |
| 0.6662 | 0.6 | 100 | 0.3785 | 1.0 |
| 0.0214 | 0.9 | 150 | 0.0154 | 0.8161 |
| 0.0123 | 1.2 | 200 | 0.0104 | 0.7356 |
| 0.0077 | 1.5 | 250 | 0.0095 | 0.7126 |
| 0.0091 | 1.8 | 300 | 0.0080 | 0.6897 |
| 0.009 | 2.1 | 350 | 0.0076 | 0.6897 |
| 0.008 | 2.4 | 400 | 0.0076 | 0.7356 |
| 0.0066 | 2.69 | 450 | 0.0071 | 0.6667 |
| 0.0065 | 2.99 | 500 | 0.0068 | 0.6437 |
| 0.0068 | 3.29 | 550 | 0.0063 | 0.6207 |
| 0.0066 | 3.59 | 600 | 0.0063 | 5.1494 |
| 0.0063 | 3.89 | 650 | 0.0061 | 0.6322 |
| 0.0063 | 4.19 | 700 | 0.0055 | 0.5287 |
| 0.007 | 4.49 | 750 | 0.0053 | 0.5172 |
| 0.0054 | 4.79 | 800 | 0.0053 | 1.3218 |
Framework versions
- Transformers 4.30.2
- Pytorch 1.13.0
- Datasets 2.11.0
- Tokenizers 0.13.0
- Downloads last month
- 7
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support