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")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("OpenMOSS-Team/AnyGPT-base") model = AutoModelForCausalLM.from_pretrained("OpenMOSS-Team/AnyGPT-base", device_map="auto") - 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
Commit History
-
Improve model card: Add pipeline tag, library name, and detailed inference/training
Verified signatureThis PR significantly enhances the model card by adding relevant metadata and comprehensive content from the original GitHub repository. Key improvements include: - **Metadata**: Added `pipeline_tag: any-to-any` to correctly categorize the model and improve discoverability at `https://huggingface.co/models?pipeline_tag=any-to-any`. Added `library_name: transformers` based on `config.json` indicating `LlamaForCausalLM` architecture and `transformers_version`, which enables automated usage snippets on the model page. - **Structure and Links**: Updated the model card title and added prominent badges at the top linking to the paper, project page, and GitHub repository for easy access. - **Content Completeness**: Integrated the "Open-Source Checklist," "Chat model CLI Inference" instructions, and the detailed "Pretraining and SFT" section from the project's GitHub README, providing a more complete guide for users. - **Typos**: Corrected the "Lincese" heading to "License". These up…e291f50
-
Update README.md
Verified signature7f3d035 -
Update README.md
Verified signaturea790d38 -
Update README.md
Verified signatureb56101b -
Update README.md
Verified signaturef469bbe -
Create README.md
Verified signature33f6918
-
Delete speechtokenizer/config.json
Verified signatureb08c886 -
Delete speechtokenizer/ckpt.dev
Verified signature217c8dd -
Upload folder using huggingface_hub
Verified signature5f46927
-
Upload folder using huggingface_hub
Verified signature1ad09c0 -
Delete testw
Verified signatured149808 -
Delete test1
Verified signatureaa24639 -
Upload folder using huggingface_hub
Verified signature4aac62b
-
initial commit
Verified signatureecdaecc