This guide provides detailed information about Model Quantizer's compatibility with different platforms and Python versions.
As of version 0.3.1, Model Quantizer has been tested and confirmed working on the following environments:
| Platform | Python Version | Status | Notes |
|---|---|---|---|
| macOS Sonoma 14.2 | 3.11 | ✅ Working | Tested with GPTQ quantization |
| macOS Sonoma 14.2 | 3.12 | ✅ Working | Tested with GPTQ quantization |
| Windows 10/11 | 3.11 | ✅ Working | Tested with all quantization methods |
| Windows 10/11 | 3.12 | ✅ Working | Tested with all quantization methods |
| Linux (Ubuntu) | 3.11 | ✅ Working | Tested with all quantization methods |
| Linux (Ubuntu) | 3.12 | ✅ Working | Tested with all quantization methods |
On macOS, Model Quantizer operates in CPU-only mode. When using the tool on macOS, always specify --device cpu in your commands:
python -m quantizer.cli microsoft/Phi-4-mini-instruct --bits 4 --method gptq --output-dir qmodels/phi4-mini-4bit --device cpuFor the most reliable installation on macOS, use the provided installation script:
chmod +x install_dependencies.sh
./install_dependencies.shThis script ensures that all dependencies are installed in the correct order, with proper versions for macOS compatibility.
GPTQ quantization works on macOS with both Python 3.11 and 3.12. The key requirements are:
- Installing
optimum[gptq](not justoptimum) - Installing
gptqmodel<2.1.0 - Using the
--device cpuflag
For the most reliable installation on Windows, use the provided batch script:
install_dependencies.batIf you have an NVIDIA GPU, you can use it for quantization by specifying --device cuda:
python -m quantizer.cli microsoft/Phi-4-mini-instruct --bits 4 --method gptq --output-dir qmodels/phi4-mini-4bit --device cudaFor the most reliable installation on Linux, use the provided shell script:
chmod +x install_dependencies.sh
./install_dependencies.shIf you have an NVIDIA GPU, you can use it for quantization by specifying --device cuda:
python -m quantizer.cli microsoft/Phi-4-mini-instruct --bits 4 --method gptq --output-dir qmodels/phi4-mini-4bit --device cudaIf you encounter issues on macOS:
- Ensure you're using the
--device cpuflag - Verify that
optimum[gptq]is installed, not justoptimum - Try reinstalling the dependencies using the installation script
If you encounter issues on Windows:
- Ensure you have the correct CUDA version installed if using GPU
- Try running the command prompt as administrator when installing dependencies
- Verify that all dependencies are installed correctly
If you encounter issues on Linux:
- Ensure you have the correct CUDA version installed if using GPU
- Check that you have the necessary system libraries installed
- Verify that all dependencies are installed correctly
If you encounter platform-specific issues not covered in this guide, please report them on the GitHub issues page with the following information:
- Your operating system and version
- Your Python version
- The command you're trying to run
- The complete error message
- The output of
pip listto show installed packages