# huggingface/optimum

🚀 Accelerate inference and training of 🤗 Transformers, Diffusers, TIMM and Sentence Transformers with easy to use hardware optimization tools

Repository: https://github.com/huggingface/optimum
Canonical: https://ross.abutalabs.com/products/optimum
Homepage: https://huggingface.co/docs/optimum/main/
Language: Python
License: Apache-2.0
License Family: permissive
Topics: onnx, pytorch, inference, training, intel, graphcore, onnxruntime, transformers, quantization, habana, optimization, tflite
Last push: 2026-08-24T15:57:08+00:00

## Health v2 (maintenance only)
Score: 98/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 99, release rhythm 96, longevity 100
- inputs: {"age_days": 1870, "days_push": 9, "days_rel": 29, "gap_med": 28.0, "n_releases_24m": 17}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 3469, forks 673 (observed 2026-08-28T04:08:05.913782+00:00)

## What it is
Optimum is a Hugging Face library that extends Transformers, Diffusers, timm, and Sentence Transformers with hardware-specific optimization tools for faster training and inference. It provides drop-in model classes and export/quantization utilities targeting accelerators like ONNX Runtime, OpenVINO, TensorRT-LLM, AMD, AWS Neuron, and Habana Gaudi.

## Use cases
- speed up huggingface transformer inference
- convert pytorch model to onnx
- quantize a model to int8 for faster inference
- run transformers on intel openvino
- fine-tune models on habana gaudi or aws trainium
- accelerate stable diffusion inference on gpu
- export transformers model to tensorrt-llm

## When to choose
- you use the Hugging Face ecosystem and want faster inference or training on specific hardware
- you need model export to ONNX, OpenVINO, or TensorRT-LLM with minimal code changes
- you want post-training quantization or pruning of Transformers/Diffusers models
- you deploy on partner accelerators like Habana Gaudi, AWS Inferentia/Trainium, or AMD NPUs

## When to avoid
- you only run small models on CPU where optimization overhead isn't worth it
- you need a runtime-agnostic serving solution rather than a Python optimization library
- your hardware has no Optimum integration and you'd rather use the vendor's native tooling directly

## Facets
- artifact type: library
- maturity: active
- function: machine-learning, llm-inference, llm-training, gpu-computing, cli
- domain: machine-learning, deep-learning, large-language-models, developer-tools, gpu-computing
- platform: python, cross-platform
- tags: huggingface, transformers, onnx, onnxruntime, openvino, quantization, model-optimization, tensorrt-llm, habana-gaudi, aws-neuron, diffusers, hardware-acceleration, gpu, docker

## Member repositories
- huggingface/optimum (main) score 98

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:05.913782+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:36:39.097920+00:00, confidence not recorded.
  - readme: https://github.com/huggingface/optimum (fetched 2026-08-28T04:08:05.913782+00:00, sha 3fdf543a3c22)
  - homepage: https://huggingface.co/docs/optimum/main/ (fetched 2026-08-29T09:30:47.630472+00:00, sha 0745352332df)
  - site_page: https://huggingface.co/docs (fetched 2026-08-29T09:30:47.639944+00:00, sha bdec26667b98)
  - site_page: https://huggingface.co/docs/optimum/main/en/installation (fetched 2026-08-29T09:30:47.643597+00:00, sha c0d18670e822)
  - site_page: https://huggingface.co/docs/optimum/main/en/quicktour (fetched 2026-08-29T09:30:47.645219+00:00, sha 6a05f7280f6a)
  - site_page: https://huggingface.co/docs/optimum/main/en/notebooks (fetched 2026-08-29T09:30:47.646926+00:00, sha cbab2bebf550)
  - site_page: https://huggingface.co/docs/optimum/main/en/concept_guides/quantization (fetched 2026-08-29T09:30:47.648884+00:00, sha 52b134c39cb5)
  - site_page: https://huggingface.co/docs/optimum/installation (fetched 2026-08-29T09:30:47.651137+00:00, sha c0d18670e822)
  - site_page: https://huggingface.co/docs/optimum/v1.27.0/index (fetched 2026-08-29T09:30:47.652789+00:00, sha 68fd994cb0d2)
  - registry_pypi: https://pypi.org/pypi/optimum/json (fetched 2026-08-29T09:30:47.654394+00:00, sha 7d2ddc4f22b6)
- Data as of 2026-08-30T08:39:29.467469+00:00.
