Commit ea67fea
Update llama.cpp submodule to 5e9c63546 (#941)
* Update llama.cpp submodule to 5e9c63546
* Update llama.cpp patches for 5e9c63546
- Remove obsolete common_chat.cpp.patch (deepseek v3.1 function was
deleted upstream in chat template refactoring)
- Regenerate all patches to match new upstream line numbers
- Fix gguf.cpp patch for gguf_init_from_file_impl -> gguf_init_from_file_ptr rename
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Remove common_chat.cpp.patch from patch README
The patch was deleted as the upstream function it targeted
(common_chat_params_init_deepseek_v3_1) was removed in a refactoring.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Update BUILD.mk and fix API breakage for llama.cpp 5e9c63546
BUILD.mk changes (llama.cpp and llamafile):
- Add new common/ sources: chat-auto-parser-generator, chat-auto-parser-helpers,
chat-diff-analyzer, hf-cache, reasoning-budget
- Remove deleted common/ sources: chat-parser-xml-toolcall, chat-parser
- Add src/models/gemma4-iswa.cpp
- Add tools/server/server-tools.cpp (both BUILD.mk files)
- Add new mtmd models: deepseekocr, gemma4v, hunyuanocr, step3vl, mtmd-image
API fix:
- Replace thinking_forced_open (removed upstream in chat template
refactoring) with generation_prompt in chatbot_cli.cpp and
chatbot_main.cpp
Test fix:
- Add jinja library objects to extract_data_uris_test deps (jinja
types now have separate compilation units)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Adding Q1 to tinyblas
* Fix TinyBLAS Q1_0 dispatch for upstream block format (QK1_0=128)
Upstream llama.cpp's Q1_0 uses 128-element blocks (QK1_0=128), which
matches what was previously called Q1_0_g128 in the add-prismml branch.
The TinyBLAS code was using the 32-element Q0 handlers for Q1_0, causing
it to fall back to the slow generic ggml path.
- Route Q1_0 sgemm/mixmul to the g128 handlers (128-element blocks)
- Remove Q1_0_g128 sgemm case (type doesn't exist in upstream)
- Replace block_q1_0_g128 references with block_q1_0 in tinyblas_cpu.h
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Fix server web UI: update assets for upstream's new bundled format
Upstream llama.cpp changed from a single gzipped index.html to separate
index.html + bundle.js + bundle.css files, gated behind LLAMA_BUILD_WEBUI.
- Update SERVER_ASSETS to generate all 4 .hpp files
- Add -DLLAMA_BUILD_WEBUI to server compilation flags
- Remove reference to index.html.gz (no longer exists)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Add server-models.cpp patch for XNU futex timeout/EINTR crash
New upstream file tools/server/server-models.cpp has 3 unprotected
cv.wait() calls that crash on macOS with Cosmopolitan libc (ETIMEDOUT
after ~72 min idle, or EINTR from signal interruption).
Fix follows the same pattern as existing server-queue.cpp and log.cpp
patches: replace cv.wait() with wait_for(30s) loops, and block
SIGINT/SIGTERM on the stopping_thread via pthread_sigmask.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Block SIGINT/SIGTERM on httplib thread pool workers
The previous httplib patch only addressed ETIMEDOUT (converting wait()
to wait_for() loops). But wait_for() also throws on EINTR when a signal
interrupts the futex syscall. Add pthread_sigmask to block signals on
pool worker threads, matching the pattern used in server-queue.cpp and
log.cpp.
This fixes the "condition_variable timed_wait failed: Interrupted system
call" crash that occurs when the server is idle and receives a signal.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Honor --reasoning flag in chat mode
* Disable thinking mode except when thinking tests are running
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent b355cee commit ea67fea
30 files changed
Lines changed: 794 additions & 305 deletions
File tree
- llama.cpp.patches
- llamafile-files
- patches
- llamafile
- tests
- integration
- tests
- utils
Submodule llama.cpp updated from 7f5ee54 to 5e9c635
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
| 86 | + | |
86 | 87 | | |
87 | 88 | | |
88 | 89 | | |
| |||
116 | 117 | | |
117 | 118 | | |
118 | 119 | | |
119 | | - | |
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
| 91 | + | |
91 | 92 | | |
92 | 93 | | |
93 | 94 | | |
| |||
198 | 199 | | |
199 | 200 | | |
200 | 201 | | |
201 | | - | |
202 | | - | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
203 | 205 | | |
204 | 206 | | |
205 | 207 | | |
206 | 208 | | |
207 | 209 | | |
208 | 210 | | |
| 211 | + | |
209 | 212 | | |
210 | 213 | | |
211 | 214 | | |
| |||
222 | 225 | | |
223 | 226 | | |
224 | 227 | | |
| 228 | + | |
225 | 229 | | |
226 | 230 | | |
227 | 231 | | |
| |||
273 | 277 | | |
274 | 278 | | |
275 | 279 | | |
| 280 | + | |
276 | 281 | | |
| 282 | + | |
277 | 283 | | |
| 284 | + | |
278 | 285 | | |
| 286 | + | |
279 | 287 | | |
280 | 288 | | |
281 | 289 | | |
| |||
289 | 297 | | |
290 | 298 | | |
291 | 299 | | |
| 300 | + | |
292 | 301 | | |
293 | 302 | | |
294 | 303 | | |
| |||
316 | 325 | | |
317 | 326 | | |
318 | 327 | | |
319 | | - | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
320 | 331 | | |
321 | 332 | | |
322 | 333 | | |
| |||
336 | 347 | | |
337 | 348 | | |
338 | 349 | | |
339 | | - | |
| 350 | + | |
| 351 | + | |
340 | 352 | | |
341 | 353 | | |
342 | 354 | | |
| |||
373 | 385 | | |
374 | 386 | | |
375 | 387 | | |
376 | | - | |
| 388 | + | |
377 | 389 | | |
| 390 | + | |
378 | 391 | | |
379 | 392 | | |
380 | 393 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| |||
0 commit comments