Skip to content

Instantly share code, notes, and snippets.

@abatilo
Last active August 19, 2026 00:12
Show Gist options
  • Select an option

  • Save abatilo/cdf506c57635fb01322fff025906f75c to your computer and use it in GitHub Desktop.

Select an option

Save abatilo/cdf506c57635fb01322fff025906f75c to your computer and use it in GitHub Desktop.
Amestris DFlash2 executable seed ideas

DFlash2 executable seed ideas

These ideas target the immutable SPECULATIVE_DECODING_V1 Truth workload on Qwen/Qwen3-8B. A DFlash2 artifact uses an eight-token verify block, temperature 0, concurrency 16, the published two-tap group-16 dynamic causal convolutions around every attention and MLP sublayer, and the published rank-256 top-16 adjacent-pair candidate selector. The authorized numeric comparator is Evaluation 3HnQfcMqXmLCFdIzsU0mkXnXNo0, whose aggregate mean acceptance length is 3.826854272156405.

The architecture and inference contract come from z-lab/dflash commit 07ebd93db9f472af339b644bb70221ad8428328a, especially dflash/model.py, and SGLang serving commit 6228c78dd28368babedaa24d264266912c934b32. Upstream publishes no DFlash2 training loop or selector loss. The DFlash2 control therefore adapts the pinned TorchSpec DFlash trainer without claiming training-recipe reproduction. D-PACE comes from arXiv 2605.18810v1; its detached position weights apply only to the full-vocabulary unary cross-entropy, while the selector loss remains a separate term.

MODEL: Implement faithful DFlash2 for the fixed Truth profile

Rationale: Add the published two-tap group-16 dynamic causal convolutions before and after every draft attention and MLP sublayer, plus the published rank-256 top-16 adjacent-pair selector; its effect on fixed-profile aggregate mean acceptance length is unknown.

Falsifier: Reject when fixed-profile aggregate mean acceptance length is less than or equal to 3.826854272156405.

LOSS: Combine D-PACE with faithful DFlash2

Rationale: Apply detached alpha-0.5 D-PACE weights only to DFlash2 full-vocabulary unary cross-entropy while training the selector loss separately; its effect on fixed-profile aggregate mean acceptance length is unknown.

Decision rule: Use the exact terminal DFlash2 parent Evaluation as the matched comparator. Support the D-PACE child only when its fixed-profile aggregate mean acceptance length is greater than the parent Evaluation's measured aggregate mean acceptance length. Reject when it is less than or equal to that exact parent value.

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