
Post-training integer quantization (Geron Ch 17, morie.fn hmint8)
Source:R/geron_w4b_native.R
morie_geron_int8_quant.RdPost-training integer quantization (Geron Ch 17, morie.fn hmint8)
Value
List with q, dequantized, scale, zero_point, max_error, rel_error, compression, estimate, n, method.
Examples
V <- c(1, 2, 3, 4, 5, 6, 7, 8)
morie_geron_int8_quant(V)
#> $q
#> [1] 16 32 48 64 79 95 111 127
#>
#> $dequantized
#> [1] 1.007874 2.015748 3.023622 4.031496 4.976378 5.984252 6.992126 8.000000
#>
#> $scale
#> [1] 0.06299213
#>
#> $zero_point
#> [1] 0
#>
#> $max_error
#> [1] 0.03149606
#>
#> $rel_error
#> [1] 0.007874016
#>
#> $compression
#> [1] 8
#>
#> $n_levels
#> [1] 256
#>
#> $estimate
#> [1] 0.03149606
#>
#> $n
#> [1] 8
#>
#> $method
#> [1] "Post-training integer quantization"
#>