Skip to content

fix(assets): consolidate validation and comparison fixes - #290

Merged
shuk777 merged 5 commits into
Edge0-AI:mainfrom
Afloat16:fix/consolidated-assets-20261117
Nov 18, 2026
Merged

shuk777 merged 5 commits into
Edge0-AI:mainfrom
Afloat16:fix/consolidated-assets-20261117

Conversation

@Afloat16

Copy link
Copy Markdown
Contributor

What & why

This is the consolidated asset-checking PR requested in the theme-grouping review. It supersedes #250, #262, #269, and #274.

The combined change keeps four related improvements in one reviewable branch:

  • Parse assets.tsv as literal tab-separated columns, require exactly four fields and ASCII decimal byte counts, and require an integer manifest version. Valid leading-zero byte counts remain supported.
  • Validate GGUF metadata type encodings and array declarations consistently with the native reader, so malformed metadata cannot pass the Python checker.
  • Check the required runtime context length, RoPE base, and RMS normalization epsilon, including their exact types and finite positive values, before reporting a model directory as valid.
  • Reuse SHA-256 digests produced by successful integrity checks during asset comparison. Identical GGUF files do not need another tensor scan; differing files retain the existing metadata, tensor, and text diagnostics.

Integration

The branch is based on bc2dc409d420097b4e864d511901180d7c2c6bac. Its merge commit retains the four original PR heads as parents, preserving their commit histories. The combined diff is limited to the asset checker, GGUF reader, model-specific metadata checks, and their tests.

Area

  • Model asset tools (edge0-infer/tools/assets/)

How was it tested?

Validation below was run on the combined tree on Linux with Python 3.12:

  • Complete asset L1 suite: 167 passed, 6 higher-level tests deselected. This includes the manifest grammar, malformed GGUF, runtime metadata, compatibility controls, and one-hash-per-payload comparison regressions.
  • Actual native inspect parity on nine complete tiny-model fixtures: seven malformed cases rejected by both the combined checker and native loader; two valid controls accepted by both.
  • CPU preset build: passed.
  • Full L0/L1: 97 passed, 3 Vulkan tests skipped, 4 failures. The failures are moe_test_app_generation, moe_test_platform_memory, moe_test_ordered_json, and moe_test_template_tools; the same four failures were reproduced in the recorded upstream-base run. The full local gate is therefore not green.
  • git diff --check: passed.

Checklist

  • Preserved all four original changes and their regression cases.
  • Ran the combined asset suite and actual native-reader parity checks.
  • Ran the required CPU build and L0/L1 gate, with failures reported above.
  • Real model conversion or GPU/device acceptance testing.

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.

2 participants