Skip to content

add utility to compute analytical bits per weight - #67

Open
pkmandke wants to merge 5 commits into
apple:mainfrom
pkmandke:dev/bpw_utility
Open

add utility to compute analytical bits per weight#67
pkmandke wants to merge 5 commits into
apple:mainfrom
pkmandke:dev/bpw_utility

Conversation

@pkmandke

@pkmandke pkmandke commented Aug 14, 2026

Copy link
Copy Markdown
Member

Add utility to compute the average bits-per-weight (bpw) of a prepared coreai-opt model in eager mode quantization and palettization.


TODO:

  • Add export tests to validate analytical bpw against exported asset size
  • Add tests for per-module bpw

Signed-off-by: Prathamesh Mandke <46148373+pkmandke@users.noreply.github.com>
Signed-off-by: Prathamesh Mandke <46148373+pkmandke@users.noreply.github.com>
Signed-off-by: Prathamesh Mandke <46148373+pkmandke@users.noreply.github.com>
@pkmandke
pkmandke marked this pull request as ready for review August 17, 2026 20:59
Signed-off-by: Prathamesh Mandke <46148373+pkmandke@users.noreply.github.com>
@pkmandke
pkmandke requested a review from guru-desh August 17, 2026 21:24
raise NotImplementedError(
"Graph / torch.fx.GraphModule models are not supported currently. "
"Only full-precision, eager-mode integer "
"quantized, and palettized nn.Modules are handled."

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we also error if instance is torch ExportedModel?

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.

3 participants