Instructions to use deepseek-ai/deepseek-moe-16b-chat with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use deepseek-ai/deepseek-moe-16b-chat with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="deepseek-ai/deepseek-moe-16b-chat", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("deepseek-ai/deepseek-moe-16b-chat", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use deepseek-ai/deepseek-moe-16b-chat with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "deepseek-ai/deepseek-moe-16b-chat" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "deepseek-ai/deepseek-moe-16b-chat", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/deepseek-ai/deepseek-moe-16b-chat
- SGLang
How to use deepseek-ai/deepseek-moe-16b-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 "deepseek-ai/deepseek-moe-16b-chat" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "deepseek-ai/deepseek-moe-16b-chat", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "deepseek-ai/deepseek-moe-16b-chat" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "deepseek-ai/deepseek-moe-16b-chat", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use deepseek-ai/deepseek-moe-16b-chat with Docker Model Runner:
docker model run hf.co/deepseek-ai/deepseek-moe-16b-chat
Moe from your 7b param model would be more effective
I get that this is impressive because a 2.8b param models infrence speed can match 7b param models quality. But its not really practical. If you can run a 7b parameter model you dont really need the extra inference speed, what you need is better quality.
This is just my opinion, but I would have much preferred a bigger MoE from your guys made up from your 7b parameter models.
like a mixtral-48b param model but made up from deepseeklm-7b. Or even deepseekcoder-6.7b-instruct.
I was recently informed that the 40% in your github referred to training compute requirement needed not inference speed. Which in that case I kindoff take back what i said. This model does alot more than i though it did, considering you can probably fully train it on 24gb of vram in 4-bit using qlora with no issue.
But still i want to see that deepseek-48b-MoE please 😁
If im mistaken about anything I said here please correct me, so me and the community can better understand your model.
Cheers
i think this title can be changed as deepseeks-8*2.8b-chat
@deepseek-admin you guys took too long so i did it myself 😉
https://huggingface.co/rombodawg/deepseek-coder-moe_8x6.7b-base