Instructions to use OpenMOSS-Team/AnyGPT-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use OpenMOSS-Team/AnyGPT-base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="OpenMOSS-Team/AnyGPT-base")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("OpenMOSS-Team/AnyGPT-base") model = AutoModelForCausalLM.from_pretrained("OpenMOSS-Team/AnyGPT-base") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use OpenMOSS-Team/AnyGPT-base with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "OpenMOSS-Team/AnyGPT-base" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "OpenMOSS-Team/AnyGPT-base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/OpenMOSS-Team/AnyGPT-base
- SGLang
How to use OpenMOSS-Team/AnyGPT-base 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 "OpenMOSS-Team/AnyGPT-base" \ --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": "OpenMOSS-Team/AnyGPT-base", "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 "OpenMOSS-Team/AnyGPT-base" \ --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": "OpenMOSS-Team/AnyGPT-base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use OpenMOSS-Team/AnyGPT-base with Docker Model Runner:
docker model run hf.co/OpenMOSS-Team/AnyGPT-base
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,9 +1,7 @@
|
|
| 1 |
-
#
|
| 2 |
<a href='https://junzhan2000.github.io/AnyGPT.github.io/'><img src='https://img.shields.io/badge/Project-Page-Green'></a> <a href='https://arxiv.org/pdf/2402.12226.pdf'><img src='https://img.shields.io/badge/Paper-Arxiv-red'></a> [](https://huggingface.co/datasets/fnlp/AnyInstruct)
|
| 3 |
|
| 4 |
-
|
| 5 |
-
<img src="static/images/logo.png" width="16%"> <br>
|
| 6 |
-
</p>
|
| 7 |
|
| 8 |
## Introduction
|
| 9 |
We introduce AnyGPT, an any-to-any multimodal language model that utilizes discrete representations for the unified processing of various modalities, including speech, text, images, and music. The [base model](https://huggingface.co/fnlp/AnyGPT-base) aligns the four modalities, allowing for intermodal conversions between different modalities and text. Furthermore, we constructed the [AnyInstruct](https://huggingface.co/datasets/fnlp/AnyInstruct) dataset based on various generative models, which contains instructions for arbitrary modal interconversion. Trained on this dataset, our [chat model](https://huggingface.co/fnlp/AnyGPT-chat) can engage in free multimodal conversations, where multimodal data can be inserted at will.
|
|
@@ -15,12 +13,6 @@ Demos are shown in [project page](https://junzhan2000.github.io/AnyGPT.github.io
|
|
| 15 |
[](https://www.youtube.com/watch?v=oW3E3pIsaRg)
|
| 16 |
|
| 17 |
|
| 18 |
-
## Open-Source Checklist
|
| 19 |
-
- [x] Base Model
|
| 20 |
-
- [ ] Chat Model
|
| 21 |
-
- [x] Inference Code
|
| 22 |
-
- [x] Instruction Dataset
|
| 23 |
-
|
| 24 |
## Inference
|
| 25 |
|
| 26 |
### Installation
|
|
|
|
| 1 |
+
# Base model for paper "AnyGPT: Unified Multimodal LLM with Discrete Sequence Modeling"
|
| 2 |
<a href='https://junzhan2000.github.io/AnyGPT.github.io/'><img src='https://img.shields.io/badge/Project-Page-Green'></a> <a href='https://arxiv.org/pdf/2402.12226.pdf'><img src='https://img.shields.io/badge/Paper-Arxiv-red'></a> [](https://huggingface.co/datasets/fnlp/AnyInstruct)
|
| 3 |
|
| 4 |
+
|
|
|
|
|
|
|
| 5 |
|
| 6 |
## Introduction
|
| 7 |
We introduce AnyGPT, an any-to-any multimodal language model that utilizes discrete representations for the unified processing of various modalities, including speech, text, images, and music. The [base model](https://huggingface.co/fnlp/AnyGPT-base) aligns the four modalities, allowing for intermodal conversions between different modalities and text. Furthermore, we constructed the [AnyInstruct](https://huggingface.co/datasets/fnlp/AnyInstruct) dataset based on various generative models, which contains instructions for arbitrary modal interconversion. Trained on this dataset, our [chat model](https://huggingface.co/fnlp/AnyGPT-chat) can engage in free multimodal conversations, where multimodal data can be inserted at will.
|
|
|
|
| 13 |
[](https://www.youtube.com/watch?v=oW3E3pIsaRg)
|
| 14 |
|
| 15 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
## Inference
|
| 17 |
|
| 18 |
### Installation
|