├── .github └── workflows │ ├── build-wheels.yml │ └── cmake-multi-platform.yml ├── .gitignore ├── .gitmodules ├── CMakeLists.txt ├── README.md ├── benchmark ├── CMakeLists.txt ├── bench.cpp └── nanobench.hpp ├── include ├── piquant.h └── piquant.hpp ├── media ├── bench1.png ├── bench2.png ├── bench3.png └── logo.png ├── python ├── .gitignore ├── README.md ├── benchmark │ ├── benchmark.py │ └── throughput_avg.py ├── example │ ├── example_torch.py │ └── plot_stochastic_rounding_acc.py ├── pyproject.toml ├── quant_benchmark.png ├── setup.cfg ├── setup.py ├── src │ └── piquant │ │ ├── __init__.py │ │ ├── _bootstrap.py │ │ └── torch.py └── tests │ └── test_torch.py ├── src ├── amd64 │ ├── kernel_amd64_avx2.cpp │ ├── kernel_amd64_avx512f.cpp │ ├── kernel_amd64_avx512f_bf16.cpp │ └── kernel_amd64_sse42.cpp ├── capi.cpp ├── kernel_generic.cpp ├── kernels │ ├── dequantize.inl │ ├── kernels.inl │ ├── kernels_specialized.inl │ └── quantize.inl ├── piquant.cpp └── piquant_internal.hpp ├── test ├── CMakeLists.txt ├── dequant.cpp ├── naive.hpp ├── quant.cpp ├── quant_config.cpp └── requant.cpp └── third_party └── CMakeLists.txt /.github/workflows/build-wheels.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PrimeIntellect-ai/pi-quant/HEAD/.github/workflows/build-wheels.yml -------------------------------------------------------------------------------- /.github/workflows/cmake-multi-platform.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PrimeIntellect-ai/pi-quant/HEAD/.github/workflows/cmake-multi-platform.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PrimeIntellect-ai/pi-quant/HEAD/.gitignore -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PrimeIntellect-ai/pi-quant/HEAD/.gitmodules -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PrimeIntellect-ai/pi-quant/HEAD/CMakeLists.txt -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PrimeIntellect-ai/pi-quant/HEAD/README.md -------------------------------------------------------------------------------- /benchmark/CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PrimeIntellect-ai/pi-quant/HEAD/benchmark/CMakeLists.txt -------------------------------------------------------------------------------- /benchmark/bench.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PrimeIntellect-ai/pi-quant/HEAD/benchmark/bench.cpp -------------------------------------------------------------------------------- /benchmark/nanobench.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PrimeIntellect-ai/pi-quant/HEAD/benchmark/nanobench.hpp -------------------------------------------------------------------------------- /include/piquant.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PrimeIntellect-ai/pi-quant/HEAD/include/piquant.h -------------------------------------------------------------------------------- /include/piquant.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PrimeIntellect-ai/pi-quant/HEAD/include/piquant.hpp -------------------------------------------------------------------------------- /media/bench1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PrimeIntellect-ai/pi-quant/HEAD/media/bench1.png -------------------------------------------------------------------------------- /media/bench2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PrimeIntellect-ai/pi-quant/HEAD/media/bench2.png -------------------------------------------------------------------------------- /media/bench3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PrimeIntellect-ai/pi-quant/HEAD/media/bench3.png -------------------------------------------------------------------------------- /media/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PrimeIntellect-ai/pi-quant/HEAD/media/logo.png -------------------------------------------------------------------------------- /python/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PrimeIntellect-ai/pi-quant/HEAD/python/.gitignore -------------------------------------------------------------------------------- /python/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PrimeIntellect-ai/pi-quant/HEAD/python/README.md -------------------------------------------------------------------------------- /python/benchmark/benchmark.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PrimeIntellect-ai/pi-quant/HEAD/python/benchmark/benchmark.py -------------------------------------------------------------------------------- /python/benchmark/throughput_avg.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PrimeIntellect-ai/pi-quant/HEAD/python/benchmark/throughput_avg.py -------------------------------------------------------------------------------- /python/example/example_torch.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PrimeIntellect-ai/pi-quant/HEAD/python/example/example_torch.py -------------------------------------------------------------------------------- /python/example/plot_stochastic_rounding_acc.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PrimeIntellect-ai/pi-quant/HEAD/python/example/plot_stochastic_rounding_acc.py -------------------------------------------------------------------------------- /python/pyproject.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PrimeIntellect-ai/pi-quant/HEAD/python/pyproject.toml -------------------------------------------------------------------------------- /python/quant_benchmark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PrimeIntellect-ai/pi-quant/HEAD/python/quant_benchmark.png -------------------------------------------------------------------------------- /python/setup.cfg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PrimeIntellect-ai/pi-quant/HEAD/python/setup.cfg -------------------------------------------------------------------------------- /python/setup.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PrimeIntellect-ai/pi-quant/HEAD/python/setup.py -------------------------------------------------------------------------------- /python/src/piquant/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PrimeIntellect-ai/pi-quant/HEAD/python/src/piquant/__init__.py -------------------------------------------------------------------------------- /python/src/piquant/_bootstrap.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PrimeIntellect-ai/pi-quant/HEAD/python/src/piquant/_bootstrap.py -------------------------------------------------------------------------------- /python/src/piquant/torch.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PrimeIntellect-ai/pi-quant/HEAD/python/src/piquant/torch.py -------------------------------------------------------------------------------- /python/tests/test_torch.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PrimeIntellect-ai/pi-quant/HEAD/python/tests/test_torch.py -------------------------------------------------------------------------------- /src/amd64/kernel_amd64_avx2.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PrimeIntellect-ai/pi-quant/HEAD/src/amd64/kernel_amd64_avx2.cpp -------------------------------------------------------------------------------- /src/amd64/kernel_amd64_avx512f.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PrimeIntellect-ai/pi-quant/HEAD/src/amd64/kernel_amd64_avx512f.cpp -------------------------------------------------------------------------------- /src/amd64/kernel_amd64_avx512f_bf16.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PrimeIntellect-ai/pi-quant/HEAD/src/amd64/kernel_amd64_avx512f_bf16.cpp -------------------------------------------------------------------------------- /src/amd64/kernel_amd64_sse42.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PrimeIntellect-ai/pi-quant/HEAD/src/amd64/kernel_amd64_sse42.cpp -------------------------------------------------------------------------------- /src/capi.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PrimeIntellect-ai/pi-quant/HEAD/src/capi.cpp -------------------------------------------------------------------------------- /src/kernel_generic.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PrimeIntellect-ai/pi-quant/HEAD/src/kernel_generic.cpp -------------------------------------------------------------------------------- /src/kernels/dequantize.inl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PrimeIntellect-ai/pi-quant/HEAD/src/kernels/dequantize.inl -------------------------------------------------------------------------------- /src/kernels/kernels.inl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PrimeIntellect-ai/pi-quant/HEAD/src/kernels/kernels.inl -------------------------------------------------------------------------------- /src/kernels/kernels_specialized.inl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PrimeIntellect-ai/pi-quant/HEAD/src/kernels/kernels_specialized.inl -------------------------------------------------------------------------------- /src/kernels/quantize.inl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PrimeIntellect-ai/pi-quant/HEAD/src/kernels/quantize.inl -------------------------------------------------------------------------------- /src/piquant.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PrimeIntellect-ai/pi-quant/HEAD/src/piquant.cpp -------------------------------------------------------------------------------- /src/piquant_internal.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PrimeIntellect-ai/pi-quant/HEAD/src/piquant_internal.hpp -------------------------------------------------------------------------------- /test/CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PrimeIntellect-ai/pi-quant/HEAD/test/CMakeLists.txt -------------------------------------------------------------------------------- /test/dequant.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PrimeIntellect-ai/pi-quant/HEAD/test/dequant.cpp -------------------------------------------------------------------------------- /test/naive.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PrimeIntellect-ai/pi-quant/HEAD/test/naive.hpp -------------------------------------------------------------------------------- /test/quant.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PrimeIntellect-ai/pi-quant/HEAD/test/quant.cpp -------------------------------------------------------------------------------- /test/quant_config.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PrimeIntellect-ai/pi-quant/HEAD/test/quant_config.cpp -------------------------------------------------------------------------------- /test/requant.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PrimeIntellect-ai/pi-quant/HEAD/test/requant.cpp -------------------------------------------------------------------------------- /third_party/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(threadpool) --------------------------------------------------------------------------------