Skip to main content

Two-stage neural architecture search for large language models

Project description

Whittle Logo

Whittle 🪒🧠

Whittle Visualization

PyPI - Python Version unit-tests license PyPI version

Whittle is a Python library for compressing large language models (LLMs) by extracting sub-networks to balance performance and efficiency. It is based on LitGPT and allows to compress many state-of-the-art models.

  • Neural Architecture Search: Workflows for pre-training super-networks and multi-objective search to select sub-networks.
  • Structural Pruning: State-of-the-art approaches to pruning structural components of pre-trained LLMs.
  • Distillation: Workflow to distill a student model given a trained teacher model.
  • Evaluation: Easy extraction of sub-networks checkpoint and evaluation using LM-Eval-Harness
  • Efficiency: Different metrics to estimate efficiency of sub-networks, such as latency, FLOPs, or energy consumption.

Installation

Whittle supports and is tested for python 3.9 to 3.12.

You can install whittle with:

pip install whittle

Install from source

Install whittle from source to get the most recent version:

git clone git@github.com:whittle-org/whittle.git
cd whittle
pip install -e .

Getting started with whittle

To explore and understand different functionalities of whittle checkout this colab notebook and examples/

Projects that use whittle

How to get involved

We more than happy for any code contribution. If you are interested in contribution to whittle, please read our contribution guide.

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

whittle-0.5.1.tar.gz (137.9 kB view details)

Uploaded Source

File details

Details for the file whittle-0.5.1.tar.gz.

File metadata

  • Download URL: whittle-0.5.1.tar.gz
  • Upload date:
  • Size: 137.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for whittle-0.5.1.tar.gz
Algorithm Hash digest
SHA256 a386acaaf57515a66c3fd99e72ca4577a3e359a122bb3d3affdf074d028b7d2c
MD5 367e42f977ac3f81a3b6cd07c4d0c5b2
BLAKE2b-256 0a440d7b27c795fb17554ec541f9e59f1643c5bf2e46db07fb1f97586efa5c61

See more details on using hashes here.

Provenance

The following attestation bundles were made for whittle-0.5.1.tar.gz:

Publisher: release.yml on whittle-org/whittle

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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