Commit Graph
53 Commits
Author SHA1 Message Date
Tarjei Mandt 3d3c83bbbd Merge remote-tracking branch 'origin/main' into ds41-perf
# Conflicts:
#	ds4.c
#	ds4_engram.c
2026-09-21 08:48:08 +10:00
Salvatore Sanfilippo d9bc45dbda Add fresh official V4.1 Flash continuations and router quality comparisons 2026-09-19 17:00:38 +02:00
Tarjei Mandt 258ad331dc Drop the embedded DSpark stages from the DeepSeek V4.1 engine 2026-09-20 00:50:12 +10:00
Tarjei Mandt b3d4a267c0 Open only the DSpark shards for a drafter-only DeepSeek V4.1 conversion 2026-09-19 09:46:34 +10:00
Tarjei Mandt 0b2d6e28cb Write only the DeepSeek V4.1 text tensors from the converter 2026-09-18 12:53:34 +10:00
Tarjei Mandt aea1a0bae9 Document DeepSeek V4.1 DSpark support files, two-rank drafting and idle-slot prefill 2026-09-17 14:27:09 +10:00
Tarjei Mandt a60edc61f5 Write the DeepSeek V4.1 DSpark stages to a separate support GGUF 2026-09-17 08:54:55 +10:00
Tarjei Mandt c016ea7730 Keep the released MXFP4 experts in the DeepSeek V4.1 converter 2026-09-17 08:54:55 +10:00
antirez 467b6f05a0 Harden Qwen Metal batch integration and quality checks 2026-09-16 14:14:36 +02:00
Salvatore Sanfilippo 63b5dca93e Add official Qwen quality references and validated API scoring
Collect references from Alibaba through OpenRouter with an explicit empty system message and no provider fallback. Validate token byte alignment and reject lossy Unicode metadata for API agreement while retaining continuation likelihood scoring.

Track 100 short and 12 long reference cases, Q2/Q4 default and quality controls, continued-prefill results, and independent long-context answers. Include collector and scorer regressions and document the hosted-checkpoint and precision limitations.
2026-09-15 15:00:11 +02:00
Salvatore Sanfilippo df6eedd972 Add optimized CUDA inference for Qwen3.8 Flash Next
Share the Metal session graph with CUDA for text and vision, MTP and exact sampling, steering, checkpoints, and disk-only BF16 n-grams. Add bounded concurrent Linux n-gram reads, vectorized dense and expert kernels, register-held recurrent prefill state, and efficient small speculative batches.

Keep Qwen out of DeepSeek batch dispatch and exclude disk n-grams from resident memory accounting. Use normal file-backed weight loading in diagnostics and link n-gram support into the CUDA quality scorer.

Include independent kernel and memory-safety tests, mixed-prefill and recovery checks, long-context server and agent coverage, and user documentation with measured DGX Spark performance.
2026-09-15 15:00:11 +02:00
antirez 97ba327538 Read Qwen native BF16 n-grams directly from the GGUF
Keep the table outside model mappings and Metal residency. Use bounded explicit reads, reject failed lookups before GPU consumption, and remove the runtime sidecar option and paging controls. Preserve Qwen hash and speculative state handling; cover malformed files and exact recovery after prefill, decode, and MTP read failures.
2026-09-14 13:32:48 +02:00
antirez e68bcc8fab Package Qwen with original BF16 n-grams 2026-09-14 13:00:36 +02:00
Salvatore Sanfilippo cbaf6cd336 Use explicit Qwen scoring inputs and remove an unused CUDA stub
Add --ple to the official continuation scorer and use its existing --rendered-prompt option instead of rewriting hardcoded token IDs through an environment variable. Remove the unreferenced multi-shard mapping stub introduced by the PR.
2026-09-14 11:06:16 +02:00
ccea768827 Add Qwen3.8 Flash Next model support
Implement qwen4exp loading, tokenizer and chat formatting, PLE sidecars,
Metal text and vision graphs, built-in MTP, and recurrent KV persistence.
Integrate the CLI, agent, server, download targets, and conversion tools.

