Repository navigation
Ling-3.0-tiny on ARM CPUs: opt-in per-step logits hashes in the decoder tool (#1247) - #5072
Conversation
|
Thanks @ThinkOffApp. The hashes read the full raw F32 logits in vocabulary order, preserve little-endian words and aggregate raw digests. Each token's digest is copied before the next step reuses the logits buffer. With the flag off, no hashes or diagnostic buffers are created, and selection is unchanged. The added output contains only the step, chosen ID and fingerprints. Ready to land from this source review. One small timing clarification: per-step logits hashing is timed; final aggregate hashing and appended printing happen afterwards. The existing hash receipt remains scoped to this independent branch.
|
19ba37f to
1041036
Compare
|
Thank you @ThinkOffApp. This is merged into main with your commits under your own name, so you're listed as a TensorFold contributor. It ships in the next release, credited to you in the changelog and the release notes. |
Thanks @ashhart for the review of #4266 and the 11:53Z invitation to send exact-path work independently.
What this changes
Adds
--step-hashesto the standalone Ling CPU decoder. The normal CLI remains unchanged without the flag. With it, appended lines give the generated step (1-based), chosen token ID and SHA-256 of the full vocabulary logits used for that choice. The final SHA-256 covers the concatenated raw 32-byte step digests, not their hex strings. Logits are read as raw F32 bit patterns, serialized little-endian in vocabulary order; signed zero/NaN payloads are not normalized. No arithmetic, selection rule, KDA optimization or approximate mode is added.a992d0da9; one independent local commit19ba37f67(no KDA or fast commits).atc overlap --json: run against the explicit base; the scan was incomplete (pull-request file and time limits), so we do not claim a clean overlap gate.Checks on this head
19ba37f67(read back from the pushed branch).zig build test-ling-cpu-host -Dcpu=apple_m1 --summary all: 52/52 pass, including fixed little-endian bit patterns, signed-zero preservation, read-only hashing, one-bit sensitivity, aggregate serialization and per-step equality at1/2/4/8 threads on the synthetic model. ARM Linux ReleaseSafe builds pass forbaselineandbaseline+dotprod+sha2.zig fmt --check build.zig zig/git diff --checkpass.zig build test-golden -Dcpu=apple_m1also passes on this head: fake-server golden groups 69/69 and 327/340 equal, 0 unexpected differences (the remaining cases are inherited).zig build test, GPU suites,dev-tools, fuzz, full native build. Only CPU CLI/modules changed, and the Mac is serving an unrelated model. No before-change red-run receipt was collected; the hash test contains a planted one-bit inequality control.Receipt
--step-hashes, boolean presence flag, default off. No environment setting/profile row. Invalid positional arity is refused. It has no production caller: it is a diagnostic on the standalone decoder tool. If that falls foul of the rule on new settings, we are glad to reshape it (test-only helper, or folded into an existing tool) or to drop it.aarch64-linux-gnu. ModelinclusionAI/Ling-3.0-tiny-GGUF/Ling-3.0-tiny-Q4_K_M.gguf, revision01b850e29ed5b44e2b810160ff980a9bb353296f, size4,823,894,944 bytes, SHA256246d67d45f5b0c7447ca0ce0bdb8b46b8a47b593c5068635dc16422c051d7be9. No drafter.ecace3a2e009f67e1a57988975ee10c7d644f8dbb2fff7d9e0606c848c8e1e8a. This is the Ling-3.0-tiny on ARM CPUs: exact GGUF decoder (#1247) #4266 37-ID prompt, greedy32 outputs, fresh standalone sessions. Server drafted/resumed/concurrent contracts are n/a here, not newly verified. Hash equality is meaningful across systems but not promised for untested engines/backends; after a generated token differs, force identical history to isolate arithmetic differences.bench_openai.pybecause there is no HTTP endpoint. Compareling-cpu-decode MODEL.gguf PROMPT_IDS 32 4withling-cpu-decode --step-hashes MODEL.gguf PROMPT_IDS 32 4under identical affinity.Checklist