community icon indicating copy to clipboard operation
community copied to clipboard

RFC: Mechanism to indicate that tflite model is structurally pruned.

Open wwwind opened this issue 4 years ago • 5 comments

Mechanism to indicate that tflite model is structurally pruned.

Status Draft
RFC # 398
Author(s) Elena Zhelezina ([email protected])
Sponsor David Rim ([email protected])

Objective

When we have the structurally pruned tflite model, then the only way for hardware to identify this to get benefits is to scan all weights and do checks. This increases the inference time and should be done every time, when the model is loaded. The goal of this RFC is to add special flag to tflite file to mark such models.

wwwind avatar Sep 09 '21 13:09 wwwind

It saves model loading time but increases model conversion time. I have two questions about this proposal:

  1. How to map between the flag and tensors(weight)
  2. What additional check will be done to the indicated tensors?

rino20 avatar Sep 14 '21 09:09 rino20

Yes, when this flag is set, we need to check every weight(tensor) of the model. As result, the conversion time will be bigger, but inference time will be better. Usually, conversion is done on the more powerful machines, so it is better to do this during the conversion. The only check is to identify weights pruned with m/n sparsity for Conv2D and Dense layers.

wwwind avatar Oct 11 '21 18:10 wwwind

Has this been or is this ready for community review?

ematejska avatar Jan 24 '22 18:01 ematejska

@rino20, can you take over as sponsor?

daverim avatar Jan 25 '22 01:01 daverim

Sorry for all the comments, no it's not ready for community review yet.

daverim avatar Jan 25 '22 01:01 daverim

closing as it is not relevant anymore

wwwind avatar Jan 24 '23 15:01 wwwind