Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Generalized implementation of Static quantization with Clibrationdatareader #19601

Closed
manickavela29 opened this issue Feb 22, 2024 · 1 comment
Labels
feature request request for unsupported feature or enhancement

Comments

@manickavela29
Copy link
Contributor

Describe the feature request

Generalized Static Quantizatoin infra, which can handle different model architectures.

For models which maintains states and take previous inference output as input (conformer-based), current Calbrationdatareader is not very supportive for models such as this.

Current implementation for Static Quantization function quant_static() takes in fp32 model and calibrationdatsetreader
and does the quantization but, this implementation does not support models like zipformers where in input and output are dependent on states

Worked with Zipformer2 (based on conformers) models from icefall, the model has its input states from previous inference output(except for first inference as all are zeros).

Zipformer is a Transformer based ASR model, with major compute ops of Matmul and Conv(depth and pointwise)

Model : Zipformer2 https://arxiv.org/abs/2310.11230
Inputs : X(feature vector), and States -> a list of 96 states(initialised as 0).
output: Y, and list of 96 states (these output states are maintained separately and fed as input for next output)

Discussion started on this : #19538

Describe scenario use case

As new and evolved model architectures are growing in numbers, it will be very helpful in handling future requirements for the model.

@manickavela29 manickavela29 added the feature request request for unsupported feature or enhancement label Feb 22, 2024
@manickavela29
Copy link
Contributor Author

Given the nature of the issue, I don't think this will be feasible,
Closing on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request request for unsupported feature or enhancement
Projects
None yet
Development

No branches or pull requests

1 participant