Instructions to use roomie00/vit-bert-image-captioning with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use roomie00/vit-bert-image-captioning with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="roomie00/vit-bert-image-captioning")# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("roomie00/vit-bert-image-captioning") model = AutoModelForMultimodalLM.from_pretrained("roomie00/vit-bert-image-captioning") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use roomie00/vit-bert-image-captioning with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "roomie00/vit-bert-image-captioning" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "roomie00/vit-bert-image-captioning", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/roomie00/vit-bert-image-captioning
- SGLang
How to use roomie00/vit-bert-image-captioning 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 "roomie00/vit-bert-image-captioning" \ --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": "roomie00/vit-bert-image-captioning", "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 "roomie00/vit-bert-image-captioning" \ --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": "roomie00/vit-bert-image-captioning", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use roomie00/vit-bert-image-captioning with Docker Model Runner:
docker model run hf.co/roomie00/vit-bert-image-captioning
Request for cooperation in a scientific research paper
Hello, I am Aeen Tayebi, active and researcher in the field of deep learning, NLP and large language models. I am planning to prepare a scientific research paper in the field of image captioning, which is used in the encoder of Vision Transformers and in the decoder of BERT language model. While preparing the sources for this article, I came across your model, which made me very happy, and I would like to ask for your help. I want you to be present in this article. If you agree, send the complete information of the model to my e-mail, of course, I mean the detailed information of the evaluation results of your model, and let's start the cooperation. Thank you.
my email address: aeentayebi@gmail.com