Instructions to use kariver/git-base-food with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use kariver/git-base-food with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="kariver/git-base-food")# Load model directly from transformers import AutoProcessor, AutoModelForImageTextToText processor = AutoProcessor.from_pretrained("kariver/git-base-food") model = AutoModelForImageTextToText.from_pretrained("kariver/git-base-food") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use kariver/git-base-food with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "kariver/git-base-food" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "kariver/git-base-food", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/kariver/git-base-food
- SGLang
How to use kariver/git-base-food 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 "kariver/git-base-food" \ --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": "kariver/git-base-food", "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 "kariver/git-base-food" \ --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": "kariver/git-base-food", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use kariver/git-base-food with Docker Model Runner:
docker model run hf.co/kariver/git-base-food
git-base-food
This model is a fine-tuned version of microsoft/git-base on the imagefolder dataset. It achieves the following results on the evaluation set:
- Loss: 0.0444
- Wer Score: 10.0470
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: 8
- eval_batch_size: 8
- seed: 42
- gradient_accumulation_steps: 2
- total_train_batch_size: 16
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- num_epochs: 20
Training results
| Training Loss | Epoch | Step | Validation Loss | Wer Score |
|---|---|---|---|---|
| No log | 1.05 | 20 | 7.3069 | 113.3758 |
| No log | 2.11 | 40 | 5.3566 | 3.2282 |
| No log | 3.16 | 60 | 3.4409 | 1.1879 |
| No log | 4.21 | 80 | 1.7218 | 1.1007 |
| No log | 5.26 | 100 | 0.5834 | 1.0872 |
| No log | 6.32 | 120 | 0.1684 | 1.3020 |
| No log | 7.37 | 140 | 0.0720 | 2.9732 |
| No log | 8.42 | 160 | 0.0507 | 2.0805 |
| No log | 9.47 | 180 | 0.0467 | 3.0336 |
| No log | 10.53 | 200 | 0.0415 | 10.6107 |
| No log | 11.58 | 220 | 0.0425 | 7.7383 |
| No log | 12.63 | 240 | 0.0426 | 14.1745 |
| No log | 13.68 | 260 | 0.0434 | 6.0067 |
| No log | 14.74 | 280 | 0.0447 | 10.5503 |
| No log | 15.79 | 300 | 0.0434 | 9.1678 |
| No log | 16.84 | 320 | 0.0439 | 10.8591 |
| No log | 17.89 | 340 | 0.0446 | 10.0470 |
| No log | 18.95 | 360 | 0.0444 | 10.1208 |
| No log | 20.0 | 380 | 0.0444 | 10.0470 |
Framework versions
- Transformers 4.34.1
- Pytorch 2.1.0+cu118
- Datasets 2.14.5
- Tokenizers 0.14.1
- Downloads last month
- 9
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support
Model tree for kariver/git-base-food
Base model
microsoft/git-base