Instructions to use YanweiLi/MGM-2B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use YanweiLi/MGM-2B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="YanweiLi/MGM-2B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("YanweiLi/MGM-2B", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use YanweiLi/MGM-2B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "YanweiLi/MGM-2B" # 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-2B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/YanweiLi/MGM-2B
- SGLang
How to use YanweiLi/MGM-2B 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-2B" \ --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-2B", "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-2B" \ --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-2B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use YanweiLi/MGM-2B with Docker Model Runner:
docker model run hf.co/YanweiLi/MGM-2B
Update README.md
Browse files
README.md
CHANGED
|
@@ -16,9 +16,9 @@ datasets:
|
|
| 16 |
Mini-Gemini supports a series of dense and MoE Large Language Models (LLMs) from 2B to 34B with HD image understanding, reasoning, and generation simultaneously.
|
| 17 |
You can also try our other Mini-Gemini series models:
|
| 18 |
|
| 19 |
-
Normal resolution setting: [Mini-Gemini-7B](https://huggingface.co/YanweiLi/Mini-Gemini-7B), [Mini-Gemini-13B](https://huggingface.co/YanweiLi/Mini-Gemini-13B), [Mini-Gemini-8x7B](https://huggingface.co/YanweiLi/Mini-Gemini-8x7B), [Mini-Gemini-34B](https://huggingface.co/YanweiLi/Mini-Gemini-
|
| 20 |
|
| 21 |
-
High resolution setting: [Mini-Gemini-7B-HD](https://huggingface.co/YanweiLi/Mini-Gemini-7B-HD), [Mini-Gemini-13B](https://huggingface.co/YanweiLi/Mini-Gemini-13B-HD), [Mini-Gemini-8x7B-HD](https://huggingface.co/YanweiLi/Mini-Gemini-8x7B-HD), [Mini-Gemini-34B-HD](https://huggingface.co/YanweiLi/Mini-Gemini-
|
| 22 |
|
| 23 |
**Model type:**
|
| 24 |
Mini-Gemini is an open-source chatbot trained by fine-tuning Gemma on GPT-generated multimodal instruction-following data.
|
|
|
|
| 16 |
Mini-Gemini supports a series of dense and MoE Large Language Models (LLMs) from 2B to 34B with HD image understanding, reasoning, and generation simultaneously.
|
| 17 |
You can also try our other Mini-Gemini series models:
|
| 18 |
|
| 19 |
+
Normal resolution setting: [Mini-Gemini-7B](https://huggingface.co/YanweiLi/Mini-Gemini-7B), [Mini-Gemini-13B](https://huggingface.co/YanweiLi/Mini-Gemini-13B), [Mini-Gemini-8x7B](https://huggingface.co/YanweiLi/Mini-Gemini-8x7B), [Mini-Gemini-34B](https://huggingface.co/YanweiLi/Mini-Gemini-34B)
|
| 20 |
|
| 21 |
+
High resolution setting: [Mini-Gemini-7B-HD](https://huggingface.co/YanweiLi/Mini-Gemini-7B-HD), [Mini-Gemini-13B](https://huggingface.co/YanweiLi/Mini-Gemini-13B-HD), [Mini-Gemini-8x7B-HD](https://huggingface.co/YanweiLi/Mini-Gemini-8x7B-HD), [Mini-Gemini-34B-HD](https://huggingface.co/YanweiLi/Mini-Gemini-34B-HD)
|
| 22 |
|
| 23 |
**Model type:**
|
| 24 |
Mini-Gemini is an open-source chatbot trained by fine-tuning Gemma on GPT-generated multimodal instruction-following data.
|