Instructions to use OpenMOSS-Team/AnyGPT-chat with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use OpenMOSS-Team/AnyGPT-chat with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="OpenMOSS-Team/AnyGPT-chat")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("OpenMOSS-Team/AnyGPT-chat") model = AutoModelForCausalLM.from_pretrained("OpenMOSS-Team/AnyGPT-chat", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use OpenMOSS-Team/AnyGPT-chat with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "OpenMOSS-Team/AnyGPT-chat" # 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-chat", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/OpenMOSS-Team/AnyGPT-chat
- SGLang
How to use OpenMOSS-Team/AnyGPT-chat 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-chat" \ --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-chat", "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-chat" \ --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-chat", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use OpenMOSS-Team/AnyGPT-chat with Docker Model Runner:
docker model run hf.co/OpenMOSS-Team/AnyGPT-chat
Commit History
-
Improve model card: Add pipeline tag, library name, paper, code, and project page links
Verified signatureThis PR significantly enhances the model card for **AnyGPT: Unified Multimodal LLM with Discrete Sequence Modeling** by: - Adding the `pipeline_tag: any-to-any` to the metadata, which accurately reflects the model's multimodal capabilities and improves discoverability on the Hugging Face Hub (e.g., at https://huggingface.co/models?pipeline_tag=any-to-any). - Adding `library_name: transformers` to the metadata. This is supported by the `config.json` file (showing `LlamaForCausalLM` and `transformers_version`), enabling the automated "how to use" widget and code snippets for the `transformers` library. - Adding prominent direct links to the Hugging Face paper page (https://huggingface.co/papers/2402.12226), the GitHub repository (https://github.com/OpenMOSS/AnyGPT), and the project page (https://junzhan2000.github.io/AnyGPT.github.io/) at the very top of the model card content. This provides users with immediate access to key resources. These additions improve the model's visibil…2bbab83
-
Create README.md
Verified signaturec899962
-
Upload folder using huggingface_hub
Verified signature1e5ceb1 -
Delete test2
Verified signature87735f3 -
Delete test1
Verified signature314eac0 -
Upload folder using huggingface_hub
Verified signature01f11f9
-
initial commit
Verified signatureb150a5c