Instructions to use YanweiLi/MGM-13B-HD with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use YanweiLi/MGM-13B-HD with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="YanweiLi/MGM-13B-HD")# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("YanweiLi/MGM-13B-HD", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use YanweiLi/MGM-13B-HD with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "YanweiLi/MGM-13B-HD" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "YanweiLi/MGM-13B-HD", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/YanweiLi/MGM-13B-HD
- SGLang
How to use YanweiLi/MGM-13B-HD 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 "YanweiLi/MGM-13B-HD" \ --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": "YanweiLi/MGM-13B-HD", "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 "YanweiLi/MGM-13B-HD" \ --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": "YanweiLi/MGM-13B-HD", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use YanweiLi/MGM-13B-HD with Docker Model Runner:
docker model run hf.co/YanweiLi/MGM-13B-HD
MGM-13B-HD Model Card
Model details
The framework supports a series of dense and MoE Large Language Models (LLMs) from 2B to 34B with HD image understanding, reasoning, and generation simultaneously.
Normal resolution setting: MGM-2B, MGM-7B, MGM-13B, MGM-8x7B, MGM-34B
High resolution setting: MGM-7B-HD, MGM-8x7B-HD, MGM-34B-HD
Model type: MGM is an open-source chatbot trained by fine-tuning LLaMA/Vicuna on GPT-generated multimodal instruction-following data.
It empowers existing frameworks to support HD image understanding, reasoning, and generation simultaneously.
Model version: MGM HD Version with LLM Vicuna-13B-v1.5
Model date: MGM-13B-HD was trained on 03/2024.
License
Llama 2 is licensed under the LLAMA 2 Community License, Copyright (c) Meta Platforms, Inc. All Rights Reserved.
Where to send questions or comments about the model: https://github.com/dvlab-research/MGM/issues
Intended use
Primary intended uses: The primary use is research on large multimodal models and chatbots.
Primary intended users: The primary intended users of the model are researchers and hobbyists in computer vision, natural language processing, machine learning, and artificial intelligence.
Training data
This model is trained based on MGM-Instruction dataset, please to the Github for more detail.
Acknowledgement
This project is not affiliated with Google LLC.
- Downloads last month
- 8