Top AI Repos — open-source AI, indexed and scored
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
A PyTorch-based model pruning toolkit for pre-trained language models
| Date | Stars |
|---|---|
| 2026-07-24 | 390 |
| 2026-07-25 | 390 |
| 2026-07-28 | 390 |
| 2026-07-30 | 390 |
| 2026-07-31 | 390 |
| 2026-08-06 | 390 |
Today
— stars today
This week
— stars this week
This month
— stars this month
Momentum
0.0
growth rate 0.00%/day
[**English**](README.md) | [**中文说明**](README_ZH.md)
<p align="center">
<br>
<img src="./pics/banner.png" width="500"/>
<br>
<p>
<p>
<p align="center">
<a href="https://github.com/airaria/TextPruner/blob/master/LICENSE">
<img alt="GitHub" src="https://img.shields.io/github/license/airaria/TextPruner.svg?color=green&style=flat-square">
</a>
<a href="https://TextPruner.readthedocs.io/">
<img alt="Documentation" src="https://img.shields.io/website?down_message=offline&label=Documentation&up_message=online&url=https%3A%2F%2FTextPruner.readthedocs.io">
</a>
<a href="https://pypi.org/project/TextPruner">
<img alt="PyPI" src="https://img.shields.io/pypi/v/TextPruner">
</a>
<a href="https://github.com/airaria/TextPruner/releases">
<img alt="GitHub release" src="https://img.shields.io/github/v/release/airaria/TextPruner?include_prereleases">
</a>
</p>
**TextPruner** is a model pruning toolkit for pre-trained language models.
It provides **low-cost** and **training-free** methods to reduce your model size and speed up your model inference speed by removing redundant neurons.
You may also be interested in,
- Knowledge Distillation Toolkit - TextBrewer: https://github.com/airaria/TextBrewer
- Chinese MacBERT: https://github.com/ymcui/MacBERT
- Chinese ELECTRA: https://github.com/ymcui/Chinese-ELECTRA
- Chinese XLNet: https://github.com/ymcui/Chinese-XLNet
- CINO: https://github.com/ymcui/Chinese-Minority-PLM
## News
* [Mar 21, 2022] (new functionality in v1.1) Added vocabulary pruning for XLM, BART, T5 and mT5 models.
* [Mar 4, 2022] We are delighted to announce that TextPruner paper [*TextPruner: A Model Pruning Toolkit for Pre-Trained Language Models*](https://aclanthology.org/2022.acl-demo.4/) has been accepted to [ACL 2022 demo](https://2022.aclweb.org).
* [Jan 26, 2022] (new functionality in v1.0.1) Added support for self-supervised pruning via `use_logits` option in `TransformerPruningConfig`.
## Table of Contents
<!-- TOC -->
| Section | Contents |
|-|-|
| [Introduction](#introduction) | Introduction to TextPruner |
| [Installation](#installation) | Requirements and how to install |
| [Pruning Modes](#pruning-modes) | A brief introduction to the three pruning modes |
| [Usage](#usage) | A quick guide on how to use TextPruner |
| [Experiments](#experiments) | Pruning experiments on typical tasks |
| [FAQ](#faq) | Frequently asked questions |
| [Follow Us](#follow-us) | - |
## Introduction
**TextPruner** is a toolkit for pruning pre-trained transformer-based language models written in PyTorch. It offers structured training-free pruning methods and a user-friendly interface.
The main features of TexPruner include:
* **Compatibility**: TextPruner is compatible with different NLU pre-trained models. You can use it to prune your own models for various NLP tasks as long as they are built on the standard pre-trained models.
* **Usability**: TextPruner can be used as a package or a CLI tool. They are both easy to use.
* **Efficiency**: TextPruner reduces the model size in a simple and fast way. TextPruner uses structured training-free methods to prune models. It is much faster than distillation and other pruning methods that involve training.
TextPruner currently supports vocabulary pruning and transformer pruning. For the explanation of the pruning modes, see [Pruning Modes](#pruning-modes).
To use TextPruner, users can either import TextPruner into the python scripts or run the TextPruner command line tool. See the examples in [Usage](#usage).
For the performance of the pruned model on typical tasks, see [Experiments](#experiments).
Paper: [*TextPruner: A Model Pruning Toolkit for Pre-Trained Language Models*](https://aclanthology.org/2022.acl-demo.4/)
### Supporting Models
TextPruner currently supports the following pre-trained models in [transformers](https://github.com/huggingface/transformers):
| Model | Vocabualry Pruning | TExcerpt of 21,742 characters
Read on GitHubWould you bet a product on this? Bounded 0–100 and slow moving.
matched fp:49fbac2fefcc4233, topic:pruning, readme:knowledge distillation, desc:pruning
matched fp:49fbac2fefcc4233, topic:transformer