
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Neural Network Compression Framework (NNCF) provides a suite of post-training and training-time algorithms for optimizing inference of neural networks in OpenVINO™ with a minimal accuracy drop.
NNCF is designed to work with models from PyTorch, TorchFX, TensorFlow, ONNX and OpenVINO™.
NNCF provides samples that demonstrate the usage of compression algorithms for different use cases and models. See compression results achievable with the NNCF-powered samples on the NNCF Model Zoo page.
The framework is organized as a Python* package that can be built and used in a standalone mode. The framework architecture is unified to make it easy to add different compression algorithms for both PyTorch and TensorFlow deep learning frameworks.
For more information about NNCF, see:
Compression algorithm | OpenVINO | PyTorch | TorchFX | TensorFlow | ONNX |
---|---|---|---|---|---|
Post-Training Quantization | Supported | Supported | Experimental | Supported | Supported |
Weights Compression | Supported | Supported | Experimental | Not supported | Not supported |
Activation Sparsity | Not supported | Experimental | Not supported | Not supported | Not supported |
Compression algorithm | PyTorch | TensorFlow |
---|---|---|
Quantization Aware Training | Supported | Supported |
Weight-Only Quantization Aware Training with LoRA and NLS | Supported | Not Supported |
Mixed-Precision Quantization | Supported | Not supported |
Sparsity | Supported | Supported |
Filter pruning | Supported | Supported |
Movement pruning | Experimental | Not supported |
NOTE: Limited support for TensorFlow models. Only models created using Sequential or Keras Functional API are supported.
For detailed installation instructions, refer to the Installation guide.
NNCF can be installed as a regular PyPI package via pip:
pip install nncf
NNCF is also available via conda:
conda install -c conda-forge nncf
System requirements of NNCF correspond to the used backend. System requirements for each backend and the matrix of corresponding versions can be found in installation.md.
NNCF may be easily integrated into training/evaluation pipelines of third-party repositories.
NNCF is used as a compression backend within the renowned transformers
repository in HuggingFace Optimum Intel. For instance, the command below exports the Llama-3.2-3B-Instruct model to OpenVINO format with INT4-quantized weights:
optimum-cli export openvino -m meta-llama/Llama-3.2-3B-Instruct --weight-format int4 ./Llama-3.2-3B-Instruct-int4
NNCF is integrated into the Intel OpenVINO export pipeline, enabling quantization for the exported models.
NNCF is used as primary quantization framework for the ExecuTorch OpenVINO integration.
NNCF is used as primary quantization framework for the torch.compile OpenVINO integration.
NNCF is integrated into OpenVINO Training Extensions as a model optimization backend. You can train, optimize, and export new models based on available model templates as well as run the exported models with OpenVINO.
List of models and compression results for them can be found at our NNCF Model Zoo page.
@article{kozlov2020neural,
title = {Neural network compression framework for fast model inference},
author = {Kozlov, Alexander and Lazarevich, Ivan and Shamporov, Vasily and Lyalyushkin, Nikolay and Gorbachev, Yury},
journal = {arXiv preprint arXiv:2002.08679},
year = {2020}
}
NNCF as part of the OpenVINO™ toolkit collects anonymous usage data for the purpose of improving OpenVINO™ tools. You can opt-out at any time by running the following command in the Python environment where you have NNCF installed:
opt_in_out --opt_out
More information available on OpenVINO telemetry.
FAQs
Neural Networks Compression Framework
We found that nncf demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.