Instructions to use ubergarm/DeepSeek-V3.1-Terminus-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use ubergarm/DeepSeek-V3.1-Terminus-GGUF with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf ubergarm/DeepSeek-V3.1-Terminus-GGUF:IQ1_S # Run inference directly in the terminal: llama cli -hf ubergarm/DeepSeek-V3.1-Terminus-GGUF:IQ1_S
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf ubergarm/DeepSeek-V3.1-Terminus-GGUF:IQ1_S # Run inference directly in the terminal: llama cli -hf ubergarm/DeepSeek-V3.1-Terminus-GGUF:IQ1_S
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf ubergarm/DeepSeek-V3.1-Terminus-GGUF:IQ1_S # Run inference directly in the terminal: ./llama-cli -hf ubergarm/DeepSeek-V3.1-Terminus-GGUF:IQ1_S
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf ubergarm/DeepSeek-V3.1-Terminus-GGUF:IQ1_S # Run inference directly in the terminal: ./build/bin/llama-cli -hf ubergarm/DeepSeek-V3.1-Terminus-GGUF:IQ1_S
Use Docker
docker model run hf.co/ubergarm/DeepSeek-V3.1-Terminus-GGUF:IQ1_S
- LM Studio
- Jan
- vLLM
How to use ubergarm/DeepSeek-V3.1-Terminus-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ubergarm/DeepSeek-V3.1-Terminus-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ubergarm/DeepSeek-V3.1-Terminus-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/ubergarm/DeepSeek-V3.1-Terminus-GGUF:IQ1_S
- Ollama
How to use ubergarm/DeepSeek-V3.1-Terminus-GGUF with Ollama:
ollama run hf.co/ubergarm/DeepSeek-V3.1-Terminus-GGUF:IQ1_S
- Unsloth Studio
How to use ubergarm/DeepSeek-V3.1-Terminus-GGUF with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for ubergarm/DeepSeek-V3.1-Terminus-GGUF to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for ubergarm/DeepSeek-V3.1-Terminus-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for ubergarm/DeepSeek-V3.1-Terminus-GGUF to start chatting
- Atomic Chat new
- Docker Model Runner
How to use ubergarm/DeepSeek-V3.1-Terminus-GGUF with Docker Model Runner:
docker model run hf.co/ubergarm/DeepSeek-V3.1-Terminus-GGUF:IQ1_S
- Lemonade
How to use ubergarm/DeepSeek-V3.1-Terminus-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull ubergarm/DeepSeek-V3.1-Terminus-GGUF:IQ1_S
Run and chat with the model
lemonade run user.DeepSeek-V3.1-Terminus-GGUF-IQ1_S
List all available models
lemonade list
ik_llama.cppimatrix Quantizations of deepseek-ai/DeepSeek-V3.1-Terminus- Big Thanks
- Quant Collection
- IQ5_K 464.062 GiB (5.941 BPW)
- smol-IQ5_KS 417.107 GiB (5.339 BPW)
- IQ4_K 382.485 GiB (4.896 BPW)
- smol-IQ4_KSS 318.745 GiB (4.080 BPW)
- IQ3_K 290.897 GiB (3.724 BPW)
- IQ3_KS 276.958 GiB (3.545 BPW)
- IQ2_KL 231.356 GiB (2.962 BPW)
- IQ2_KS 193.144 GiB (2.472 BPW)
- IQ1_KT 155.248 GiB (1.987 BPW)
- IQ1_S 136.331 GiB (1.745 BPW)
- Quick Start
- References
ik_llama.cpp imatrix Quantizations of deepseek-ai/DeepSeek-V3.1-Terminus
This quant collection REQUIRES ik_llama.cpp fork to support the ik's latest SOTA quants and optimizations! Do not download these big files and expect them to run on mainline vanilla llama.cpp, ollama, LM Studio, KoboldCpp, etc!
NOTE ik_llama.cpp can also run your existing GGUFs from bartowski, unsloth, mradermacher, etc if you want to try it out before downloading my quants.
Some of ik's new quants are supported with Nexesenex/croco.cpp fork of KoboldCPP with Windows builds for CUDA 12.9. Also check for Windows builds by Thireus here. which have been CUDA 12.8.
These quants provide best in class perplexity for the given memory footprint.
Big Thanks
Shout out to Wendell and the Level1Techs crew, the community Forums, YouTube Channel! BIG thanks for providing BIG hardware expertise and access to run these experiments and make these great quants available to the community!!!
Also thanks to all the folks in the quanting and inferencing community on BeaverAI Club Discord and on r/LocalLLaMA for tips and tricks helping each other run, test, and benchmark all the fun new models!
Quant Collection
Perplexity computed against wiki.test.raw.
This first is just a "pure" test quant for baseline perplexity comparison:
Q8_0664.295 GiB (8.504 BPW)- Final estimate: PPL = 3.3929 +/- 0.01985
NOTE: smol is convention indicating same size quantization for ffn_(up|gate)_exps and ffn_down_exps tensors.
IQ5_K 464.062 GiB (5.941 BPW)
Final estimate: PPL = 3.4000 +/- 0.01992
👈 Secret Recipe
#!/usr/bin/env bash
custom="
## Attention [0-60] (GPU)
# attn_kv_b is only used for PP so keep it q8_0 for best speed and accuracy
blk\..*\.attn_kv_b\.weight=q8_0
# ideally k_b and v_b are smaller than q8_0 as they are is used for TG with -mla 3
# https://github.com/ikawrakow/ik_llama.cpp/issues/651
# blk.*.attn_k_b.weight is not divisible by 256 so only supports iq4_nl or legacy qN_0
blk\..*\.attn_k_b\.weight=q8_0
blk\..*\.attn_v_b\.weight=q8_0
# Balance of attn tensors
blk\..*\.attn_kv_a_mqa\.weight=q8_0
blk\..*\.attn_q_a\.weight=q8_0
blk\..*\.attn_q_b\.weight=q8_0
blk\..*\.attn_output\.weight=q8_0
## First Three Dense Layers [0-2] (GPU)
blk\..*\.ffn_down\.weight=q8_0
blk\..*\.ffn_(gate|up)\.weight=q8_0
## Shared Expert (1-60) (GPU)
blk\..*\.ffn_down_shexp\.weight=q8_0
blk\..*\.ffn_(gate|up)_shexp\.weight=q8_0
## Routed Experts (1-60) (CPU)
blk\..*\.ffn_down_exps\.weight=iq6_k
blk\..*\.ffn_(gate|up)_exps\.weight=iq5_k
## Token embedding and output tensors (GPU)
token_embd\.weight=iq6_k
output\.weight=iq6_k
"
custom=$(
echo "$custom" | grep -v '^#' | \
sed -Ez 's:\n+:,:g;s:,$::;s:^,::'
)
numactl -N 0 -m 0 \
./build/bin/llama-quantize \
--custom-q "$custom" \
--imatrix /mnt/data/models/ubergarm/DeepSeek-V3.1-Terminus-GGUF/imatrix-DeepSeek-V3.1-Terminus-Q8_0.dat \
/mnt/data/models/ubergarm/DeepSeek-V3.1-Terminus-GGUF/DeepSeek-V3.1-Terminus-256x20B-safetensors-BF16-00001-of-00030.gguf \
/mnt/data/models/ubergarm/DeepSeek-V3.1-Terminus-GGUF/DeepSeek-V3.1-Terminus-IQ5_K.gguf \
IQ5_K \
192
smol-IQ5_KS 417.107 GiB (5.339 BPW)
Final estimate: PPL = 3.4059 +/- 0.01996
👈 Secret Recipe
#!/usr/bin/env bash
custom="
## Attention [0-60] (GPU)
blk\..*\.attn_k_b\.weight=q8_0
blk\..*\.attn_v_b\.weight=q8_0
# Balance of attn tensors
blk\..*\.attn_kv_a_mqa\.weight=q8_0
blk\..*\.attn_q_a\.weight=q8_0
blk\..*\.attn_q_b\.weight=q8_0
blk\..*\.attn_output\.weight=q8_0
## First Three Dense Layers [0-2] (GPU)
blk\..*\.ffn_down\.weight=q8_0
blk\..*\.ffn_(gate|up)\.weight=q8_0
## Shared Expert (1-60) (GPU)
blk\..*\.ffn_down_shexp\.weight=q8_0
blk\..*\.ffn_(gate|up)_shexp\.weight=q8_0
## Routed Experts (1-60) (CPU)
blk\..*\.ffn_down_exps\.weight=iq5_ks
blk\..*\.ffn_(gate|up)_exps\.weight=iq5_ks
## Token embedding and output tensors (GPU)
token_embd\.weight=iq6_k
output\.weight=iq6_k
"
custom=$(
echo "$custom" | grep -v '^#' | \
sed -Ez 's:\n+:,:g;s:,$::;s:^,::'
)
numactl -N 0 -m 0 \
./build/bin/llama-quantize \
--custom-q "$custom" \
--imatrix /mnt/data/models/ubergarm/DeepSeek-V3.1-Terminus-GGUF/imatrix-DeepSeek-V3.1-Terminus-Q8_0.dat \
/mnt/data/models/ubergarm/DeepSeek-V3.1-Terminus-GGUF/DeepSeek-V3.1-Terminus-256x20B-safetensors-BF16-00001-of-00030.gguf \
/mnt/data/models/ubergarm/DeepSeek-V3.1-Terminus-GGUF/DeepSeek-V3.1-Terminus-smol-IQ5_KS.gguf \
IQ5_KS \
192
IQ4_K 382.485 GiB (4.896 BPW)
Final estimate: PPL = 3.4198 +/- 0.02009
👈 Secret Recipe
#!/usr/bin/env bash
custom="
## Attention [0-60] (GPU)
blk\..*\.attn_k_b\.weight=q8_0
blk\..*\.attn_v_b\.weight=q8_0
# Balance of attn tensors
blk\..*\.attn_kv_a_mqa\.weight=q8_0
blk\..*\.attn_q_a\.weight=q8_0
blk\..*\.attn_q_b\.weight=q8_0
blk\..*\.attn_output\.weight=iq6_k
## First Three Dense Layers [0-2] (GPU)
blk\.0\.ffn_down\.weight=q8_0
blk\.0\.ffn_(gate|up)\.weight=q8_0
blk\..*\.ffn_down\.weight=q8_0
blk\..*\.ffn_(gate|up)\.weight=iq6_k
## Shared Expert [3-60] (GPU)
blk\..*\.ffn_down_shexp\.weight=q8_0
blk\..*\.ffn_(gate|up)_shexp\.weight=iq6_k
## Routed Experts [3-60] (CPU)
blk\..*\.ffn_down_exps\.weight=iq5_k
blk\..*\.ffn_(gate|up)_exps\.weight=iq4_k
## Token embedding and output tensors (GPU)
token_embd\.weight=iq4_k
output\.weight=iq6_k
"
custom=$(
echo "$custom" | grep -v '^#' | \
sed -Ez 's:\n+:,:g;s:,$::;s:^,::'
)
SOCKET=0
numactl -N "$SOCKET" -m "$SOCKET" \
./build/bin/llama-quantize \
--custom-q "$custom" \
--imatrix /mnt/data/models/ubergarm/DeepSeek-V3.1-Terminus-GGUF/imatrix-DeepSeek-V3.1-Terminus-Q8_0.dat \
/mnt/data/models/ubergarm/DeepSeek-V3.1-Terminus-GGUF/DeepSeek-V3.1-Terminus-256x20B-safetensors-BF16-00001-of-00030.gguf \
/mnt/data/models/ubergarm/DeepSeek-V3.1-Terminus-GGUF/DeepSeek-V3.1-Terminus-IQ4_K.gguf \
IQ4_K \
192
smol-IQ4_KSS 318.745 GiB (4.080 BPW)
Final estimate: PPL = 3.4445 +/- 0.02022
👈 Secret Recipe
#!/usr/bin/env bash
custom="
## Attention [0-60] (GPU)
blk\..*\.attn_k_b\.weight=q8_0
blk\..*\.attn_v_b\.weight=q8_0
# Balance of attn tensors
blk\..*\.attn_kv_a_mqa\.weight=q8_0
blk\..*\.attn_q_a\.weight=q8_0
blk\..*\.attn_q_b\.weight=q8_0
blk\..*\.attn_output\.weight=iq6_k
## First Three Dense Layers [0-2] (GPU)
blk\..*\.ffn_down\.weight=iq5_ks
blk\..*\.ffn_(gate|up)\.weight=iq5_ks
## Shared Expert [3-60] (GPU)
blk\..*\.ffn_down_shexp\.weight=iq5_ks
blk\..*\.ffn_(gate|up)_shexp\.weight=iq5_ks
## Routed Experts [3-60] (CPU)
blk\..*\.ffn_down_exps\.weight=iq4_kss
blk\..*\.ffn_(gate|up)_exps\.weight=iq4_kss
## Token embedding and output tensors (GPU)
token_embd\.weight=iq4_k
output\.weight=iq6_k
"
custom=$(
echo "$custom" | grep -v '^#' | \
sed -Ez 's:\n+:,:g;s:,$::;s:^,::'
)
SOCKET=1
numactl -N "$SOCKET" -m "$SOCKET" \
./build/bin/llama-quantize \
--custom-q "$custom" \
--imatrix /mnt/data/models/ubergarm/DeepSeek-V3.1-Terminus-GGUF/imatrix-DeepSeek-V3.1-Terminus-Q8_0.dat \
/mnt/data/models/ubergarm/DeepSeek-V3.1-Terminus-GGUF/DeepSeek-V3.1-Terminus-256x20B-safetensors-BF16-00001-of-00030.gguf \
/mnt/data/models/ubergarm/DeepSeek-V3.1-Terminus-GGUF/DeepSeek-V3.1-smol-IQ4_KSS.gguf \
IQ4_KSS \
192
IQ3_K 290.897 GiB (3.724 BPW)
Final estimate: PPL = 3.4781 +/- 0.02052
👈 Secret Recipe
#!/usr/bin/env bash
custom="
## Attention [0-60] (GPU)
blk\..*\.attn_k_b\.weight=q8_0
blk\..*\.attn_v_b\.weight=q8_0
# Balance of attn tensors
blk\..*\.attn_kv_a_mqa\.weight=q8_0
blk\..*\.attn_q_a\.weight=q8_0
blk\..*\.attn_q_b\.weight=q8_0
blk\..*\.attn_output\.weight=iq6_k
## First Three Dense Layers [0-2] (GPU)
blk\.0\.ffn_down\.weight=q8_0
blk\.0\.ffn_(gate|up)\.weight=q8_0
blk\..*\.ffn_down\.weight=q8_0
blk\..*\.ffn_(gate|up)\.weight=iq6_k
## Shared Expert [3-60] (GPU)
blk\..*\.ffn_down_shexp\.weight=q8_0
blk\..*\.ffn_(gate|up)_shexp\.weight=iq6_k
## Routed Experts [3-60] (CPU)
blk\..*\.ffn_down_exps\.weight=iq4_kss
blk\..*\.ffn_(gate|up)_exps\.weight=iq3_k
## Token embedding and output tensors (GPU)
token_embd\.weight=iq4_k
output\.weight=iq6_k
"
custom=$(
echo "$custom" | grep -v '^#' | \
sed -Ez 's:\n+:,:g;s:,$::;s:^,::'
)
SOCKET=1
numactl -N "$SOCKET" -m "$SOCKET" \
./build/bin/llama-quantize \
--custom-q "$custom" \
--imatrix /mnt/data/models/ubergarm/DeepSeek-V3.1-Terminus-GGUF/imatrix-DeepSeek-V3.1-Terminus-Q8_0.dat \
/mnt/data/models/ubergarm/DeepSeek-V3.1-Terminus-GGUF/DeepSeek-V3.1-Terminus-256x20B-safetensors-BF16-00001-of-00030.gguf \
/mnt/data/models/ubergarm/DeepSeek-V3.1-Terminus-GGUF/DeepSeek-V3.1-Terminus-IQ3_K.gguf \
IQ3_K \
192
IQ3_KS 276.958 GiB (3.545 BPW)
Final estimate: PPL = 3.5174 +/- 0.02089
👈 Secret Recipe
#!/usr/bin/env bash
custom="
## Attention [0-60] (GPU)
blk\..*\.attn_k_b\.weight=q8_0
blk\..*\.attn_v_b\.weight=q8_0
# Balance of attn tensors
blk\..*\.attn_kv_a_mqa\.weight=q8_0
blk\..*\.attn_q_a\.weight=q8_0
blk\..*\.attn_q_b\.weight=iq6_k
blk\..*\.attn_output\.weight=iq6_k
## First Three Dense Layers [0-2] (GPU)
blk\.0\.ffn_down\.weight=iq6_k
blk\.0\.ffn_(gate|up)\.weight=iq6_k
blk\..*\.ffn_down\.weight=iq5_ks
blk\..*\.ffn_(gate|up)\.weight=iq5_ks
## Shared Expert [3-60] (GPU)
blk\..*\.ffn_down_shexp\.weight=iq5_ks
blk\..*\.ffn_(gate|up)_shexp\.weight=iq5_ks
## Routed Experts [3-60] (CPU)
blk\..*\.ffn_down_exps\.weight=iq4_kss
blk\..*\.ffn_(gate|up)_exps\.weight=iq3_ks
## Token embedding and output tensors (GPU)
token_embd\.weight=iq4_k
output\.weight=iq6_k
"
custom=$(
echo "$custom" | grep -v '^#' | \
sed -Ez 's:\n+:,:g;s:,$::;s:^,::'
)
SOCKET=0
numactl -N "$SOCKET" -m "$SOCKET" \
./build/bin/llama-quantize \
--custom-q "$custom" \
--imatrix /mnt/data/models/ubergarm/DeepSeek-V3.1-Terminus-GGUF/imatrix-DeepSeek-V3.1-Terminus-Q8_0.dat \
/mnt/data/models/ubergarm/DeepSeek-V3.1-Terminus-GGUF/DeepSeek-V3.1-Terminus-256x20B-safetensors-BF16-00001-of-00030.gguf \
/mnt/data/models/ubergarm/DeepSeek-V3.1-Terminus-GGUF/DeepSeek-V3.1-Terminus-IQ3_KS.gguf \
IQ3_KS \
192
IQ2_KL 231.356 GiB (2.962 BPW)
Final estimate: PPL = 3.7112 +/- 0.02248
👈 Secret Recipe
#!/usr/bin/env bash
custom="
## Attention [0-60] (GPU)
blk\..*\.attn_k_b\.weight=q8_0
blk\..*\.attn_v_b\.weight=q8_0
# Balance of attn tensors
blk\..*\.attn_kv_a_mqa\.weight=q8_0
blk\..*\.attn_q_a\.weight=q8_0
blk\..*\.attn_q_b\.weight=q8_0
blk\..*\.attn_output\.weight=iq6_k
## First Three Dense Layers [0-2] (GPU)
blk\.0\.ffn_down\.weight=q8_0
blk\.0\.ffn_(gate|up)\.weight=q8_0
blk\..*\.ffn_down\.weight=iq5_ks
blk\..*\.ffn_(gate|up)\.weight=iq5_ks
## Shared Expert [3-60] (GPU)
blk\..*\.ffn_down_shexp\.weight=iq5_ks
blk\..*\.ffn_(gate|up)_shexp\.weight=iq5_ks
## Routed Experts [3-60] (CPU)
blk\..*\.ffn_down_exps\.weight=iq3_ks
blk\..*\.ffn_(gate|up)_exps\.weight=iq2_kl
## Token embedding and output tensors (GPU)
token_embd\.weight=iq4_k
output\.weight=iq6_k
"
custom=$(
echo "$custom" | grep -v '^#' | \
sed -Ez 's:\n+:,:g;s:,$::;s:^,::'
)
SOCKET=0
numactl -N "$SOCKET" -m "$SOCKET" \
./build/bin/llama-quantize \
--custom-q "$custom" \
--imatrix /mnt/data/models/ubergarm/DeepSeek-V3.1-Terminus-GGUF/imatrix-DeepSeek-V3.1-Terminus-Q8_0.dat \
/mnt/data/models/ubergarm/DeepSeek-V3.1-Terminus-GGUF/DeepSeek-V3.1-Terminus-256x20B-safetensors-BF16-00001-of-00030.gguf \
/mnt/data/models/ubergarm/DeepSeek-V3.1-Terminus-GGUF/DeepSeek-V3.1-Terminus-IQ2_KL.gguf \
IQ2_KL \
192
IQ2_KS 193.144 GiB (2.472 BPW)
Final estimate: PPL = 4.0280 +/- 0.02500
👈 Secret Recipe
#!/usr/bin/env bash
custom="
## Attention [0-60] (GPU)
blk\..*\.attn_k_b\.weight=q8_0
blk\..*\.attn_v_b\.weight=q8_0
# Balance of attn tensors
blk\..*\.attn_kv_a_mqa\.weight=q8_0
blk\..*\.attn_q_a\.weight=q8_0
blk\..*\.attn_q_b\.weight=q8_0
blk\..*\.attn_output\.weight=iq6_k
## First Three Dense Layers [0-2] (GPU)
blk\..*\.ffn_down\.weight=iq5_ks
blk\..*\.ffn_(gate|up)\.weight=iq5_ks
## Shared Expert [3-60] (GPU)
blk\..*\.ffn_down_shexp\.weight=iq5_ks
blk\..*\.ffn_(gate|up)_shexp\.weight=iq5_ks
## Routed Experts [3-60] (CPU)
blk\..*\.ffn_down_exps\.weight=iq2_kl
blk\..*\.ffn_(gate|up)_exps\.weight=iq2_ks
## Token embedding and output tensors (GPU)
token_embd\.weight=iq4_k
output\.weight=iq6_k
"
custom=$(
echo "$custom" | grep -v '^#' | \
sed -Ez 's:\n+:,:g;s:,$::;s:^,::'
)
SOCKET=0
numactl -N "$SOCKET" -m "$SOCKET" \
./build/bin/llama-quantize \
--custom-q "$custom" \
--imatrix /mnt/data/models/ubergarm/DeepSeek-V3.1-Terminus-GGUF/imatrix-DeepSeek-V3.1-Terminus-Q8_0.dat \
/mnt/data/models/ubergarm/DeepSeek-V3.1-Terminus-GGUF/DeepSeek-V3.1-Terminus-256x20B-safetensors-BF16-00001-of-00030.gguf \
/mnt/data/models/ubergarm/DeepSeek-V3.1-Terminus-GGUF/DeepSeek-V3.1-IQ2_KS-main.gguf \
IQ2_KS \
192
IQ1_KT 155.248 GiB (1.987 BPW)
Final estimate: PPL = 4.5310 +/- 0.02908
👈 Secret Recipe
#!/usr/bin/env bash
custom="
## Attention [0-60] (GPU)
blk\..*\.attn_k_b\.weight=q8_0
blk\..*\.attn_v_b\.weight=q8_0
# Balance of attn tensors
blk\..*\.attn_kv_a_mqa\.weight=q8_0
blk\..*\.attn_q_a\.weight=iq6_k
blk\..*\.attn_q_b\.weight=iq6_k
blk\..*\.attn_output\.weight=iq5_ks
## First Three Dense Layers [0-2] (GPU)
blk\.0\.ffn_down\.weight=iq6_k
blk\.0\.ffn_(gate|up)\.weight=iq6_k
blk\..*\.ffn_down\.weight=iq5_ks
blk\..*\.ffn_(gate|up)\.weight=iq5_ks
## Shared Expert [3-60] (GPU)
blk\..*\.ffn_down_shexp\.weight=iq5_ks
blk\..*\.ffn_(gate|up)_shexp\.weight=iq5_ks
## Routed Experts [3-60] (CPU)
blk\..*\.ffn_down_exps\.weight=iq2_kt
blk\..*\.ffn_(gate|up)_exps\.weight=iq1_kt
## Token embedding and output tensors (GPU)
token_embd\.weight=iq4_k
output\.weight=iq6_k
"
custom=$(
echo "$custom" | grep -v '^#' | \
sed -Ez 's:\n+:,:g;s:,$::;s:^,::'
)
SOCKET=0
numactl -N "$SOCKET" -m "$SOCKET" \
./build/bin/llama-quantize \
--custom-q "$custom" \
--imatrix /mnt/data/models/ubergarm/DeepSeek-V3.1-Terminus-GGUF/imatrix-DeepSeek-V3.1-Terminus-Q8_0.dat \
/mnt/data/models/ubergarm/DeepSeek-V3.1-Terminus-GGUF/DeepSeek-V3.1-Terminus-256x20B-safetensors-BF16-00001-of-00030.gguf \
/mnt/data/models/ubergarm/DeepSeek-V3.1-Terminus-GGUF/DeepSeek-V3.1-Terminus-IQ1_KT.gguf \
IQ1_KT \
192
IQ1_S 136.331 GiB (1.745 BPW)
Final estimate: PPL = 5.4829 +/- 0.03666
👈 Secret Recipe
#!/usr/bin/env bash
custom="
## Attention [0-60] (GPU)
blk\..*\.attn_k_b\.weight=q8_0
blk\..*\.attn_v_b\.weight=q8_0
# Balance of attn tensors
blk\..*\.attn_kv_a_mqa\.weight=q8_0
blk\..*\.attn_q_a\.weight=iq6_k
blk\..*\.attn_q_b\.weight=iq6_k
blk\..*\.attn_output\.weight=iq6_k
## First Three Dense Layers [0-2] (GPU)
blk\.0\.ffn_down\.weight=iq5_ks
blk\.0\.ffn_(gate|up)\.weight=iq4_ks
blk\..*\.ffn_down\.weight=iq4_kss
blk\..*\.ffn_(gate|up)\.weight=iq4_kss
## Shared Expert [3-60] (GPU)
blk\..*\.ffn_down_shexp\.weight=iq5_ks
blk\..*\.ffn_(gate|up)_shexp\.weight=iq4_ks
## Routed Experts [3-60] (CPU)
blk\..*\.ffn_down_exps\.weight=iq1_m
blk\..*\.ffn_(gate|up)_exps\.weight=iq1_s
## Token embedding and output tensors (GPU)
token_embd\.weight=iq4_k
output\.weight=iq6_k
"
custom=$(
echo "$custom" | grep -v '^#' | \
sed -Ez 's:\n+:,:g;s:,$::;s:^,::'
)
SOCKET=0
numactl -N "$SOCKET" -m "$SOCKET" \
./build/bin/llama-quantize \
--custom-q "$custom" \
--imatrix /mnt/data/models/ubergarm/DeepSeek-V3.1-Terminus-GGUF/imatrix-DeepSeek-V3.1-Terminus-Q8_0.dat \
/mnt/data/models/ubergarm/DeepSeek-V3.1-Terminus-GGUF/DeepSeek-V3.1-Terminus-256x20B-safetensors-BF16-00001-of-00030.gguf \
/mnt/data/models/ubergarm/DeepSeek-V3.1-Terminus-GGUF/DeepSeek-V3.1-Terminus-IQ1_S.gguf \
IQ1_S \
192
Quick Start
# Clone and checkout
$ git clone https://github.com/ikawrakow/ik_llama.cpp
$ cd ik_llama.cpp
# Build for hybrid CPU+CUDA
$ cmake -B build -DCMAKE_BUILD_TYPE=Release -DGGML_CUDA=ON -DGGML_BLAS=OFF -DGGML_SCHED_MAX_COPIES=1
$ cmake --build build --config Release -j $(nproc)
# Run API server Hybrid CPU+GPU
# model is the first file of the GGUF splits
# remove `--no-mmap` if you don't have enough RAM and run it off of fast NVMe drive
$ ./build/bin/llama-server \
--model "$model"\
--alias ubergarm/DeepSeek-V3.1-Terminus-GGUF \
--ctx-size 32768 \
-ctk q8_0 \
-fa -fmoe \
-mla 3 -amb 512 \
-ngl 99 \
-ot exps=CPU \
--parallel 1 \
--threads 8 \
--host 127.0.0.1 \
--port 8080 \
--no-display-prompt \
--no-mmap
# Run API Server CPU-Only
$ numactl -N 0 -m 0 \
./build/bin/llama-server \
--model "$model"\
--alias ubergarm/DeepSeek-V3.1-Terminus-GGUF \
--ctx-size 131072 \
-ub 4096 -b 4096 \
-ctk q8_0 \
-fa -fmoe \
-mla 3 \
--parallel 1 \
--threads 128 \
--threads-batch 192 \
--numa numactl \
--host 127.0.0.1 \
--port 8080 \
--no-display-prompt \
--no-mmap
# NOTE: Chat Template Stuff
# The above commands seem to default to thinking disabled so if you do want thinking try some combination of:
# --jinja \
# --reasoning-format none \
# --reasoning-budget -1 \
# If you omit `--reasoning-format none` it may appear to take a long time before responding as thinking is in a different response field.
# I'm not sure how to get it to start the response with `<think>` though.
# You can also do this with `--reasoning-budget 0` to disable thinking but keep the jinja stuff.
# NOTE: Validate Quants
# If you have a numerical issue like DDDDD response or `nan` in perplexity, try with `--validate-quants` and check sha256sum of ggufs and redownload any corrupt ones.
Multi-GPU is well supported with custom -ot ...=CUDA1 offload regex arguments etc.
References
- Downloads last month
- 42
Model tree for ubergarm/DeepSeek-V3.1-Terminus-GGUF
Base model
deepseek-ai/DeepSeek-V3.1-Base