P7: the loader consults the resolved allocation (plan→load wiring) - #1154
Merged
michalharakal merged 1 commit intoAug 26, 2026
Merged
michalharakal merged 1 commit into
michalharakal merged 1 commit into
Conversation
…iring Plan and load were two disjoint pipelines sharing vocabulary and never talking: nothing on the load path consulted what the resolvers decided. StreamingGgufParametersLoader gains weightFormFor — per-tensor forms with an explicit, documented precedence: your function > the uniform weightForm > the three legacy parameters. The user-wins channel is named as such: whatever you pass outranks every resolver, including 'everything dense on the managed heap'. ResolvedGguf ties it together: header-only planInput, forms resolved from file × profile × kernel capability, overrides applied, and a loader that delivers exactly those forms. The same resolved input is priceable (profiledPlan().requireFits() refuses pre-load) and explainable (explainPlacements() — one line per weight, where and why) before a byte of payload is read. Closes #1144. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
michalharakal
merged commit Aug 26, 2026
a0e2c52
into
feature/1143-allocation-resolver
1 check passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1144 (parent #1133). Stacked on #1153.
Plan → load, wired. Plan and load were two disjoint pipelines sharing vocabulary and never talking: nothing on the load path consulted what the resolvers decided.
StreamingGgufParametersLoadergainsweightFormFor: ((tensorName) -> WeightForm?)?— per-tensor forms, with the precedence order explicit and documented: your function > uniformweightForm> the three legacy parameters. The user-wins channel is named as such — whatever you pass outranks every resolver, including the deliberately bluntWeightForm(DequantizeTo(FP32), residency = HEAP)("everything dense, on the managed heap"). Defaultnullis byte-identical; per-tensor forms get the same validation the uniform form had.ResolvedGguf.resolve(...)ties the pipelines together: header-onlyplanInput, forms resolved from file ×PlannerProfile×KernelCapabilities, overrides applied, and a loader that delivers exactly those forms. The same resolved input is priceable (profiledPlan(available).requireFits()refuses pre-load, M2-F6) and explainable (explainPlacements()— one line per weight, where it lands and why) before a byte of payload is read. A strict profile refuses at resolve time.weightFormFor≡ single-form path bit-identically; per-tensor forms honoured per tensor (one weight dequantized, its neighbour kept packed); resolver→loader obedience; override-outranks-resolver; strict refusal; plan prices the resolved (dense) bytes.Full pr-gate green (all legs).
🤖 Generated with Claude Code