Skip to content

feat(exl3): persist deterministic adjacent mixed-tier plans - #3597

Merged
Qubitium merged 19 commits into
ModelCloud:mainfrom
tpurtell:upstream/17-exl3-inline-mixed-tiers-20261108
Nov 9, 2026
Merged

Qubitium merged 19 commits into
ModelCloud:mainfrom
tpurtell:upstream/17-exl3-inline-mixed-tiers-20261108

Conversation

@tpurtell

@tpurtell tpurtell commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

Summary

Expose validated inline mixed-tier policies, projection scoring, deterministic per-layer tier selection, and durable readable plan publication. Execution and requantization wiring follows in the processor layer.

This is layer 17/36, extracted from an already-used fork for initial maintainer feedback. It depends on #3596. Review only this feature; the cross-fork Files changed view is cumulative because the PR targets upstream main.

Incremental change: 4 files, +808/−0 lines, including carried tests and the mechanism reference. No merge is automatic. Review value and API shape first; substantial rework can follow that feedback.

Flow and existing-code boundary

flowchart TD
    S0["inline_mixed_policy"]
    S1["build_layer_tier_plan"]
    S2["InlineMixedTierPlanStore"]
    M2_0["InlineMixedTierPlanStore.__init__"]
    M2_1["InlineMixedTierPlanStore.load"]
    M2_2["InlineMixedTierPlanStore.commit"]
    E["ValueError"]
    S0 -->|"raises on rejected input/state"| E
    S1 -->|"raises on rejected input/state"| E
    S2 -. "exposes" .-> M2_0
    S2 -. "exposes" .-> M2_1
    S2 -. "exposes" .-> M2_2
    S2 -->|"raises on rejected input/state"| E
    style E fill:#fee,stroke:#b22
Loading
Before this extraction layer Carried implementation
API absent in the previous stack layer (path/symbol checked) gptqmodel/utils/exl3_inline_mixed.py:177: inline_mixed_policy
API absent in the previous stack layer (path/symbol checked) gptqmodel/utils/exl3_inline_mixed.py:298: build_layer_tier_plan
API absent in the previous stack layer (path/symbol checked) gptqmodel/utils/exl3_inline_mixed.py:373: InlineMixedTierPlanStore

Committed reference: docs/exl3-inline-mixed-tiers.md, linked from README. Class entry points/calls and rejected-state paths describe code present in this branch, rather than planned integrations.

Validation

Carried test files: tests/test_exl3_inline_mixed.py

This packaging pass checked Python parsing, whitespace, dependency order and balanced Mermaid blocks. The author reports successful prior use of these features. Per the requested resource limit and feedback-first scope, existing model quantization, GPU/ROCm tests, heavyweight CPU workloads and full model benchmarks were not rerun; no new performance or model-accuracy claim is made. Tests accompanying earlier stack layers retain their previously reported results.

Serialize configs without the empty state-dict cleanup path and replace completed shard files atomically. Keep live config fields authoritative and preserve source-only extensions. Retain the previous shard on write failures.
Extract the existing working fork feature for first maintainer feedback. Preserve carried code and tests; limit validation to lightweight structural checks. See the linked mechanism reference for actual API/call and failure paths.
Extract the existing working fork feature for first maintainer feedback. Preserve carried code and tests; limit validation to lightweight structural checks. See the linked mechanism reference for actual API/call and failure paths.
Extract the existing working fork feature for first maintainer feedback. Preserve carried code and tests; limit validation to lightweight structural checks. See the linked mechanism reference for actual API/call and failure paths.
Extract the existing working fork feature for first maintainer feedback. Preserve carried code and tests; limit validation to lightweight structural checks. See the linked mechanism reference for actual API/call and failure paths.
Extract the existing working fork feature for first maintainer feedback. Preserve carried code and tests; limit validation to lightweight structural checks. See the linked mechanism reference for actual API/call and failure paths.
Extract the existing working fork feature for first maintainer feedback. Preserve carried code and tests; limit validation to lightweight structural checks. See the linked mechanism reference for actual API/call and failure paths.
Extract the existing working fork feature for first maintainer feedback. Preserve carried code and tests; limit validation to lightweight structural checks. See the linked mechanism reference for actual API/call and failure paths.

@Qubitium Qubitium left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Review (layer 17)

Reviewed the incremental layer-17 commit (f3b9d195f, 4 files, +808). The exact-rational policy parsing, largest-remainder quotas, causal per-layer distribution, and immutable tier-plan publication are sound. No functional bugs found; I pushed a lint-only fix commit (86e130615).

Fixed

  • Ruff gate: import ordering (I001) and two unnecessary dict comprehensions (C416, C420).

Verification

tests/test_exl3_inline_mixed.py: 6 passed. ruff check clean.

Notes (not changed)

  • InlineMixedTierPlanStore.commit validates the digest/policy/namespace but not the full plan structure; load performs the complete validation. A malformed plan can be published and will be rejected on resume.
  • path() checks layer_index < 0 but not its type, so a non-int raises TypeError rather than ValueError.
  • namespace_quotas assumes at most three projection classes for the largest-remainder pass (it slices ranked[:remainder]); fine for the fixed PROJECTION_ORDER but worth noting if the order grows.

@Qubitium
Qubitium marked this pull request as ready for review November 9, 2026 09:04
@Qubitium
Qubitium merged commit bddfeb3 into ModelCloud:main Nov 9, 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.

2 participants