# airaria/TextBrewer

A PyTorch-based knowledge distillation toolkit for natural language processing

Repository: https://github.com/airaria/TextBrewer
Canonical: https://ross.abutalabs.com/products/textbrewer
Homepage: http://textbrewer.hfl-rc.com
Language: Python
License: Apache-2.0
License Family: permissive
Topics: bert, pytorch, nlp, knowledge, distillation
Last push: 2023-05-08T15:59:25+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 2381, "days_push": 1213, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1708, forks 243 (observed 2026-08-28T04:05:25.497741+00:00)

## What it is
TextBrewer is a PyTorch-based knowledge distillation toolkit for NLP models. It provides an easy-to-use framework implementing state-of-the-art distillation methods to compress models, improving inference speed and reducing memory usage with minimal performance loss.

## Use cases
- distill a large BERT model into a smaller one
- compress transformer models for faster inference
- reduce memory usage of NLP models for deployment
- experiment with knowledge distillation techniques
- shrink pretrained language models for edge devices
- speed up NLP model inference

## When to choose
- you need to compress large transformer models like BERT into smaller student models
- you want a ready-made distillation framework with PyTorch and HuggingFace Transformers
- you need faster inference and lower memory for NLP deployment

## When to avoid
- you need distillation for computer vision or non-NLP domains
- you want actively developed tooling with frequent updates
- you need model pruning rather than distillation (consider TextPruner instead)

## Facets
- artifact type: library
- maturity: maintenance
- function: machine-learning, llm-training
- domain: machine-learning, deep-learning
- platform: python
- tags: knowledge-distillation, model-compression, pytorch, bert, transformers, natural-language-processing

## Member repositories
- airaria/TextBrewer (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:25.497741+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-30T03:37:00.181366+00:00, confidence not recorded.
  - readme: https://github.com/airaria/TextBrewer (fetched 2026-08-28T04:05:25.497741+00:00, sha e96c643fa996)
- Data as of 2026-08-30T08:39:29.467469+00:00.
