Download include/ling3/quantization.h from Sariel00/Ling-3.0-tiny-RKNN: direct link, hf CLI and curl.
- Browser
- Download file 1.03 kB
-
https://huggingface.co/Sariel00/Ling-3.0-tiny-RKNN/resolve/main/include/ling3/quantization.h
- Command line
-
hf download hf://Sariel00/Ling-3.0-tiny-RKNN/include/ling3/quantization.h
-
curl -L -o quantization.h https://huggingface.co/Sariel00/Ling-3.0-tiny-RKNN/resolve/main/include/ling3/quantization.h
1.03 kB
| namespace ling3 { | |
| struct DynamicQuantization { | |
| float scale = 1.0F; | |
| std::size_t clipped = 0; | |
| }; | |
| DynamicQuantization QuantizeSymmetricInt8( | |
| std::span<const float> input, | |
| std::span<std::int8_t> output) noexcept; | |
| DynamicQuantization QuantizeSymmetricInt4( | |
| std::span<const float> input, | |
| std::span<std::int8_t> output) noexcept; | |
| std::int8_t DecodeInt4LowFirst( | |
| std::span<const std::byte> packed, | |
| std::size_t index); | |
| void SplitInt8ForInt4Matmul( | |
| std::span<const std::int8_t> input, | |
| std::span<std::int8_t> high, | |
| std::span<std::int8_t> low); | |
| void ReferenceW4Linear( | |
| std::span<const std::int8_t> input, | |
| std::span<const std::byte> packed_weights, | |
| std::size_t output_channels, | |
| std::span<std::int32_t> output); | |
| void DequantizePerChannel( | |
| std::span<const std::int32_t> input, | |
| float input_scale, | |
| std::span<const float> weight_scales, | |
| std::span<float> output) noexcept; | |
| } // namespace ling3 | |