Preserve the native Q4_1 encoder, Q4_K accumulation guard, and shared
quantizer build target. Keep exact-MTP rewind and vision-cache row-width
fixes. Persist valid logits and recurrent state at completed prefill chunks,
and reuse Qwen text-answer history when tools clients omit reasoning.
Retain exact reasoning replay and test continued checkpoints, cancellation,
cache eviction, and restart reuse with and without reasoning_content. Include
reproducible charts and measurements comparing throughput before and after
the checkpoint fixes on M3 Ultra.

Add Qwen trunk steering and prompt activation capture, including GDN layers.
Keep the MTP predictor outside the 48-row bank and preserve prompt dumps
through one-token prefill tails and multi-row speculative verification.
Recover Chrome target creation and retain its last page target. Preserve
full agent transcripts in stripped-session format when KV no longer fits,
while retaining the newer automatic compaction and continuation logic.
Add steering/MTP/capture, Chrome CDP recovery, and full-session save/reload
regressions. Adapt the intended changes from fork PRs #13 and #7.

Reconcile with antirez main bd66c40, preserving DeepSeek v4.1 model IDs,
tool syntax, session state, and Metal kernel dispatch. Exclude superseded
engine code and prototypes.

Co-authored-by: Andreas Parusel <aparuael@7170c824-6152-4cf1-985e-9503832ce673.fritz.box>
Co-authored-by: david <contact@davidberard.fr>
Co-authored-by: Michael Kuebbeler <cropduster@users.noreply.github.com>
Co-authored-by: Ogilthorp3 <bertrand@nepveu.name>
Co-authored-by: anemll <realanemll@gmail.com>
2026-09-13 14:57:29 +02:00
Salvatore Sanfilippo bd66c40207 DeepSeek v4.1 Flash support for Metal 2026-09-12 11:47:54 +02:00
Donato Capitella 85a4f0e611 tests: validate complete score tables and frontier logits
Add two offline standard-library utilities with 30 host tests. Require complete API-covered official-score manifests, finite consistent values and matched denominators; optionally enforce per-case identity. Validate every expected ds4-bench frontier and complete float32 vector, preserving signed zero and reporting drift separately from invalid artifacts.

The existing comparator silently accepts missing rows, duplicate rows and NaN in reproduced controls; the validator rejects them. Saved Flash/Vision 100-case pairs pass unchanged. The frontier tool detects full-vector drift despite matching argmax IDs at all four measured frontiers. Document use and scope without changing inference or introducing model/GPU dependencies.
2026-09-06 21:37:42 +01:00
Salvatore Sanfilippo 189ff0b302 Add long GLM FP8 references with reasoning-aware scoring 2026-09-05 20:26:22 +02:00
Salvatore Sanfilippo eb847ac568 Fix official-score logprob parsing for null API responses 2026-09-05 20:03:38 +02:00
Salvatore Sanfilippo fc8bf3c39c Add DeepSeek V4 Flash vision support 2026-09-01 00:11:58 +02:00
antirez 5da32061ba Merge GLM 5.3 SSD streaming and full checkpoint support
# Conflicts:
#	ds4.c
#	tests/test_glm53_kda.c
2026-08-31 13:25:05 +02:00
Salvatore Sanfilippo dcc70b41ef Generalize GLM quantization for full checkpoints 2026-08-31 03:33:22 -07:00
Salvatore Sanfilippo 10badf696c Quantize GLM 5.3 Q4 dense weights to Q8 2026-08-30 15:19:00 +02:00
antirez b0c31af367 Improve GLM 5.3 attention memory and batching 2026-08-29 02:15:31 +02:00
Salvatore Sanfilippo 47713296d5 Add GLM 5.3 Flash vision support 2026-08-28 23:26:29 +02:00
antirez 147109a3cc Add GLM 5.3 Flash inference
Implement GLM 5.3 Q2 and Q4 inference across Metal and CUDA, including tensor parallelism, RDMA, batching, MTP, snapshots, SSD streaming, and GLM 5.2 shared-path improvements.

