Open 0minyoung0 opened 1 year ago
New quantize techniques are sometimes implemented using PyTorch. Therefore, q-implant aims to output quantized circle model by inputting circle model and containing quantization parameters of the quantized PyTorch model.
into
New quantization techniques are normally implemented by PyTorch
or Tensorflow
.
Tensorflow Lite
is compatible with Circle
, thus quantized by brand new/sota technique in Tensorflow
can be directly converted to Circle.
Therefore, q-implant
aims to output quantized circle model ~~~~
What about mentioning why not extract from Tensorflow
Let me tell you the result of our meeting.
New quantize techniques are sometimes implemented using PyTorch. Therefore,
q-implant
aims to output quantized circle model by inputtingcircle model
andjson & npy files
containing quantization parameters of the quantized PyTorch model.However, converting quantized pytorch model to onnx model is not officially supported. Therefore, starting q-implant from onnx rather than pytorch is difficult to satisfy
q-implant
's design objectives.q-extract
is a module designed to obtaincircle model
andjson & npy files
corresponding to the input of q-implant. Therefore, we judged that implementingq-extract
forquantized onnx model
rather thanquantized pytorch model
was also not in line with the existing purpose.The figure above is a diagram of q-extract-torch.
I will explain the inputs and outputs of the q-extract-torch module in text. Input 1:
original PyTorch model
(not quantized) Input 2:quantized PyTorch model
(quantized) Output 1:Circle model
(not quantized, to be used as input for q-implant) Output 2:json & npy files
(to be used as input for q-implant)In addition, I will explain the functionality of the
q-extract-torch
module. First, Convertoriginal PyTorch model (Input 1)
to createoriginal Circle model (Output 1)
. Second,Two input PyTorch models (Input 1 & 2)
storemapping information
for models before and after quantization. Based on thismapping information
, outputjson & npy files (Output 2)
corresponding to the input of q-implant.