Launch command for Orin 64GB

#22
by kryll666 - opened

You'll need the MTP branch called qwen4exp/mtp from https://github.com/danielhanchen/llama.cpp and build it first.

Then run:

#!/bin/bash

# Resolve model path relative to this script's own directory, so it works from anywhere
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
MODEL="AtomicChat/Qwen3.8-Flash-Next-GGUF:Q4_K_M"
MMPROJ=".cache/huggingface/hub/models--AtomicChat--Qwen3.8-Flash-Next-GGUF/snapshots/142262902a46f7daed19c79d0771534c8106ad59/mmproj-Qwen3.8-Flash-Next-BF16.gguf"
# Check in unslot's huggingface repository
MPTFILE="mtp-Qwen3.8-Flash-Next-shared-Q4_K_M.gguf"
# Disabled since they burn precious memory for nothing
#   --mmproj "$MMPROJ" \
# Not worth it. Computing MTP heads on the CPU doesn't improve the inference rate
#   --spec-draft-ngl 0 \


$HOME/llama.cpp.mtp/build/bin/llama-server \
  -hf "$MODEL" \
  --no-mmproj \
  -ngl 99 \
  --n-cpu-moe 0 \
  -fa on \
  -fit off \
  --load-mode mlock \
  --parallel 1 \
  --port 8000 \
  --host 0.0.0.0 \
  --ctx-size 131072 \
  -b 4096 \
  --cache-reuse 256 \
  --ubatch-size 512 \
  --cache-type-k q4_0 \
  --cache-type-v q4_0 \
  --temp 0.7 \
  --top-p 0.90 \
  --top-k 20 \
  --min-p 0.0 \
  --presence-penalty 0.0 \
  --repeat-penalty 1.0 \
  --seed 1902 \
  --log-colors on \
  --threads 12 \
  --jinja \
  --spec-type draft-mtp \
  --model-draft "$MPTFILE" \
  --spec-draft-type-k q4_0 \
  --spec-draft-type-v q4_0 \
  --spec-draft-n-min 1 \
  --spec-draft-n-max 1 \
  --chat-template-kwargs '{"reasoning_effort":"medium"}' \
  --reasoning-preserve

I've also disabled all useless services to free as much memory are possible and I have a 8GB swap set up (but only 1GB is used in inference).
This is the best config found by (numerous) trials and a lot of errors. I'm getting ~130t/s in pp and 19 t/s in eval for what it's worth. This model is made for very very short system context.

Correct me if I'm wrong but threads 12 does not make any difference, right? Because you are offloading nothing to the cpu (cpu-moe 0). In my experience if you are able to raise batch size and ubatch size you will get better tokenization performance. In a longer context I'm getting around 200-220t/s with a 5070Ti and a 3090.

Sign up or log in to comment