23v commited on
Commit
3ccb135
·
verified ·
1 Parent(s): 6625f56

Create app_deepseek.py

Browse files
Files changed (1) hide show
  1. app_deepseek.py +8 -0
app_deepseek.py CHANGED
@@ -1567,6 +1567,14 @@ class LlamaServer:
1567
  # else: leave -ngl unset so llama.cpp's default --fit adjusts layers to the free VRAM
1568
  else:
1569
  cmd += ["-ngl", "0"]
 
 
 
 
 
 
 
 
1570
  return cmd + self.extra_args
1571
 
1572
  def tail(self, n: int = 25) -> str:
 
1567
  # else: leave -ngl unset so llama.cpp's default --fit adjusts layers to the free VRAM
1568
  else:
1569
  cmd += ["-ngl", "0"]
1570
+ if self._has("--fit"):
1571
+ # FIX: pure-CPU startup crash (code -6, GGML_ASSERT(*cur_backend_id != -1) failed inside
1572
+ # ggml_backend_sched_split_graph, raised from common_fit_params/graph_reserve). --fit defaults to
1573
+ # "on" in this llama.cpp build and tries to auto-place tensors across devices even with GPUs:none;
1574
+ # on a CPU-only MoE model (e.g. DeepSeek-V4-Flash, GLM-4.5-Air) that scheduling pass hits a tensor
1575
+ # with no valid backend id and aborts. -ngl is already pinned to 0 above, so there is nothing for
1576
+ # --fit to usefully decide on this path -- just turn it off.
1577
+ cmd += ["--fit", "off"]
1578
  return cmd + self.extra_args
1579
 
1580
  def tail(self, n: int = 25) -> str: