A quantization layer is designed to map the scalar values into several bins, namely quantization units.
we feed each scalar value op scl i to a softmax layer, and its representation h res i is computed as the weighted sum of all quantization embeddings: where W q and b q are trainable parameters, e scl is the quantization embedding and L is the size of quantization units.