Instructions to use LinpengS/git-base-pokemon with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use LinpengS/git-base-pokemon with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="LinpengS/git-base-pokemon")# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("LinpengS/git-base-pokemon") model = AutoModelForMultimodalLM.from_pretrained("LinpengS/git-base-pokemon", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use LinpengS/git-base-pokemon with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "LinpengS/git-base-pokemon" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "LinpengS/git-base-pokemon", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/LinpengS/git-base-pokemon
- SGLang
How to use LinpengS/git-base-pokemon 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 "LinpengS/git-base-pokemon" \ --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": "LinpengS/git-base-pokemon", "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 "LinpengS/git-base-pokemon" \ --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": "LinpengS/git-base-pokemon", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use LinpengS/git-base-pokemon with Docker Model Runner:
docker model run hf.co/LinpengS/git-base-pokemon
| license: mit | |
| tags: | |
| - generated_from_trainer | |
| datasets: | |
| - imagefolder | |
| model-index: | |
| - name: git-base-pokemon | |
| results: [] | |
| <!-- This model card has been generated automatically according to the information the Trainer had access to. You | |
| should probably proofread and complete it, then remove this comment. --> | |
| # git-base-pokemon | |
| This model is a fine-tuned version of [microsoft/git-base](https://huggingface.co/microsoft/git-base) on the imagefolder dataset. | |
| It achieves the following results on the evaluation set: | |
| - Loss: 0.0407 | |
| - Wer Score: 2.1746 | |
| ## 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: 16 | |
| - eval_batch_size: 16 | |
| - seed: 42 | |
| - gradient_accumulation_steps: 2 | |
| - total_train_batch_size: 32 | |
| - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 | |
| - lr_scheduler_type: linear | |
| - num_epochs: 50 | |
| - mixed_precision_training: Native AMP | |
| ### Training results | |
| | Training Loss | Epoch | Step | Validation Loss | Wer Score | | |
| |:-------------:|:-----:|:----:|:---------------:|:---------:| | |
| | 7.3192 | 2.13 | 50 | 4.4908 | 21.3506 | | |
| | 2.2486 | 4.26 | 100 | 0.3526 | 10.3803 | | |
| | 0.1047 | 6.38 | 150 | 0.0321 | 0.3635 | | |
| | 0.0222 | 8.51 | 200 | 0.0298 | 0.6636 | | |
| | 0.0145 | 10.64 | 250 | 0.0286 | 2.1759 | | |
| | 0.0081 | 12.77 | 300 | 0.0321 | 2.9690 | | |
| | 0.004 | 14.89 | 350 | 0.0340 | 2.2962 | | |
| | 0.002 | 17.02 | 400 | 0.0356 | 2.1837 | | |
| | 0.0012 | 19.15 | 450 | 0.0370 | 3.1501 | | |
| | 0.0009 | 21.28 | 500 | 0.0379 | 2.5821 | | |
| | 0.0007 | 23.4 | 550 | 0.0382 | 2.7995 | | |
| | 0.0006 | 25.53 | 600 | 0.0386 | 2.8318 | | |
| | 0.0006 | 27.66 | 650 | 0.0387 | 2.4541 | | |
| | 0.0006 | 29.79 | 700 | 0.0390 | 2.6404 | | |
| | 0.0006 | 31.91 | 750 | 0.0395 | 2.5614 | | |
| | 0.0006 | 34.04 | 800 | 0.0395 | 2.5317 | | |
| | 0.0006 | 36.17 | 850 | 0.0399 | 2.5886 | | |
| | 0.0006 | 38.3 | 900 | 0.0403 | 2.3829 | | |
| | 0.0006 | 40.43 | 950 | 0.0404 | 2.2937 | | |
| | 0.0006 | 42.55 | 1000 | 0.0404 | 2.2173 | | |
| | 0.0006 | 44.68 | 1050 | 0.0406 | 2.1617 | | |
| | 0.0006 | 46.81 | 1100 | 0.0406 | 2.1669 | | |
| | 0.0006 | 48.94 | 1150 | 0.0407 | 2.1746 | | |
| ### Framework versions | |
| - Transformers 4.27.4 | |
| - Pytorch 1.13.1 | |
| - Datasets 2.11.0 | |
| - Tokenizers 0.13.3 | |