Skip to content

feat(dflash): --prefill-skip-park for 32 GB+ GPUs - #127

Merged
davide221 merged 1 commit into
Luce-Org:mainfrom
phazei:feat/dflash-skip-park-large-vram
May 8, 2026
Merged

davide221 merged 1 commit into
Luce-Org:mainfrom
phazei:feat/dflash-skip-park-large-vram

Conversation

@phazei

@phazei phazei commented May 8, 2026

Copy link
Copy Markdown
Contributor

The PFlash compress flow parks the target + draft to VRAM-backed scratch before loading the drafter, then restores them after scoring. The park/restore protects 24 GB cards (target ~16 GB Q4_K_M + draft ~3 GB + drafter KV ~1.3 GB + BSA scratch ~600 MB exceeds 24 GB without it) but adds like 9 s of fixed cost per compress call.

On a 32 GB card (RTX 5090) all three models fit co-resident, so the park/restore round trip is pure overhead.

Plumbs a skip_park flag from CLI to daemon:

  • --prefill-skip-park argparse flag (default off, behaviour unchanged for existing users).
  • PrefillConfig.skip_park carries the choice through both server.py and server_tools.py compress paths.
  • compress_text_via_daemon skips the park target / park draft and free drafter / unpark target / unpark draft round-trips when skip_park=True.
  • Server start sets DFLASH_COMPRESS_NO_PARK=1 in the daemon env when the flag is on; daemon compress handler then leaves the scorer resident, avoiding the ~2 s reload on every subsequent request.

The flag is opt-in. Users on 24 GB cards who pass it will OOM during compress; the help text calls out the 32 GB minimum.

The PFlash compress flow parks the target + draft to VRAM-backed scratch
before loading the drafter, then restores them after scoring. The
park/restore protects 24 GB cards (target ~16 GB Q4_K_M + draft ~3 GB +
drafter KV ~1.3 GB + BSA scratch ~600 MB exceeds 24 GB without it) but
adds ~2 s of fixed cost per compress call.

On a 32 GB card (RTX 5090) all three models fit co-resident, so the
park/restore round trip is pure overhead.

Plumbs a `skip_park` flag from CLI to daemon:

- `--prefill-skip-park` argparse flag (default off, behaviour unchanged
  for existing users).
- `PrefillConfig.skip_park` carries the choice through both server.py
  and server_tools.py compress paths.
- `compress_text_via_daemon` skips the `park target / park draft` and
  `free drafter / unpark target / unpark draft` round-trips when
  `skip_park=True`.
- Server start sets `DFLASH_COMPRESS_NO_PARK=1` in the daemon env when
  the flag is on; daemon `compress` handler then leaves the scorer
  resident, avoiding the ~2 s reload on every subsequent request.

The flag is opt-in. Users on 24 GB cards who pass it will OOM during
compress; the help text calls out the 32 GB minimum.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 4 files

@davide221

Copy link
Copy Markdown
Contributor

@phazei thanks for enabling faster execution for >24 gb cards!

@davide221
davide221 merged commit 8fe9a02 into Luce-Org:main May 8, 2026
1 check passed
smpurkis pushed a commit to smpurkis/lucebox-hub that referenced this pull request May 10, 2026
…ge-vram

feat(dflash): --prefill-skip-park for 32 GB+ GPUs
oliveagle pushed a commit to oliveagle/lucebox-hub that referenced this pull request May 22, 2026
…ge-vram

feat(dflash): --prefill-skip-park for 32 GB+ GPUs
oliveagle pushed a commit to oliveagle/lucebox-hub that referenced this pull request May 22, 2026
…ge-vram

feat(dflash): --prefill-skip-park for 32 GB+ GPUs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants