Skip to contents

Symmetric quantization kernel (morie.fn grq8 quantize_symmetric)

Usage

morie_geron_quantize_symmetric(x, bits = 8)

Arguments

x

Numeric object.

bits

Width in [2, 32].

Value

List with q, scale, dequantized.

Examples

V <- c(1, 2, 3, 4, 5, 6, 7, 8)
morie_geron_quantize_symmetric(V)
#> $q
#> [1]  16  32  48  64  79  95 111 127
#> 
#> $scale
#> [1] 0.06299213
#> 
#> $dequantized
#> [1] 1.007874 2.015748 3.023622 4.031496 4.976378 5.984252 6.992126 8.000000
#>