Details
quantize: add option to automatically choose optimal quant types to reach a file/bpw target size at lowest error (#15550)
- Refactor pareto optimise and convexify
- Refactor lagrange_penalty()
- Refactor quantisation checks into its own function
- Exit loop if no better solution found
- Replace slope with cross product
- Adjust for small vector size
- Simplify candidates sorting
- Add comments to explain magic numbers
- Increase scale multiplier
- Move is_iq() into a lambda and remove unused variables
- Combine quant types
- Reduce bpw range
- Refactor outlier trimming
- Tighten worker allocator
- Check for direction reversal
- Simplify dequantisation
- Calculate bpw over all tensors
- Compute rows based on tensor shape and slice count
- Prioritise important tensors
- Select quantization type if target_bpw is set unless user specifies type and threads
- Relax lambda clamping
- Add signal handler
- Add save_bpw_state()
- Add load_bpw_state()
- Add delete_bpw_state()
- Persist progress
- Uninstall signal handler and cleanup
- Fix trimming logic
- Generate model ID hash
- Remove bias mode computation
- Remove --no-bias option
- Automatically determine if bias error is significant
- Reduce compute time by parallelising tensor processing - courtesy of https://github.com/ddh0
- Add quant types
- Add --keep-bpw-state option
- Refactor signal handlers
- Update quant types
- Minor refactoring
- Add tensor type and depth heuristics
- Add option to override bpw state file name
- Minor refactoring
- Finetune heuristics
- Update usage
- Fix lambda capture
- Update epsilon specifier
- Finetune heuristics
- Simplify tensor selection
- Read statistics from imatrix
- Add Euclidean-Cosine score to identify important tensors
- Improved is_important() logic
- Fix lambda capture bug in Windows and initialise candidate_types struct
- Remove processing statistics_data
- Add --disable-tensor-importance option
- Use more descriptive option naming
- Relax target bpw range
- Increase importance boost for final pass
- Add B/F16 to get_ftype()
- Process bpw targets up to B/F16
- Improve state checkpoint filename
- Add code comments
- Update usage()
- Update README.md
- Change checkpoint file magic
- Prepare for future optimization algorithms
- Add parse_target_size()
- Add --target-size option
- Implement target_size logic
- Update usage()
- Refactor parameter names
- Refactor option names
- Update parameter names
- Improve file handling
- Remove file deletion
- Refactor variable names
- Update usage()
- Add use_wce option
- Read statistics_data from imatrix
- Add experimental entropy-modulated weighted cosine error (WCE)
- Performance optimisations (AI assisted)
- Memory optimisations (AI assisted)
- Update output log
- Fix state file name generation and simplify_pareto() lambda capture
- Change tensor importance score logic
- Refactor is_quantizable()
- Improve WCE to be magnitude-aware
- Expected Output Error MSE
- Fix scale factor overwrite bug
- Test removing unused headers
- Remove wce flag
- Angle-aware/Magnitude-aware (MSE/WCE) hybrid error estimation
- Revert to weighted cosine error estimation
- Enhanced scaling factor
- Use centered‑normalized importance scaling factor (CNIF)
- Remove redundant logs
- Improve state file handling
- Update usage instructions
- Update ftype parsing logic
- Flag experimental features subject to future removal
- Fix --target-size description
- Fix "casts away qualifiers" compiler warning
- Exclude user defined tensors (--tensor-type) from the Lagrangian optimization
(courtesy of https://github.com/AesSedai) - TurboQuant bias factor for inner-product sensitive tensors
- TurboQuant outlier mitigation
- Refactor TurboQuant improvements
- Fix remap tensor bug
- Remove --importance-pct option
- Refactor llama_model_quantize_params to expose a pure C interface
- Consolidate load/save process and remove --save-state flag
- Minor log output changes
- Use the tensor statistics' schema
- Add quant types
- Release finished tensors mmap allocation
- Reuse sample buffers
- Fix C2327 error when target compilation is a MS platform
- Minor refactoring and AI assisted optimizations
- Add uv.lock
- Minor refactoring and AI assisted optimizations
- Add Halko, Martinsson & Tropp randomized SVD condition number estimator
- Add kappa squashing functio
- Remove unnecessary includes
- Add required include
- Update python dependencies
- Fine-tune kappa mapping parameters
- Fine-tune CNIF beta parameters
- Fix fallback counter error
- Move to libllama and unmap weights offloaded to backend
- Remove unmap weights offloaded to backend
- Add winsorization
- Add adaptive tensor boosting
- Minor cosmetic changes
- Refactor processing of unused kv tensors
- Minor cosmetic change
- Implement --max-buffer-size in target_bpw_type()
- Fix 32-block fallback case
- tensor_type_override_for() DRY refactoring
- Fix typo and remove unused option
- Fix #28491 linking bug when compiling with BUILD_SHARED_LIBS=OFF
- Remove GGML_USE_METAL conditional macro and let the optimizer decide\
- Add --target-exclude
- Remove and ignore uv.lock
- Fix pinned tensors safety limits calculation
- Fix truncation error
- Add downwards greedy upgrade
- Add target bpw/size tests
- Guard imatrix schema
- Update --target-bpw/size descriptions and README.md
- Harden state checkpoint's file operations
- Link model and imatrix to state checkpoint
- Enforce and consume stats schema data
- Add stats schema tests
- Refactor signal handlers out of lib and harden the logic
- Improve handling of pinned tensors
- Add tests
- Add include to keep ubuntu-webgpu happy
- Moving new API entries to prevent brittle downstream apps failing
- Fix miscellaneous issues
Website:
Attestations:
macOS/iOS:
- macOS Apple Silicon (arm64)
- macOS Apple Silicon (arm64, KleidiAI enabled) DISABLED
- macOS Intel (x64)
- iOS XCFramework
Linux:
- Ubuntu x64 (CPU)
- Ubuntu arm64 (CPU)
- Ubuntu 24.04 s390x (CPU)
- Ubuntu 26.04 s390x (CPU)
- Ubuntu 26.04 s390x (zDNN)
- Ubuntu x64 (Vulkan)
- Ubuntu arm64 (Vulkan)
- Ubuntu x64 (CUDA 12) - CUDA 12.8 libraries
- Ubuntu x64 (CUDA 13) - CUDA 13.5 libraries
- Ubuntu arm64 (CUDA 13) - CUDA 13.5 libraries
- Ubuntu x64 (ROCm 10.0)
- Ubuntu x64 (OpenVINO)
- Ubuntu x64 (SYCL FP32)
- Ubuntu x64 (SYCL FP16)
- Linux arm64 (Snapdragon: CPU, Adreno GPU, Hexagon NPU) - setup guide
Android:
Windows:
- Windows x64 (CPU)
- Windows arm64 (CPU)
- Windows arm64 (OpenCL Adreno)
- Windows x64 (CUDA 12) - CUDA 12.4 DLLs
- Windows x64 (CUDA 13) - CUDA 13.5 DLLs
- Windows arm64 (CUDA 13) - CUDA 13.5 DLLs
- Windows x64 (Vulkan)
- Windows arm64 (Vulkan)
- Windows x64 (OpenVINO)
- Windows x64 (SYCL)
- Windows x64 (ROCm 10.0)
openEuler:
- DISABLED
- openEuler x86 (310p)
- openEuler x86 (910b, ACL Graph)
- openEuler aarch64 (310p)
- openEuler aarch64 (910b, ACL Graph)
UI: