[GH-ISSUE #443] Experimental: compress-then-correct (lossy expert routing + exact re-decode) for DeepSeek on V100, feedback wanted #182

Open
opened 2026-10-29 21:22:12 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @JadDid911 on GitHub (Oct 24, 2026).
Original GitHub issue: https://github.com/mw00/project-maya/issues/443

Hi, thanks for Maya. I've been running DeepSeek-V4.1-Flash-1017 (Maya-S) on two Tesla V100-PCIE-32GB and built an experimental, opt-in addition to maya-ds4 that I'd like feedback on before any PR:

Branch: https://github.com/JadDid911/project-maya/tree/ctc (docs: docs/CTC.md)

What it is: compress-then-correct decoding, the method Ryan Flavell published with PROMETHEVS (https://github.com/Magnvs7/Promethevs), re-implemented inside maya-ds4 (no PROMETHEVS code copied):

  • a lossy cheap path in route_publish_kernel: drop routed slots under a weight share (CTC_SKIP) and substitute non-VRAM-resident experts at ranks >= CTC_SUB_KEEP with resident runners-up; the upstream finalisation block is kept verbatim in the non-lossy branch;
  • a top-1 minus top-2 logit margin gate (--exact-gate F); flagged tokens are rolled back with the existing rollback() and re-decoded exactly (tricks off, or with --exact-pack DIR the routed experts come from a second FP4 pack on the CPU lane);
  • STAT fields (ctc_vram ctc_skip ctc_sub ctc_flag ctc_over ctc_ms ctc_fp4) and a test harness over the serve protocol.

Everything is off by default; without the env vars and flags the engine behaves as upstream.

Measured (2x V100-PCIE-32GB, i7-9700K, 32 GB RAM, model on a SATA hard drive, 160 greedy tokens, 3 prompts):

config VRAM-served share of expert picks ms/token
plain 0.61-0.86 2142-4951
lossy (skip 0.12, keep 3) 0.81-0.95 1124-2478
lossy + every token re-decoded exactly (oracle) n/a 2233-3327 (3-4 overturns per 159 tokens)

Absolute speeds are hard-drive bound; the point is the per-token time roughly halving on identical hardware. Gate-0.45 results, the FP4 exact pack (implemented, not yet built/run) and NVMe / three-card numbers are still to come, and I'll post them here.

Questions: is this something you'd consider as an opt-in upstream feature (env vars renamed to your convention), and is route_publish_kernel the right place for the lossy routing in your view?

Originally created by @JadDid911 on GitHub (Oct 24, 2026). Original GitHub issue: https://github.com/mw00/project-maya/issues/443 Hi, thanks for Maya. I've been running DeepSeek-V4.1-Flash-1017 (Maya-S) on two Tesla V100-PCIE-32GB and built an experimental, opt-in addition to `maya-ds4` that I'd like feedback on before any PR: **Branch:** https://github.com/JadDid911/project-maya/tree/ctc (docs: [`docs/CTC.md`](https://github.com/JadDid911/project-maya/blob/ctc/docs/CTC.md)) **What it is:** compress-then-correct decoding, the method Ryan Flavell published with PROMETHEVS (https://github.com/Magnvs7/Promethevs), re-implemented inside `maya-ds4` (no PROMETHEVS code copied): - a lossy cheap path in `route_publish_kernel`: drop routed slots under a weight share (`CTC_SKIP`) and substitute non-VRAM-resident experts at ranks >= `CTC_SUB_KEEP` with resident runners-up; the upstream finalisation block is kept verbatim in the non-lossy branch; - a top-1 minus top-2 logit margin gate (`--exact-gate F`); flagged tokens are rolled back with the existing `rollback()` and re-decoded exactly (tricks off, or with `--exact-pack DIR` the routed experts come from a second FP4 pack on the CPU lane); - STAT fields (`ctc_vram ctc_skip ctc_sub ctc_flag ctc_over ctc_ms ctc_fp4`) and a test harness over the serve protocol. Everything is off by default; without the env vars and flags the engine behaves as upstream. **Measured (2x V100-PCIE-32GB, i7-9700K, 32 GB RAM, model on a SATA hard drive, 160 greedy tokens, 3 prompts):** | config | VRAM-served share of expert picks | ms/token | | --- | --- | --- | | plain | 0.61-0.86 | 2142-4951 | | lossy (skip 0.12, keep 3) | 0.81-0.95 | 1124-2478 | | lossy + every token re-decoded exactly (oracle) | n/a | 2233-3327 (3-4 overturns per 159 tokens) | Absolute speeds are hard-drive bound; the point is the per-token time roughly halving on identical hardware. Gate-0.45 results, the FP4 exact pack (implemented, not yet built/run) and NVMe / three-card numbers are still to come, and I'll post them here. Questions: is this something you'd consider as an opt-in upstream feature (env vars renamed to your convention), and is `route_publish_kernel` the right place for the lossy routing in your view?
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
mw00/project-maya#182
No description provided.