Add quantization and validation tools, official quality fixtures, model downloads, regression coverage, release QA, and user documentation.
2026-08-28 23:26:29 +02:00
antirez 3c63c06c5a qa: add DeepSeek V4 Pro 0813 oracle
Keep the preview oracle intact, add the 100-case official 0813 fixture, and record the source, conversion, safety, quality, hash, and publication results.
2026-08-23 15:05:13 +02:00
antirez ed5c1a92c6 gguf: harden DeepSeek PRO quantization
Load compression ratios from the source checkpoint instead of retaining stale template metadata. Stop Q2_K/Q4_K refinement when an accepted fit collapses the search range.
2026-08-23 15:05:13 +02:00
Salvatore Sanfilippo a968c08d76 Make model conversion size checks overflow-safe
Validate FP8 and FP4 shape products before comparing buffer sizes or allocating converted tensors, including the packed FP4 dimension expansion.
2026-08-04 13:43:58 +02:00
Luigi Colluto c7689dbcf0 Reject impossible model-file sizes
Bound safetensors and GGUF length fields by the bytes remaining in the file, cross-check FP8/FP4 tensor storage against declared shapes, and reject impossible metadata and tensor counts before allocation.

Closes #542

Closes #543

Closes #545
2026-08-04 13:24:12 +02:00
antirez ae504c963e Update Flash downloads and DSpark support for 0731 2026-08-04 13:00:44 +02:00
antirez 67d97ab48d Add native MXFP4 inference to CUDA 2026-08-03 13:13:50 +02:00
antirez df341214a9 Merge branch 'ds4f-mxfp4' 2026-08-03 10:12:26 +02:00
antirez e21f84db12 qa: link official scorer with CUDA MMQ 2026-08-02 13:05:39 +02:00
antirez 80df56af40 Refresh DeepSeek V4 Flash 0731 quality fixtures 2026-08-01 11:46:40 +02:00
Salvatore Sanfilippo 860e673123 Scope strict imatrix checks to weighted quants 2026-08-01 09:50:05 +02:00
Salvatore Sanfilippo 725b084db3 Add lossless DeepSeek MXFP4 GGUF conversion 2026-08-01 09:50:05 +02:00
antirez 66cbce5289 Unify distributed inference CLI and documentation 2026-07-18 18:50:24 +02:00
antirez 36ee8c1407 Add CUDA tensor parallelism and session batching 2026-07-18 18:50:03 +02:00
antirez 005afedcd9 Add GLM 5.2 inference and quality fixtures 2026-07-18 18:48:45 +02:00
antirez 63d9874c54 Add two-machine Metal tensor parallelism 2026-07-18 18:47:58 +02:00
antirez fc9efd1cc7 Add DSpark speculative decoding 2026-07-18 18:47:26 +02:00
user b1703f3148 Document model-specific continuation data 2026-05-25 07:02:33 +02:00
user 68cd2c00a3 Support PRO official continuation collection 2026-05-25 06:57:35 +02:00
user 04f151dc8a DeepSeek v4 PRO support
Add DeepSeek V4 Pro support on top of main.

- add Flash/Pro shape selection and Pro Metal inference support
- fix shared SwiGLU clamp and indexer QAT behavior for Flash and Pro
- update eval/context tooling and imatrix quantization for Pro
- tag KV caches/sessions with model ids so Flash and Pro state cannot cross-load
- remove misc/PRO.md from tracked files while leaving it as a local scratch log
2026-05-25 00:04:54 +02:00
user 93d9d96264 Add mixed GGUF splicing tool 2026-05-21 08:02:03 +02:00
antirez b166a7306f Audit ds4-eval benchmark prompts
Remove SuperGPQA rows with broken upstream keys from ds4-eval instead of locally re-keying them. Replace them with cleaner self-contained SuperGPQA items, document the audited SuperGPQA slice, and regenerate the imatrix calibration prompts so benchmark-derived calibration no longer includes the broken items.
2026-05-16 10:48:36 +02:00
antirez e258d511e8 Clean up ds4-eval benchmark items 2026-05-16 09:14:20 +02:00
antirez 1f6a8fe3f4 Broaden imatrix calibration prompts
Add language/prose calibration tasks, include ds4-eval benchmark prompts without answer keys, and expand long-context prompts with code synthesis, agent transcript replay, trace diagnosis, prose fact recovery, document comparison, delayed constraints, and a small needle task. Regenerate the rendered prompt files and manifest so the corpus stays reproducible.
2026-05-15 23:40:55 +02:00
antirez 950e8e6474 Preserve literal tool result text
Render tool result bodies as raw text so file contents containing angle brackets reach the model unchanged. Escape only the tool_result closing sentinel, and keep the imatrix prompt renderer mirror in sync.

Fixes #152
2026-05-15 20:16:36 +02:00