| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
FMS Model Optimizer is a framework for developing reduced precision neural network models. Quantization techniques, such as quantization-aware-training (QAT), post-training quantization (PTQ), and several other optimization techniques on popular deep learning workloads are supported.
| GPTQ | FP8 | PTQ | QAT | |
|---|---|---|---|---|
| Granite | ✅ | ✅ | ✅ | 🔲 |
| Llama | ✅ | ✅ | ✅ | 🔲 |
| Mixtral | ✅ | ✅ | ✅ | 🔲 |
| BERT/Roberta | ✅ | ✅ | ✅ | ✅ |
Note: Direct QAT on LLMs is not recommended
Optional packages based on optimization functionality required:
Note
PyTorch version should be < 2.4 if you would like to experiment deployment with external INT8 kernel.
We recommend using a Python virtual environment with Python 3.9+. Here is how to setup a virtual environment using Python venv:
python3 -m venv fms_mo_venv source fms_mo_venv/bin/activate
Tip
If you use pyenv, Conda Miniforge or other such tools for Python version management, create the virtual environment with that tool instead of venv. Otherwise, you may have issues with installed packages not being found as they are linked to your Python version management tool and not venv.
There are 2 ways to install the FMS Model Optimizer as follows:
To install from release (PyPi package):
python3 -m venv fms_mo_venv
source fms_mo_venv/bin/activate
pip install fms-model-optimizerTo install from source(GitHub Repository):
python3 -m venv fms_mo_venv
source fms_mo_venv/bin/activate
git clone https://github.com/foundation-model-stack/fms-model-optimizer
cd fms-model-optimizer
pip install -e .The following optional dependencies are available:
To install an optional dependency, modify the pip install commands above with a list of these names enclosed in brackets. The example below installs llm-compressor and torchvision with FMS Model Optimizer:
pip install fms-model-optimizer[fp8,torchvision]
pip install -e .[fp8,torchvision]If you have already installed FMS Model Optimizer, then only the optional packages will be installed.
To help you get up and running as quickly as possible with the FMS Model Optimizer framework, check out the following resources which demonstrate how to use the framework with different quantization techniques:
Dive into the design document to get a better understanding of the framework motivation and concepts.
Check out our contributing guide to learn how to contribute.
| Back | FazBrowse Home | New Git URL |