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)# pip install -U transformers accelerate # 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, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- 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
Verified signature2195568
-
Update README.md
Verified signature6cd42a8 -
Upload README.md
Verified signaturefde80f8
-
Update README.md
Verified signature7bc671c -
Update README.md
Verified signaturef69eb22 -
Update README.md
Verified signature3da30d1 -
Upload README.md
Verified signaturef3171bc
-
Update colab_env.txt
Verified signature3ccc470 -
Update prepare_env.sh
Verified signaturea22eba0 -
Update prepare_env.sh
Verified signaturea442273
-
Update README.md
Verified signature7b380fc -
Update README.md
Verified signature56d9f12 -
Update README.md
Verified signature306c455 -
Update README.md
Verified signatureec74ec4 -
Upload 3 files
Verified signatureb9db556
-
Align bos_token_id with umt5
https://huggingface.co/google/umt5-small/blob/main/generation_config.json { "_from_model_config": true, "decoder_start_token_id": 0, "eos_token_id": 1, "max_new_tokens": 64, "pad_token_id": 0, "transformers_version": "4.31.0.dev0" }43447fe -
Align bos_token_id with umt5
{ "_from_model_config": true, "decoder_start_token_id": 0, "eos_token_id": 1, "max_new_tokens": 64, "pad_token_id": 0, "transformers_version": "4.31.0.dev0" }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
Fuzhao Xue6600a8c
-
initial commit
9a88672