Skip to content

xnnpack: size and describe an fp32 export as fp32 - #9

Merged
alpharomercoma merged 1 commit into
mainfrom
fix/fp32-report
Oct 4, 2026
Merged

alpharomercoma merged 1 commit into
mainfrom
fix/fp32-report

Conversation

@alpharomercoma

@alpharomercoma alpharomercoma commented Oct 4, 2026 •

Copy link
Copy Markdown
Member

The fp32 recipe (dcd6288) changed what export_llm builds but not what the report says about it. Every SmolLM2-360M-Instruct fp32 report on the Hub claims int4_codes: round-to-nearest, group size 32, "4-bit weights in groups of 32" in its description, and the 8da4w sizing (1.33 GiB resident at 8k for a 1.40 GiB file). execubench's model scan caught it.

  • sizing: bytes per linear weight per recipe (8da4w 0.5625, fp32 4). pte_bytes_estimate, device_resident_bytes and choose_context take the qmode. SmolLM2-360M fp32 at 2k: 1,496,317,952 B from the terms vs 1,496,334,720 B measured.
  • export: the recipe is settled before sizing; recipe_fields writes int4_codes and group_size as null for fp32, with its own label and description. 8da4w reports are unchanged.
  • plan: --qmode sizes the phone estimate for either recipe.

Tests: 207 passed, 4 skipped. The reports already on the Hub stay wrong until SmolLM2-360M fp32 is re-exported or its reports are republished.

🤖 Generated with Claude Code


View with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is enabled.

…s carried the 8da4w recipe and sizing

The fp32 recipe (dcd6288) changed what export_llm builds but not what the report says about
it. Every SmolLM2-360M-Instruct fp32 report on the Hub claims int4_codes "round-to-nearest",
group size 32, "4-bit weights in groups of 32" in its description, and the 8da4w sizing: 1.33
GiB resident at 8k for a file of 1.40 GiB. execubench's model scan caught it.

- sizing: bytes per linear weight per recipe (8da4w 0.5625, fp32 4); pte_bytes_estimate,
  device_resident_bytes and choose_context take the qmode. SmolLM2-360M fp32 at 2k: 1,496,317,952 B
  from the terms against 1,496,334,720 B measured.
- export: the recipe is settled before sizing, so the window table, device_resident_bytes and
  pte_bytes_estimate describe the file built; recipe_fields writes int4_codes and group_size as
  null for fp32, with its own label and description. 8da4w reports are unchanged.
- plan --qmode sizes the phone estimate for either recipe.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@alpharomercoma
alpharomercoma merged commit 332a305 into main Oct 4, 2026
2 checks passed
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