Instructions to use YanweiLi/MGM-34B-HD with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use YanweiLi/MGM-34B-HD with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="YanweiLi/MGM-34B-HD") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("YanweiLi/MGM-34B-HD", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use YanweiLi/MGM-34B-HD with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "YanweiLi/MGM-34B-HD" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "YanweiLi/MGM-34B-HD", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/YanweiLi/MGM-34B-HD
- SGLang
How to use YanweiLi/MGM-34B-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-34B-HD" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "YanweiLi/MGM-34B-HD", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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-34B-HD" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "YanweiLi/MGM-34B-HD", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use YanweiLi/MGM-34B-HD with Docker Model Runner:
docker model run hf.co/YanweiLi/MGM-34B-HD
| tags: | |
| - vision-language model | |
| - llama | |
| - yi | |
| - generation | |
| datasets: | |
| - YanweiLi/MGM-Instruction | |
| # MGM-34B-HD Model Card | |
| <a href='https://github.com/dvlab-research/MGM'><img src='https://img.shields.io/badge/Project-Code-violet'></a> | |
| <a href='https://mini-gemini.github.io/'><img src='https://img.shields.io/badge/Project-Page-Green'></a> | |
| <a href='https://arxiv.org/pdf/2403.18814.pdf'><img src='https://img.shields.io/badge/Paper-Arxiv-red'></a> | |
| ## 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. | |
| You can also try our other MGM series models: | |
| Normal resolution setting: [MGM-2B](https://huggingface.co/YanweiLi/MGM-2B), [MGM-7B](https://huggingface.co/YanweiLi/MGM-7B), [MGM-13B](https://huggingface.co/YanweiLi/MGM-13B), [MGM-8x7B](https://huggingface.co/YanweiLi/MGM-8x7B), [MGM-34B](https://huggingface.co/YanweiLi/MGM-34B) | |
| High resolution setting: [MGM-7B-HD](https://huggingface.co/YanweiLi/MGM-7B-HD), [MGM-13B-HD](https://huggingface.co/YanweiLi/MGM-13B-HD), [MGM-8x7B-HD](https://huggingface.co/YanweiLi/MGM-8x7B-HD) | |
| **Model type:** | |
| MGM is an open-source chatbot trained by fine-tuning Nous-Hermes-2-Yi-34B 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 Nous-Hermes-2-Yi-34B | |
| **Model date:** | |
| MGM-34B-HD was trained on 03/2024. | |
| ## License | |
| Nous-Hermes-2-Yi-34B is licensed under the apache-2.0 License, | |
| **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](https://huggingface.co/datasets/YanweiLi/MGM-Instruction) dataset, please to the [Github](https://github.com/dvlab-research/MGM) for more detail. | |
| ## Acknowledgement | |
| This project is not affiliated with Google LLC. |