File size: 979 Bytes
2eb778b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/usr/bin/env bash
set -euo pipefail

apply_or_verify() {
  local patch_file="$1"
  local target_file="$2"
  local marker="$3"

  if patch --batch --forward --dry-run -p0 -d / -i "${patch_file}" \
      >/dev/null 2>&1; then
    patch --batch --forward -p0 -d / -i "${patch_file}"
  elif ! grep -qF "${marker}" "${target_file}"; then
    echo "Patch does not apply and its marker is absent: ${patch_file}" >&2
    exit 1
  fi
}

apply_or_verify \
  /release/patches/v20-mtp-online-quant-inheritance.patch \
  /opt/venv/lib/python3.12/site-packages/vllm/config/speculative.py \
  "Same-checkpoint MTP/DSpark drafts inherit the target's"

apply_or_verify \
  /release/patches/v20-sparkinfer-carry-fold.patch \
  /opt/venv/lib/python3.12/site-packages/sparkinfer/attention/nsa_indexer/paged.py \
  "SPARKINFER_PAGED_INDEX_TWO_LEVEL_FOLD"

install -m 0755 \
  /release/serve-glm52-v16.context-cap.sh \
  /usr/local/bin/serve-glm52-v16.sh

exec /usr/local/bin/serve-gilded-gnosis.sh