DeepSeek-V3.1-Terminus-GGUF
595
8
1 language
Q4
ik_llama.cpp
by
ubergarm
Language Model
OTHER
New
595 downloads
Early-stage
Edge AI:
Mobile
Laptop
Server
Unknown
Mobile
Laptop
Server
Quick Summary
AI model with specialized capabilities.
Code Examples
IQ5_K 464.062 GiB (5.941 BPW)bashllama.cpp
#!/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 \
192smol-IQ5_KS 417.107 GiB (5.339 BPW)bash
#!/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 \
192Quick Startbashllama.cpp
# 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.Deploy This Model
Production-ready deployment in minutes
Together.ai
Instant API access to this model
Production-ready inference API. Start free, scale to millions.
Try Free APIReplicate
One-click model deployment
Run models in the cloud with simple API. No DevOps required.
Deploy NowDisclosure: We may earn a commission from these partners. This helps keep LLMYourWay free.