Instructions to use OrionZheng/openmoe-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use OrionZheng/openmoe-base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="OrionZheng/openmoe-base", trust_remote_code=True)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("OrionZheng/openmoe-base", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("OrionZheng/openmoe-base", trust_remote_code=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use OrionZheng/openmoe-base with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "OrionZheng/openmoe-base" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "OrionZheng/openmoe-base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/OrionZheng/openmoe-base
- SGLang
How to use OrionZheng/openmoe-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 "OrionZheng/openmoe-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": "OrionZheng/openmoe-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 "OrionZheng/openmoe-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": "OrionZheng/openmoe-base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use OrionZheng/openmoe-base with Docker Model Runner:
docker model run hf.co/OrionZheng/openmoe-base
Commit History
Update README.md 6cd42a8 verified
Upload README.md fde80f8 verified
Update README.md 7bc671c verified
Update README.md f69eb22 verified
Update README.md 3da30d1 verified
Upload README.md f3171bc verified
Update colab_env.txt 3ccc470 verified
Update prepare_env.sh a22eba0 verified
Update prepare_env.sh a442273 verified
Update README.md 7b380fc verified
Update README.md 56d9f12 verified
Update README.md 306c455 verified
Update README.md ec74ec4 verified
Upload 3 files b9db556 verified
Align bos_token_id with umt5 43447fe
Align bos_token_id with umt5 8b07911
Update config.json e00ffd4
Upload 2 files 1f9518c
Update modeling_openmoe.py d9ba731
Update modeling_openmoe.py 1536202
Update generation_config.json 0a98445
Update config.json 5b8edbf
Update config.json 96f1431
Update generation_config.json b4d14fc
Update generation_config.json beb2c66
Update config.json 1b350a6
Update config.json 76721d5
Upload special_tokens_map.json d2bb3d1
Update generation_config.json 237bf25
Update README.md 248804c
Update README.md 2a2b24f
Update modeling_openmoe.py ab59aaf
Upload umt5 tokenizer files b021c89
Upload modeling_openmoe.py e248dc3
Update config.json df5b54b
OpenMoE base pytorch checkpoint 6600a8c
Fuzhao Xue commited on