Skip to content

feat: add tensor overrides and batch size controls for hybrid offloading - #283

Merged
Defilan merged 1 commit into
mainfrom
feat/hybrid-offloading-phase2
Apr 17, 2026
Merged

Defilan merged 1 commit into
mainfrom
feat/hybrid-offloading-phase2

Conversation

@Defilan

@Defilan Defilan commented Apr 17, 2026

Copy link
Copy Markdown
Member

Summary

Phase 2 of hybrid GPU/CPU offloading (ref #280). Adds three new InferenceServiceSpec fields for fine-grained inference tuning:

  • tensorOverrides ([]string): regex-based tensor placement via --override-tensor. Enables expert-level placement decisions beyond the typed moeCPUOffload flag (e.g., [\"exps=CPU\", \"blk\\\\.(0|1)\\\\.ffn_.*=CUDA0\"])
  • batchSize (*int32, 1-16384): prompt processing batch size via --batch-size. Tuning this amortizes PCIe overhead in hybrid MoE workloads
  • uBatchSize (*int32, min 1): decoding micro-batch size via --ubatch-size

Notable implementation detail

This feature was implemented by Qwen3.6-35B-A3B running on dual RTX 5060 Ti GPUs with Phase 1 hybrid offloading from #281. The model handled the full implementation in 32 minutes of active agent time: 56 tool calls, 100% success rate, 9 unit tests plus integration test updates, Helm CRD sync, and all verification commands green.

Test plan

  • 9 unit tests (3 per field: positive, nil, zero/empty)
  • Updated "GPU model with all llama.cpp options" integration test
  • `make test` passes (controller coverage 82.4%)
  • `make generate && make manifests` clean
  • Helm chart CRD synced with generated CRD
  • Sample YAML shows commented examples

Ref #280 (Phase 2 of 3, Phase 3 still tracked in the issue)

Phase 2 of hybrid GPU/CPU offloading support (ref #280). Adds three new
InferenceServiceSpec fields for fine-grained inference tuning:

- tensorOverrides: regex-based tensor placement (--override-tensor)
- batchSize: prompt processing batch size (--batch-size)
- uBatchSize: decoding micro-batch size (--ubatch-size)

These controls are particularly useful for hybrid MoE workloads where
batch size tuning amortizes PCIe overhead and tensor overrides enable
expert-level placement decisions beyond the typed moeCPUOffload flag.

This feature was implemented by Qwen3.6-35B-A3B running via llama.cpp
with hybrid CPU/GPU offloading on dual RTX 5060 Ti GPUs, deployed by
LLMKube itself with the Phase 1 offloading support from #281.

Signed-off-by: Christopher Maher <chris@mahercode.io>
@Defilan
Defilan merged commit 8be4adc into main Apr 17, 2026
16 checks passed
@Defilan
Defilan deleted the feat/hybrid-offloading-phase2 branch April 17, 2026 17:26
@github-actions github-actions Bot mentioned this pull request Apr 17, 2026
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.

1 participant