Instructions to use deepseek-ai/DeepSeek-V3-0324 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use deepseek-ai/DeepSeek-V3-0324 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="deepseek-ai/DeepSeek-V3-0324", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("deepseek-ai/DeepSeek-V3-0324", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("deepseek-ai/DeepSeek-V3-0324", trust_remote_code=True, device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Inference
- HuggingChat
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use deepseek-ai/DeepSeek-V3-0324 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "deepseek-ai/DeepSeek-V3-0324" # 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-V3-0324", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/deepseek-ai/DeepSeek-V3-0324
- SGLang
How to use deepseek-ai/DeepSeek-V3-0324 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-V3-0324" \ --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-V3-0324", "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-V3-0324" \ --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-V3-0324", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use deepseek-ai/DeepSeek-V3-0324 with Docker Model Runner:
docker model run hf.co/deepseek-ai/DeepSeek-V3-0324
request for ollama
can you pls add it to ollama ty
ollama run deepseek-ai/DeepSeek-V3-0324
pulling manifest
Error: pull model manifest: file does not exist
https://huggingface.co/models?other=base_model:quantized:deepseek-ai/DeepSeek-V3-0324
ollama run hf.co/unsloth/DeepSeek-V3-0324-GGUF:Q2_K
ollama run hf.co/unsloth/DeepSeek-V3-0324-GGUF:Q2_K_XL
ollama run hf.co/unsloth/DeepSeek-V3-0324-GGUF:Q3_K_M
ollama run hf.co/unsloth/DeepSeek-V3-0324-GGUF:Q4_K_M
ollama run hf.co/unsloth/DeepSeek-V3-0324-GGUF:Q5_K_M
ollama run hf.co/unsloth/DeepSeek-V3-0324-GGUF:Q6_K
ollama run hf.co/unsloth/DeepSeek-V3-0324-GGUF:Q8_0
ollama run hf.co/MaziyarPanahi/DeepSeek-V3-0324-GGUF:Q2_K
ollama run hf.co/lmstudio-community/DeepSeek-V3-0324-GGUF:Q3_K_L
ollama run hf.co/lmstudio-community/DeepSeek-V3-0324-GGUF:Q4_K_M
ollama run hf.co/lmstudio-community/DeepSeek-V3-0324-GGUF:Q6_K
ollama run hf.co/lmstudio-community/DeepSeek-V3-0324-GGUF:Q8_0
ollama run hf.co/lmstudio-community/DeepSeek-V3-0324-GGUF:Q4_K_M
pulling manifest
Error: pull model manifest: 400: The specified repository contains sharded GGUF. Ollama does not support this yet. Follow this issue for more info: https://github.com/ollama/ollama/issues/5245
https://ollama.com/lordoliver/DeepSeek-V3-0324:671b-q8_0
ollama run lordoliver/DeepSeek-V3-0324:671b-q8_0
EDIT: This runs on my machine, but it keeps talking about Youtube scripts unprompted. Might be a personalized fine tune? An official version would be nice.
EDIT2: It works if you take the Modelfile from the original deepseek-v3 and use that. I think there was a custom prompt lordoliver is using. Here's how to do that (only works if you also have deepseek-v3:671b-q8_0 downloaded):
ollama stop lordoliver/DeepSeek-V3-0324:671b-q8_0
mkdir /data/DeepSeek-V3-0324
cd /data/DeepSeek-V3-0324
ollama show deepseek-v3:671b-q8_0 --modelfile > Modelfile.deepseek
ollama show lordoliver/DeepSeek-V3-0324:671b-q8_0 --modelfile > Modelfile.old
cp Modelfile.deepseek Modelfile
vim Modelfile.old
# copy the FROM line then open Modelfile in a new vim tab
tabe Modelfile
# paste the FROM line from Modelfile.old into Modelfile
ollama create DeepSeek-V3-0324:671b-q8_0 -f ./Modelfile
ollama run DeepSeek-V3-0324:671b-q8_0
EDIT3: It was just pointed out that 0324 is 685B and lordoliver's model is 671b, so is this really 0324? I asked the unsloth community here: https://huggingface.co/unsloth/DeepSeek-V3-0324-GGUF/discussions/8