[GH-ISSUE #5774] perf(model): validate omitted GGUF strings without decoding them #3509

Closed
opened 2026-10-31 00:41:18 +00:00 by bsakaguchi · 0 comments
Owner

Originally created by @gensokyo-dev on GitHub (Oct 21, 2026).
Original GitHub issue: https://github.com/morluto/rea/issues/5774

Area

Evidence, artifacts, or reconstruction

Observed behavior

On main 264862bf2, GGUF arrays retain the first eight strings, but GgufHeader.#text(false) constructs a fatal TextDecoder and materializes every omitted string. The omitted values must still be validated, but their decoded text is unused. Source inspection and a real-model provider profile identify this cost; this is not a correctness failure.

Reproduction and evidence

Inspected public ggml-org/models tinyllamas/stories15M-q4_0.gguf at revision 499bc8821c6b12b4e53c5bffcb21ec206f212d81, using the built ModelArtifactProvider with header hashing. Three alternating fresh-process baseline/prototype pairs each performed seven inspections. First inspection median: 157.28 → 127.58 ms; per-process repeated-inspection median: 51.66 → 37.16 ms. Complete normalized report SHA-256 is identical in every sample. This is a phase-only experiment; completed public CLI/MCP task costs, official-reader comparisons and regression checks remain to be established before integration.

Expected behavior

Validate the entire admitted metadata, including omitted values, without decoding text the preview will not retain. Preserve UTF-8 rejection, header hashes/read bounds, streaming long strings, cancellation fairness, preview values and all retained Evidence.

Impact and scope

Observed on one real GGUF vocabulary. This follows the existing complete-task and real-model audit in #5603; it does not replace that work or add another query/cache. Unknown benefit on other vocabularies and complete investigations. Safetensors and small models will be controls. Scope is existing read-only model parsing; no provider authority, target execution, API/default or installation change.

REA version / runtime / interface

Main 264862bf2; Linux x64, pinned Node 24.18.0/npm 11.16.0. Provider-phase probe so far; CLI/MCP are the intended verification boundary. Serial one-CPU runs under 4 GiB hard /3 GiB early-stop process-family guards; no limit events.

Before submitting

  • Searched open and closed issues, including GGUF UTF-8/model performance and #5603.
  • Removed credentials, private paths and sensitive target data.
Originally created by @gensokyo-dev on GitHub (Oct 21, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/5774 ### Area Evidence, artifacts, or reconstruction ### Observed behavior On main `264862bf2`, GGUF arrays retain the first eight strings, but `GgufHeader.#text(false)` constructs a fatal TextDecoder and materializes every omitted string. The omitted values must still be validated, but their decoded text is unused. Source inspection and a real-model provider profile identify this cost; this is not a correctness failure. ### Reproduction and evidence Inspected public `ggml-org/models` `tinyllamas/stories15M-q4_0.gguf` at revision `499bc8821c6b12b4e53c5bffcb21ec206f212d81`, using the built ModelArtifactProvider with header hashing. Three alternating fresh-process baseline/prototype pairs each performed seven inspections. First inspection median: 157.28 → 127.58 ms; per-process repeated-inspection median: 51.66 → 37.16 ms. Complete normalized report SHA-256 is identical in every sample. This is a phase-only experiment; completed public CLI/MCP task costs, official-reader comparisons and regression checks remain to be established before integration. ### Expected behavior Validate the entire admitted metadata, including omitted values, without decoding text the preview will not retain. Preserve UTF-8 rejection, header hashes/read bounds, streaming long strings, cancellation fairness, preview values and all retained Evidence. ### Impact and scope Observed on one real GGUF vocabulary. This follows the existing complete-task and real-model audit in #5603; it does not replace that work or add another query/cache. Unknown benefit on other vocabularies and complete investigations. Safetensors and small models will be controls. Scope is existing read-only model parsing; no provider authority, target execution, API/default or installation change. ### REA version / runtime / interface Main `264862bf2`; Linux x64, pinned Node 24.18.0/npm 11.16.0. Provider-phase probe so far; CLI/MCP are the intended verification boundary. Serial one-CPU runs under 4 GiB hard /3 GiB early-stop process-family guards; no limit events. ### Before submitting - [x] Searched open and closed issues, including GGUF UTF-8/model performance and #5603. - [x] Removed credentials, private paths and sensitive target data.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#3509
No description provided.