LLMPruner  by yangjianxin1

LLM pruning tool for reducing model size and accelerating training

created 2 years ago
307 stars

Top 88.4% on sourcepulse

GitHubView on GitHub
Project Summary

LLMPruner is a tool designed to reduce the size and memory footprint of large language models (LLMs) by pruning their vocabulary. It targets researchers and practitioners working with multilingual LLMs who need to fine-tune models for specific language tasks, offering a way to improve training efficiency and reduce hardware requirements.

How It Works

LLMPruner addresses the significant memory overhead caused by large vocabularies in multilingual LLMs. It achieves this by identifying and removing infrequently used tokens, retaining only those essential for specific language tasks (e.g., Chinese and English). This targeted pruning reduces model parameters and memory usage without sacrificing the pre-trained knowledge, enabling efficient fine-tuning on less demanding hardware.

Quick Start & Requirements

  • Install: Not explicitly mentioned, but likely requires installing the transformers library.
  • Prerequisites: Python, Hugging Face transformers library.
  • Usage: Python code examples provided for pruning Bloom models and using pruned models.
  • Links: WeChat Official Account: YeungNLP.

Highlighted Details

  • Reduces Bloom model vocabulary size by up to 81.61% (e.g., from 250,880 to 46,145 tokens).
  • Enables fine-tuning on fewer GPUs while retaining pre-trained knowledge.
  • Provides pre-pruned Bloom and Bloomz models for Chinese and English on Hugging Face.
  • Demonstrates successful model usage after pruning.

Maintenance & Community

  • Developed by yangjianxin1.
  • WeChat Official Account "YeungNLP" is mentioned for further articles and updates.

Licensing & Compatibility

  • License not specified in the README.
  • Compatibility with commercial use or closed-source linking is not detailed.

Limitations & Caveats

The README focuses on Bloom models and does not specify support for other LLM architectures. The licensing terms for commercial use are not provided, which may be a consideration for adoption.

Health Check
Last commit

2 years ago

Responsiveness

1 week

Pull Requests (30d)
0
Issues (30d)
0
Star History
2 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.