Skip to main content

Simple library for loading checkpoints of language models.

Project description

lm-checkpoints

Simple library for dealing with language model checkpoints.

Install using pip install lm-checkpoints.

Example

Say you want to compute some metrics for all model checkpoints of Pythia 160m, but only seed 0.

from lm_checkpoints import PythiaCheckpoints

for ckpt in PythiaCheckpoints(size=160,seed=[0]):
    # Do something with ckpt.model or ckpt.tokenizer

Or if you only want to load steps 0, 1, 2, 4, 8, 16 for all available seeds:

from lm_checkpoints import PythiaCheckpoints

for ckpt in PythiaCheckpoints(size=160,step=[0, 1, 2, 4, 8, 16]):
    # Do something with ckpt.model or ckpt.tokenizer

Alternatively, you may want to load all final checkpoints of MultiBERTs:

from lm_checkpoints import MultiBERTCheckpoints

for ckpt in MultiBERTCheckpoints.final_checkpoints():
    # Do something with ckpt.model or ckpt.tokenizer

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

lm_checkpoints-0.1.10.tar.gz (5.7 kB view details)

Uploaded Source

Built Distribution

lm_checkpoints-0.1.10-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

Details for the file lm_checkpoints-0.1.10.tar.gz.

File metadata

  • Download URL: lm_checkpoints-0.1.10.tar.gz
  • Upload date:
  • Size: 5.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.2 CPython/3.10.13 Darwin/23.2.0

File hashes

Hashes for lm_checkpoints-0.1.10.tar.gz
Algorithm Hash digest
SHA256 4d85438fc7c3d30ce1d49adf8b3a421e847cb539f8e358f2e1aeba199f1ef16b
MD5 b3161ead561a855ed3c6bb3956b900a1
BLAKE2b-256 b67b04e6775f965ad8f2687000ecce7db2ad11bf25787084fcdcaeeea0920d44

See more details on using hashes here.

File details

Details for the file lm_checkpoints-0.1.10-py3-none-any.whl.

File metadata

  • Download URL: lm_checkpoints-0.1.10-py3-none-any.whl
  • Upload date:
  • Size: 7.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.2 CPython/3.10.13 Darwin/23.2.0

File hashes

Hashes for lm_checkpoints-0.1.10-py3-none-any.whl
Algorithm Hash digest
SHA256 359f7d0eb1d238cfe3f758c7f9c8fddb0f62cf2809e03f9d1871c0ce30eb0c65
MD5 fdf987b29d99e42f54f15fb6b567b180
BLAKE2b-256 1e33669e3b8f5352bf989470c41a7f9ee556cdb43c81c5ebbccbd81c16468d06

See more details on using hashes here.

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