Instructions to use OpenMOSS-Team/moss-moon-003-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use OpenMOSS-Team/moss-moon-003-base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="OpenMOSS-Team/moss-moon-003-base", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("OpenMOSS-Team/moss-moon-003-base", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use OpenMOSS-Team/moss-moon-003-base with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "OpenMOSS-Team/moss-moon-003-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/moss-moon-003-base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/OpenMOSS-Team/moss-moon-003-base
- SGLang
How to use OpenMOSS-Team/moss-moon-003-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/moss-moon-003-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/moss-moon-003-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/moss-moon-003-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/moss-moon-003-base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use OpenMOSS-Team/moss-moon-003-base with Docker Model Runner:
docker model run hf.co/OpenMOSS-Team/moss-moon-003-base
Commit History
-
Update GitHub URLs from OpenLMLab to OpenMOSS
Verified signatureea9e134 -
Update HuggingFace paths from fnlp to OpenMOSS-Team
Verified signature68a0b68
-
Update README.md
5e406ca -
Update config.json
264cdb7 -
Update README.md
2f39d68
-
Update README.md
602a794 -
Upload README.md
db77666
-
Update README.md
3544bb9 -
Update README.md
6391df8 -
Update tokenizer_config.json
6cd961e -
Update tokenization_moss.py
1478dc1 -
Update special_tokens_map.json
896e51a -
Update configuration_moss.py
8fc1e47 -
Update config.json
a50ba71 -
Upload LICENSE
81cca3b
-
Update tokenizer_config.json
c2ce8ab -
Update config.json
316febc -
Update config.json
418ae73 -
Rename pytorch_model-000001-of-000004.bin to pytorch_model-00001-of-00004.bin
83c7e84 -
Upload vocab.json with huggingface_hub
e29b7f9 -
Upload tokenizer_config.json with huggingface_hub
06804ba -
Upload tokenization_moss.py with huggingface_hub
9fe3aeb -
Upload special_tokens_map.json with huggingface_hub
74e0f81 -
Upload pytorch_model.bin.index.json with huggingface_hub
5c6d838 -
Upload pytorch_model-00004-of-00004.bin with huggingface_hub
1fbd4ac -
Upload pytorch_model-00003-of-00004.bin with huggingface_hub
895c65f -
Upload pytorch_model-00002-of-00004.bin with huggingface_hub
7de1bbe -
Upload modeling_moss.py with huggingface_hub
8569f59 -
Upload merges.txt with huggingface_hub
5dcf33b -
Upload configuration_moss.py with huggingface_hub
a23d119 -
Upload added_tokens.json with huggingface_hub
d617fcb -
Upload pytorch_model-000001-of-000004.bin with huggingface_hub
2f26d1d -
Upload config.json with huggingface_hub
53fce14 -
initial commit
362e15b