Instructions to use VIM-Bench/v-mllm-7b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use VIM-Bench/v-mllm-7b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="VIM-Bench/v-mllm-7b")# Load model directly from transformers import AutoProcessor, AutoModelForCausalLM processor = AutoProcessor.from_pretrained("VIM-Bench/v-mllm-7b") model = AutoModelForCausalLM.from_pretrained("VIM-Bench/v-mllm-7b") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use VIM-Bench/v-mllm-7b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "VIM-Bench/v-mllm-7b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "VIM-Bench/v-mllm-7b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/VIM-Bench/v-mllm-7b
- SGLang
How to use VIM-Bench/v-mllm-7b 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 "VIM-Bench/v-mllm-7b" \ --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": "VIM-Bench/v-mllm-7b", "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 "VIM-Bench/v-mllm-7b" \ --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": "VIM-Bench/v-mllm-7b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use VIM-Bench/v-mllm-7b with Docker Model Runner:
docker model run hf.co/VIM-Bench/v-mllm-7b
v-MLLM Model Card
Model details
Model type: v-MLLM is an open-source MLLM trained on Visual-Modality Instruction (VIM) corpus, it can robustly follow the text-modality instructions and visual-modality instructions.
Model date: v-MLLM-7B was trained on January 2024.
Github for more information: https://github.com/VIM-Bench/VIM_TOOL
License
v-MLLM is licensed under the LLAMA 2 Community License, Copyright (c) Meta Platforms, Inc. All Rights Reserved.
Intended use
Primary intended uses: The primary use of v-MLLM is research on multimodal large language models.
Primary intended users: The primary intended users of the model are researchers in computer vision, natural language processing, machine learning, and artificial intelligence.
Training dataset
- 846k VIM corpus based on LVIS-Instruct4V corpus.
Citation
Please kindly cite our paper if you find our resources useful:
@misc{li2024text,
title={Text as Images: Can Multimodal Large Language Models Follow Printed Instructions in Pixels?},
author={Xiujun Li and Yujie Lu and Zhe Gan and Jianfeng Gao and William Yang Wang and Yejin Choi},
year={2024},
eprint={2311.17647},
archivePrefix={arXiv},
primaryClass={cs.CV}
}
@misc{lu2023vim,
title={VIM: Probing Multimodal Large Language Models for Visual Embedded Instruction Following},
author={Yujie Lu and Xiujun Li and William Yang Wang and Yejin Choi},
year={2023},
eprint={2311.17647},
archivePrefix={arXiv},
primaryClass={cs.CV}
}
- Downloads last month
- 9