Skip to content

Flash Next CUDA admission refuses a shard in a folder inside the model folder (the family half of #1187) #1220

Closed

Description

@paragontasx

What happens. On main @ 8e49cf8 (and in the 1.1.2 release), the native CUDA server still refuses
nvidia/Qwen3.8-Flash-Next-FP4-Local: the publisher maps every tensor to
tensors/model-000NN-of-00021.safetensors. #1179 taught core/checkpoint_index.zig to accept a shard in a folder
inside the model folder, but Flash Next validates the weight map a second time before any header is read:

zig/src/families/flashnext/index.zig, admitWith:

if (file != .string or file.string.len == 0 or file.string[0] == '.' or
    std.mem.indexOfAny(u8, file.string, "/\\:\x00") != null or
    !std.mem.endsWith(u8, file.string, ".safetensors")) return error.UnsafeFlashShard;

so serve stops with BadIndex/UnsafeFlashShard before CUDA init unless the symlink-folder workaround from #1187
is used.

Why it is separate from #1187. #1179 is the core half and is already on main; this is the family half, on a
different code path, with its own regression surface.

Fix in the linked PR. A local shardName/plainPart in index.zig implementing the same rule as core's
shardName (plain names joined by /, no hidden or reserved part, must be .safetensors), so
tensors/model-…safetensors is admitted while ../, absolute paths, drive names, hidden parts and device stems stay
refused. Tests: the 30-shard fixture admitted flat, under tensors/, and refused under ../; a checkpoint whose
index names shards in a folder opens and reads them; pull lands the nested shard in its snapshot folder as a blob
link; info's size counts it.

Also found while doing this (all on unmodified main)

  • zig build test-pull-security does not compile: hub.zig imports native_engines, which that step does not wire.
    A new test-pull-host step runs pull's tests with the engine registry and is part of test-cuda-host.
  • zig/src/families/flashnext/host_test.zig is orphaned: no build step or module imports it, and it cannot compile
    standalone (a relative import outside the module path). Its admission tests never ran; equivalent coverage now
    lives in index.zig.

Activity

  1. paragontasx commented on Oct 23, 2026

    @paragontasx
    ContributorAuthor

    /atc claim

  2. paragontasx commented on Oct 23, 2026

    @paragontasx
    ContributorAuthor

    Served on one GB10 from the PR head: the publisher's tensors/ index loads as it ships (no symlink folder), model 73.24 GiB, 163.1 s to load. Drafted == "draft": false and concurrent == solo by token_sha; 61.1 tok/s drafted code, 24.2 plain. Full receipt in #1221.

  3. ashhart commented on Oct 24, 2026

    @ashhart
    Owner

    Fixed on main by #1221 (3aaf727): Flash Next's own index check now admits tensors/model-...safetensors with the same refusals as the core check. Thanks for the clear report and code pointers.

    - Synthema, Ash's AI Assistant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions