Commit Graph
3 Commits
Author SHA1 Message Date
Eddoursul 8029fa9df7 Unsloth Dynamic 3.0 model files
The engine now runs unsloth's Qwen3.8-Flash-Next quants (UD-IQ1_S up to
UD-Q6_K_XL and Q8_0) as native packs, besides the ISTA-DASLab files.

- Split models: --native takes the first shard and finds the others by
  name (gguf_split_paths, GgufModel). The expert arena is filled from the
  shards by tensor name and checked against native_experts.txt, whose
  lines no longer carry shard-1 offsets. The native head and embedding are
  found in any shard, and --ple-gguf defaults to the shard that holds
  per_layer_token_embd.
- GPU kernels: expert dot products and dequantizers for Q4_K, Q5_K, Q6_K,
  Q5_1, Q8_0, IQ1_S and IQ4_XS (llama.cpp's), one dispatch list for all
  formats, and a startup check that every layer's formats have kernels.
  The Q5_1 min and IQ1_S delta terms use the quantized activation sums, as
  ggml-cpu does: 1.1% instead of 1.9% relative error per expert.
- PLE: the table may be IQ4_NL or Q8_0 and may share its shard with other
  tensors; the native PLE key may be any native MMVQ type (Q8_0 here).
- tools/iq_pack.py: all shards of a split model, and every float tensor in
  the form the engine takes. The files' F32 router, SSM gate and injection
  tensors hold BF16 values (exact); their Q8_0 hyper-connection and PLE
  value weights are re-rounded to BF16.
- native_expert_parity: split models, a --synthetic mode for formats with
  no model file at hand, and a check of the GPU dequantizers.
- README: the unsloth files, their RAM needs and how to pack them.

UD-Q4_K_XL on an RTX 3090 (160 GB RAM): prompts 529-594 tok/s, generation
49-57 tok/s. Greedy tokens equal llama.cpp's argmax on the same GGUF at
98.2% (code) and 95.6% (thinking) of positions.
2026-09-25 01:54:29 +02:00
Eddoursul 0aaa754656 Prompt cache for --serve
A request continues from the longest prefix of its prompt the engine still
holds: the live sequence, checkpoints of the fixed-size sequence state (GDN
recurrence and conv history, QSA indexer tail, PLE history) in host memory,
or a conversation another request replaced, stashed in RAM with its K/V
cells. Checkpoints are taken before a prompt's last <|im_start|>, at the
prompt's end and every --cache-every cells of a long prompt.

Short prompt remainders go through verify windows instead of the batched
prompt path. The decode loop no longer verifies past the output limit or a
drafted end-of-turn token, so the live state ends where the emitted text does.

The server reports reused tokens (OpenAI prompt_tokens_details.cached_tokens,
Anthropic cache_read_input_tokens) and drains the engine to DONE inside the
request lock.

New engine options: --prompt-cache N, --cache-ram MIB, --cache-every N,
--feed-max N.
2026-09-25 00:10:51 +02:00
Niko1221andClaude Opus 5.5 f2a08d4b2d Strata: Qwen3.8-Flash-Next on a 12-24 GB NVIDIA GPU + 64 GB RAM, one-click install
Inference engine, OpenAI/Anthropic API on localhost, optional image input, one-file setup
(START-HERE.bat / setup.sh). Model files are downloaded from Hugging Face by the setup.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0154bwiad8gY7wRehCXy27pN
2026-09-24 18:42:20 +02:00