Skip to main content

Trimming vocabulary of pre-trained multilingual language models to language localization.

Project description

LM-Vocab-Trimmer: A Simple Model Compression by Trimming Embedding Matrix

The LM-Vocab-Trimmer a.k.a. vocabtrimmer is a model compression tool aiming at reducing the parameter size of multilingual LMs by trimming unused tokens from the embedding matrix. This library assumes that you want to use or already fine-tuned a multilingual LM in a few specific languages, and other languages are not needed to be covered by the LM anymore. Then, vocabtrimmer remove those tokens in the out-of-scope languages from the embedding matrix,

the input and the output embedding matrix .

Multilingual LMs (mT5, mBART, XLM-R, etc) are

is a pythob

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vocabtrimmer-0.0.0.tar.gz (5.1 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page