Skip to content

Re-evaluate DFlash 2 speculative decoding when Ollama or llama.cpp ships it #4568

Description

@atomantic

Context

DFlash 2 speculative decoding was evaluated on 2026-08-19 and rejected for now — full write-up with the verified evidence in
docs/research/2026-08-19-dflash2-speculative-decoding.md.

Short version: DFlash 2 is engine-side decoding machinery plus a drafter checkpoint. Ollama — the backend that serves the Ollama
provider and both Ollama-backed TUI providers (Claude, OpenCode) — ships DFlash v1 (x/models/dflash), has no DFlash 2
candidate-selector / depthwise-conv modules, and publishes no -dflash tag for the Qwen3.8 targets. Every engine that can run it
(llama.cpp, vLLM, SGLang) is reachable only from an unmerged PR, and adopting one would mean PortOS taking on a third local
inference backend built from a patch.

Trigger to re-open

Re-evaluate when either holds — either one collapses the work to a catalog entry rather than a backend:

  1. Ollama publishes a packaged DFlash 2 tag for a Qwen target — a qwen3.8:27b-dflash2-shaped tag resolving to one
    self-contained model — and it measurably decodes faster than qwen3.8:27b-mlx on the same machine.
  2. llama.cpp #27342 merges and Ollama's vendored engine picks it up.

Note that Ollama's existing DFlash v1 tag on another model was reported to decode at non-DFlash speed
(ollama#17683, closed not planned) — so "a tag exists" is not sufficient. Benchmark
before cataloging.

Decision already made (do not re-litigate)

If the trigger fires, the integration is a curated catalog entry for the packaged tag, not a new backend and not a drafter
sidecar install. This follows the precedent in docs/research/2026-08-16-qwen38-mlx-macos.md: PortOS recommends the complete,
engine-native model and does not own a speculative target/drafter pairing runtime.

Work when unblocked

  • Benchmark the packaged tag against qwen3.8:27b-mlx on Apple Silicon (tokens/sec, decode only, same prompt and context).
  • If it wins: add the tag to the curated local-LLM catalog (server/lib/localLlmCatalog.js), gated to the platforms where it is
    actually faster, mirroring how qwen3.8:27b-mlx is gated to Apple Silicon.
  • Re-check the drafter exclusion in server/services/huggingFaceCatalog.js (hasDrafterTag / isMlxDrafter) — a packaged tag
    must not be filtered out by it, while the bare drafter sidecars must stay filtered.
  • Add a short "superseded by" note at the top of docs/research/2026-08-19-dflash2-speculative-decoding.md.

Acceptance criteria

  • Either the packaged tag is cataloged with a benchmark number recorded in a dated research note, or this issue is closed with the
    benchmark showing no win.
  • No drafter sidecar becomes installable as a standalone chat model as a side effect.

Blocked on

Upstream: llama.cpp #27342 and/or an Ollama release shipping a DFlash 2 Qwen tag. Labeled blocked so autonomous claim runs skip it
until then.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    blockedBlocked on another issue/PR — skip in autonomous claim runsenhancementNew feature or requestplanTracked by /do:replan

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions