Skip to content

feat(gguf): split GGUFs load, every header tensor is read or refused - #372

Merged
Brooooooklyn merged 2 commits into
mainfrom
feat/kv-int8-s36b-gguf-loading-track
Nov 12, 2026
Merged

Brooooooklyn merged 2 commits into
mainfrom
feat/kv-int8-s36b-gguf-loading-track

Conversation

@Brooooooklyn

@Brooooooklyn Brooooooklyn commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Stage S36b of the Splash int8 KV alignment (stack #344). Base: S30 (#371).

This PR makes split qwen35 / qwen35moe GGUFs load, and refuses any header tensor the loader does not read. It also adds a header-only check that mlx download runs before it fetches any weight byte. Splash: GgufFile over every part, GgufImage Problems::addUnread, install/upstream.py gguf_target + model-check, install/gguf.py flint_stop_tokens.

before:  NAME-00001-of-00003.gguf ──► reject_split ──► "merge with llama-gguf-split"
         header ──► plan (an extra tensor such as attn_q.bias is silently ignored)
         mlx download ──► fetch every byte ──► the load finds the problem

after:   part 1 ──► resolve_main_parts (siblings by name) ──► check_split_parts
              ──► merge_split_headers ──► plan ──► refuse_unread_qwen35_tensors
              ──► read each part (one page-cache decision for the whole set)
         mlx download ──► range-read each target's header (8 MiB reads)
              ──► checkGgufHeaders ──► download, or refuse with nothing fetched

Changes

  • Split loads (qwen35 / qwen35moe). resolve_main_parts finds the parts by name beside part 1, before it resolves any link (Hugging Face snapshot links point to blobs that have other names). check_split_parts applies the Splash GgufFile rules: split.count must equal the number of files, a later part's split.no (U16 / U32) must equal its place, split.tensors.count must equal the total, and no tensor name may repeat. merge_split_headers builds the one header the plan reads. GgufCheckpoint.main / PreloadInput.main now hold a list of parts (GgufMain, PreloadMain). Each part is read with its own header, and the page-cache decision is taken once from the bytes of all parts.
  • Records. gguf-source.json now lists every part (main and main_identity are arrays). The cache marker adds one part_hex= line per extra part, and the sweep checks each of them. The cache key and source_identity_sha256 cover every part. The format goes from 8 to 9, so older entries age out.
  • Unread tensors. refuse_unread_qwen35_tensors runs last in plan_gguf_import. A tensor is accepted only if the loader reads it: the per-layer norms, the GDN or full-attention mixer chosen by full_attention_interval, the dense or MoE FFN, and the three global tensors. The nextn_predict_layers blocks after the decoder are exempt. Faults are reported in Splash Problems form, for example attn_q.bias (unused) in 1 layer. nextn_predict_layers must agree with the inline MTP block.
  • Header stop ids. tokenizer.ggml.eog_token_ids (a non-empty integer list, otherwise refused) and the vocabulary id of <|endoftext|> (Splash Qwen .stopTokens) are merged into the asset generation_config.json eos_token_id, and its other keys are kept. The merge is skipped when the conversion writes into the GGUF's own folder.
  • Header rules in parse_gguf_reader (Splash GgufFile::parse):
    • at most 16384 tensors and 16384 metadata keys;
    • no metadata key twice and no tensor name twice;
    • rank 1..4 and no zero dimension;
    • alignment a power of two of at most 64 KiB;
    • each tensor offset aligned, and each row a whole number of blocks;
    • a part with no tensors may end at its header.
  • #[napi] checkGgufHeaders(dir). It applies Splash findTargetGgufs (one file, or the parts of one name), the file and split rules, and then, for qwen35 / qwen35moe, the import plan every load runs. gemma4, clef and muse-glimmer refuse a split. Other architectures pass.
  • mlx download. checkGgufTargets groups the selected GGUFs into targets, and a split target must hold every part. For each part it range-reads [0, end of the tensor table) with readGgufHeader (new @mlx-node/lm/gguf-metadata subpath). It also fetches the target folder's config.json when that file is selected, then runs checkGgufHeaders. The native addon is imported only when a GGUF target is selected. On a refusal, the completion marker is restored and nothing is fetched.
  • Header readers. readGgufHeader keeps every byte it reads, up to 128 MiB (Splash Metadata.MAX_BYTES). Discovery (readGgufArchitecture, now over readGgufSourceArchitecture) keeps the old 64 KiB seeking window, so a skipped metadata array is never read or held.
  • Discovery. A hand-written ggufSplitPart replaces the split regex, and the qwen3_5 / qwen3_5_moe rows have split: true. The XL and Bonsai name tests run on the stem, so part 1 of a split XL GGUF is found and later parts are never listed.
  • Docs. docs/cli.md, docs/models.md and docs/convert-quantize.md cover split loads, the unread-tensor rule, the parts listed in gguf-source.json, and the header check before download.

Deleted

  • reject_split inside GgufFileHandle::open. It now runs in GgufSourceSet::open for one-file mains and for the companion.
  • The scalar main / main_identity shape of gguf-source.json (reader and writer).
  • The PreloadFile tuple for the main GGUF. The companion keeps it.
  • The split regex in supportedGgufName.
  • general.alignment ... .max(1), replaced by the Splash rule.

Tests

  • Rust: split_gguf_loads_like_one_file (dense and MoE: the 3-part load is bit-equal to the one-file load, including the reload from the asset dir; checkpoint bytes are the sum of the parts), split_parts_follow_the_gguf_file_rules, split_reads_share_one_page_cache_decision, sweep_reads_every_part_of_a_split_entry, plan_refuses_unread_qwen35_tensors, header_eog_ids_join_generation_config, check_gguf_headers_reads_header_only_copies, parse_gguf_refuses_what_splash_refuses, ple_table_rows_bf16_and_f16_at_width_160.

  • TS: __test__/cli/download-model-gguf-check.test.ts (with tiny-gguf.ts), plus new cases in model-discovery.test.ts and gguf-metadata.test.ts (chunk edges, the 16385-tensor refusal, a 248k-entry token array, discovery past a 32 MiB skipped array reads < 1 MiB).

  • Named mutations (MUTATIONS.md). Each one is red with its switch on and green with it off:

    id mutation
    G5 BF16/F16 row rounded up to 256 values
    G6 header stop ids not merged
    G6b <|endoftext|> not looked up
    G2 unread-tensor rule returns Ok
    G1b only part 1 read
    G1b2 split.no place check skipped
    G1d per-part page-cache decision
    G1e sweep ignores part_hex=
    G1c XL test on the full split name
    G3b offset alignment check skipped
    G3c header returned one byte short
    G3 checkGgufHeaders not called
    G3a addon imported before the no-GGUF return
    B1 discovery uses the byte-keeping header reader
  • Gates: see the table below.

gate result
cargo fmt --all -- --check clean
cargo clippy --workspace --all-targets -- -D warnings clean
mlx-core --lib, one binary, RUST_TEST_THREADS=1 4,750 passed, 0 failed, 220 ignored
yarn build:native ok; index.d.cts copies in sync
yarn typecheck, yarn tsc -b --force (23 projects) clean
vp test on packages/lm/__test__, __test__/cli, packages/cli/__test__, packages/dashboard/__test__, plus the agent models / family-completeness / catalog-native-free and desktop child-entries tests 70 files passed, 1 skipped; 1,426 tests passed, 1 skipped
vp fmt --check and vp lint --type-aware --type-check on the touched files clean; for the packages/lm/__test__ files, a per-file lint reports TS2591 (no node types) on imports this PR does not change, because no tsconfig covers that folder

Gaps

  • qwen4exp (Flash Next) gets no unread-tensor rule, and its index_gguf keeps its own split checks. Gating a change there would mean loading Flash Next.
  • gemma4 / clef / muse-glimmer still refuse split GGUFs, and mlx convert still reads one file.
  • A fused ffn_gate_up_exps is refused, not loaded. The name map, quant entries, t64 plan and packed-row split are not verified on the native k-quant route, and no known qwen35moe GGUF carries this tensor.
  • The native load takes a file path, not a folder, so several unrelated names beside part 1 are not refused at load. checkGgufHeaders does refuse them.
  • The header check runs only in the CLI. Dashboard downloads are not checked, and the projector header and the BF16 refusal (require_quantized) are not ported.
  • An F16 PLE table is not rounded to bf16 at the gather (Splash storedTable).
  • Narrow integer metadata arrays (u8 / u16 / i8 / i16) parse as empty, so such an eog_token_ids is refused. Ids outside u32 are refused too, where Splash accepts negative ids.
  • There is no compiled-vs-eager bias gate, because this base has no compiled target attention. Refusing the bias is Splash's own answer.
  • Each part uses its own general.alignment, while Splash applies part 1's to every part.
  • checkGgufHeaders plans only qwen35 / qwen35moe, and unknown architectures pass (Splash withFamily refuses them).
  • The eog key rule is applied to Qwen GGUFs (Splash reads it for Flint only).
  • The stop-id merge is skipped when converting into the GGUF's own folder.
  • Discovery checks only part 1's name, so an interrupted split download is listed and then fails at load, naming the missing part.

Not in this PR (live, not run)

  • L1: checkGgufHeaders on every local qwen35 / qwen35moe GGUF (header bytes only).
  • L2: a 3-part split of AgentWorld 35B-A3B Q4_K_XL loads and decodes the same text as the one file (AR, T=0).
  • L3: Hub header check on DeepSeek V4.1 Flash and Qwen3.5-122B splits (range reads only, < 64 MiB of headers).
  • L4: the CLI refuses an incomplete split selection before any download.
  • Scripts: LIVE.md.

🤖 Generated with Claude Code

@Brooooooklyn
Brooooooklyn added this pull request to stack #344 November 12, 2026 04:20
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-12T16:00:28.241399Z aaedeaa New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 4f542c4c-d83c-42e7-b852-c16de7e4ba27

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
Pre-merge checks: Passed 1 · Inconclusive 1

Failed Failed checks: 1 inconclusive

Check name Status Explanation Resolution
Title check Pending This assessment has not completed. The check will be retried on the next pre-merge check run.
Passed Passed checks: 1 passed

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f2c44b0364

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/lm/src/gguf-metadata.ts Resolved
@Brooooooklyn
Brooooooklyn force-pushed the feat/kv-int8-s36b-gguf-loading-track branch from 9c69511 to ab16bca Compare November 12, 2026 13:41
@Brooooooklyn
Brooooooklyn removed this pull request from stack #344 November 12, 2026 15:43
@Brooooooklyn
Brooooooklyn force-pushed the feat/kv-int8-s30-stop-match-ends-decode branch from 1c1ef3e to 7ba810f Compare November 12, 2026 15:56
Base automatically changed from feat/kv-int8-s30-stop-match-ends-decode to main November 12, 2026 15:56
Brooooooklyn and others added 2 commits November 12, 2026 23:56
A split qwen35 / qwen35moe GGUF loads from its first part: every part is
found beside it, checked as one GGUF (Splash GgufFile) and read with one
page-cache decision; gguf-source.json and the cache marker list every part.
The plan refuses any header tensor the loader does not read (Splash
Problems::addUnread) and merges the header eog ids and <|endoftext|> into
the asset generation_config.json. parse_gguf takes Splash's header rules,
and `mlx download` range-reads each target's header and runs the native
check (checkGgufHeaders) before any weight byte is fetched.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
readGgufArchitecture went back to a 64 KiB seeking window, so a skipped
metadata array is never read or kept. Only readGgufHeader keeps bytes,
capped at 128 MiB.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@Brooooooklyn
Brooooooklyn force-pushed the feat/kv-int8-s36b-gguf-loading-track branch from ab16bca to aaedeaa Compare November 12, 2026 15:57
@Brooooooklyn
Brooooooklyn merged commit c3422a0 into main Nov 12, 2026
1 check failed
@Brooooooklyn
Brooooooklyn deleted the feat/kv-int8-s36b-gguf-loading-track branch November 12, 2026 15:57
Brooooooklyn added a commit that referenced this pull request Nov 12, 2026
Stage S37 of the Splash int8 KV alignment (stack #344). Base: S36b
(#372).

The desktop app now restarts the inference sidecar the way Splash
restarts its engine (`server/supervision.py` `RestartPolicy.after`). It
also refuses a request that was in flight at two crashes in a row
(`Quarantine`, `request_caused`, `backend.py` `_admit`). The Control
Panel broker uses the same restart policy. TypeScript only: no Rust, no
`#[napi]` change.

```
before:  crash ──► count = ready>=60s ? 1 : count+1 ──► 78 or count>=5: give up
                                                    └─► else wait 1, 2, 4, 8 s
         (no record of which request was running)

after:   sidecar: request ──► fingerprint ──► refused? ──► 400 request_quarantined (never admitted)
                                          └─► dispatch: write <traceDir>/inference-<gen>.turns/<seq> = fp
                                                        ... turn ... finally: unlink
         MAIN:    crash ──► permanent (78 | entry missing)? ──► stop
                        ├─► served >= 60 s from Ready (model loads paused, not erased)? ──► streak = 0, short = 0
                        ├─► else short += 1; short == 6 ──► stop
                        ├─► fault-signal death of a ready child we did not stop?
                        │      ──► Quarantine.after(fps left in the dir) ──► 'quarantined' event
                        └─► wipe the dir, restart after 0, 5, 10, 20, 40 (60) s
                 next fork: env MLX_TURN_JOURNAL=<dir>, MLX_QUARANTINED=<fp,fp>
                 user Start / Restart: fresh policy and quarantine
```

## Changes
- `supervisor/state.ts`: `RestartPolicy {backoffBaseMs 5_000,
probationMs 60_000}`, `backoffDoublings` (4), `crashLoopFailures` (6),
`restartAfter` (Splash `RestartPolicy.after`), `stopCause`
(`_stop_message`), `isPermanentExit`, `quarantineAfter`
(`Quarantine.after`), `requestCaused` (`request_caused`; SIGSEGV,
SIGBUS, SIGILL, SIGABRT, SIGFPE, SIGTRAP taken from
`os.constants.signals`). An invalid policy throws when the supervisor or
broker is built.
- `supervisor/index.ts`: the probation clock starts at Ready and pauses
while the background `/health` says `loading`. Service earned before a
load is kept, so a crash during a later load still counts it (Splash
`served_seconds` runs from Ready to the failure). A missing entry is the
one permanent launch failure (Splash `EngineLaunchFailed`). Any other
spawn error is an ordinary short failure. The quarantine is counted only
on the restart path, before the relaunch (Splash `_count_failure`). A
transport `error` on a live child (a V8 fatal error) is judged with the
intent from before the error. Each generation gets its own
`inference-<gen>.turns` dir, wiped at spawn and removed at every exit.
- `child-node.ts`: a signal death is reported as its number in `code`,
which is what `utilityProcess` already reports.
- `env.ts`: `MLX_TURN_JOURNAL` and `MLX_QUARANTINED` are forced last, so
a value from the shell cannot hide the journal or lift a quarantine.
- New `inference/turn-journal.ts` (shared leaf: env names and a
fingerprint parser without regex) and `supervisor/journal.ts` (MAIN
reads the dir).
- Sidecar: `sidecarHostOptions(env)` passes `turnJournal` to
`createInferenceHost`. `mlx serve` and `mlx launch claude` pass nothing.
- `packages/server`: new `turn-journal.ts` with `requestFingerprint`:
SHA-256 over model, messages and config with sorted keys. It leaves out
`cacheOwnerId`, `cacheRootOwnerId`, `modelAlias` and `reportPerformance`
(Splash `_UNFINGERPRINTED`), and hashes image bytes by content. It also
has `TurnJournal` (`refuses`, `begin`). The option goes host → server →
handler → router.
- `/v1/messages` and `/v1/responses` refuse right after the body maps,
before admission and before any lazy model load or swap (Splash `_admit`
refuses before `runtime.submit`). They journal the same fingerprint from
dispatch until the dispatch `finally`.
- `/v1/messages` fingerprints the config after the title fast path and
the server thinking budget, before the per-model output-token clamp.
`/v1/responses` fingerprints the body's own mapping plus
`previous_response_id`, which stands for the stored chain read later.
- `/v1/systemone` refuses in the router and journals inside the decision
lane.
- `sendRequestQuarantined` sends 400 `invalid_request_error` /
`request_quarantined`. The Anthropic dialect has no `code`.
- Snapshot and events: `streak` and `shortLivedFailures` replace
`consecutiveCrashes`. `'gave-up'` now carries a `message`. A new
`'quarantined' {refused, total}` event is logged by MAIN. Tray:
"Inference: restarting (failure N)" and "Inference: stopped restarting".
- Broker: `restartAfter`, with service counted from the fork. Exit 78 or
a fork that throws ENOENT stops it at once. Events: `streak` and
`message`. Control Panel restarts change from 1, 2, 4, 8 s with a stop
at the 5th crash to at once, 5, 10, 20, 40 s with a stop at the 6th
short failure.

## Deleted
`planRestart`, `nextCrashCount`, `consecutiveCrashes`, and the old
policy fields `maxConsecutiveCrashes`, `baseDelayMs`, `maxDelayMs` and
`healthyForMs`. No compat layer.

## Tests
- New: `supervisor-policy.test.ts` (fake transport, fake timers, real
numbers), `__test__/server/turn-journal.test.ts`. Updated:
`supervisor-state`, `supervisor` (real processes, fixture ops `journal`
and `segv`), `broker`, `tray-view`, `sidecar`.
- Named mutations. Each went red with the mutation on and green with it
off, through a runtime switch that has since been removed
(`MUTATIONS.md`):
  - M1: backoff exponent `streak − 1`
  - M2: probation `>=` → `>`
  - M3: missing entry not permanent
  - M4: served clock starts before Ready
  - M5: `start()` keeps the policy and quarantine
  - M6: suspects accumulate instead of being replaced
  - M7: `requestCaused` intent clause dropped
  - M8: `child_process` passes a null code on a signal death
  - M9: `MLX_QUARANTINED` not forked
  - M10: stale journal dir not wiped
  - M11: fingerprint length `>= 64`
  - M12: messages `begin` skipped at dispatch
  - M13: `endTurn` skipped in `finally`
  - M14: `begin` before the `streamSignal.aborted` return
  - M15: responses refusal skipped
  - M16: image fingerprinted by length only
  - M17: a `loading` probe does not pause the served clock
- M18: systemone journaled at handler entry, which counts a decision
still waiting for a load or the lane
- M19: a `loading` probe erases the service earned before it (`keeps the
service earned before a model load that crashes`)
- M20: messages refusal moved back after the lazy load (`a quarantined
request is refused before any model load`)
  - M21: responses refusal moved back after the lazy load (same test)
- M22: `previous_response_id` left out of the fingerprint (`the
fingerprint ignores identity and reporting and keeps the content`)
- Gates on the round 2 fix (TS only): `yarn typecheck`, `yarn tsc -b
--force`, `vp lint --type-aware --type-check` and `vp fmt --check` on
the 4 touched files, `vp test __test__/server` 61 files passed, 2
skipped; 1,436 tests passed, 7 skipped.
- Gates on the round 1 fix (TS only: `yarn typecheck`, `yarn tsc -b
--force`, lint and fmt on the 2 touched files, `vp test
packages/desktop/__test__` 34 files / 532 tests passed; earlier full
gates below):
- `cargo fmt --check`, `cargo clippy --workspace --all-targets -D
warnings`, `yarn build:native` (`index.d.cts` unchanged), `yarn
typecheck`, `yarn tsc -b --force`: clean.
- `vp lint --type-aware --type-check` on the 27 touched `.ts` files and
`vp fmt --check` on the touched files (27 checked): clean.
- `vp test packages/desktop/__test__ __test__/server`: 95 files passed,
2 skipped (env-gated e2e). 1,966 tests passed, 7 skipped.

## Gaps
1. No memory start-failure class (`MEMORY_START_FAILURES`,
`kStartRetryWindow`). The sidecar's start loads no model.
2. A signal death is read from `code`. Node's own fatal exit codes 4, 5,
6 and 10 are the same numbers as SIGILL, SIGTRAP, SIGABRT and SIGBUS on
Darwin, so such an exit with a turn in flight counts.
3. Splash's `REQUEST_FAILURE_CODES` (`engine_execution_failed` and the
others) have no producer here. The swallowed native error behind `lying`
keeps the child up; Splash would relaunch and count it.
4. The fingerprint covers mapped messages and config, not prompt tokens:
the endpoint has no tokens before the model load. `/v1/messages` hashes
`max_tokens` before the per-model output-token clamp (Splash hashes the
clamped `logical_max_output_tokens`), so two bodies that differ only
above the clamp are two fingerprints. `/v1/responses` hashes
`previous_response_id`, not the stored chain's content.
5. No Retry-After 503 `engine_recovering` and no `/status` `recovering`.
While the sidecar restarts, clients see the connection refused.
6. The policy and the quarantine last until the user starts or restarts
inference or relaunches the app. In Splash they last until the server
restarts.
7. The refusal carries no crash trace. `inference-<gen>.trace.log` is
the swallowed-error trace, not a crash trace. The tray and `app.log`
show the exit and the stderr tail.
8. With a journal, `/v1/responses` maps the body twice (once for the
fingerprint, once after the chain is read).
9. A failed journal write runs the turn unjournaled, with one stderr
line.
10. The Control Panel counts service from the fork (it has no Ready).
Splash has no Control Panel.
11. `kStop` and `kFlush` are not ported. `killGraceMs` covers the drain.
12. `/v1/rerank` and `/v1/audio/*` are not journaled (they read their
own bodies; audio is multipart).
13. The journal entry spans the JS dispatch, not Splash's StartEvent
through the terminal event.
14. `mlx serve` and `mlx launch claude` run inference in-process: no
restart policy and no quarantine.

## Not in this PR (live, not run)
- L1: restart timing in the app (`kill -SEGV` the sidecar six times:
back at once, then after 5, 10, 20 and 40 s, then "stopped restarting").
- L2: quarantine end to end (the same streamed turn killed twice, then
400 `request_quarantined`; a body that differs gets 200; Restart
Inference clears it).
- Steps: `LIVE.md`.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: aaedeaa436

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +508 to +512
const folder = dirname(target[0]);
const config = folder === '.' ? 'config.json' : `${folder}/config.json`;
if (opts.paths.includes(config)) {
await writeFile(join(dir, 'config.json'), new Uint8Array(await (await fetch(config)).arrayBuffer()));
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Include the assets-repo config in GGUF preflight

When a weights-only Qwen3.5 repo is downloaded with --assets-repo, the scratch directory never receives that base repo's config.json: this condition only considers files selected from the primary repo, and checkGgufTargets runs before sidecar planning. Consequently, native_import_plans treats the target as standalone and runs validate_qwen35_standalone_geometry, rejecting headers missing fields such as ssm.conv_kernel even though loading with the supplied authoritative config skips that validation. Resolve the effective config, including the --assets-repo fallback, before running the header check so valid config-backed downloads are not refused.

Useful? React with 👍 / 👎.

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