Unit Scaling

Welcome to the unit-scaling library. This library is designed to facilitate the use of the unit scaling and u-µP methods, as outlined in the papers Unit Scaling: Out-of-the-Box Low-Precision Training (ICML, 2023) and u-μP: The Unit-Scaled Maximal Update Parametrization

For a demonstration of the library, see u-μP using the unit_scaling library — a notebook showing the definition and training of a u-µP language model, comparing against Standard Parametrization (SP).

Installation

To install unit-scaling, run:

pip install unit-scaling

Getting Started

We recommend that new users get started with Section 1. User guide.

A reference outlining our API can be found at Section 3. API reference.

The following video gives a broad overview of the workings of unit scaling.

Note

The library is currently in its beta release. Some features have yet to be implemented and occasional bugs may be present. We’re keen to help users with any problems they encounter.

The following slides also give an overview of u-µP.

Development

For those who wish to develop on the unit-scaling codebase, clone or fork our GitHub repo and follow the instructions in our developer guide.

Contents