New Features
**1. HPU (Habana Gaudi) Support (https://github.com/mosaicml/composer/pull/2444)**
Composer now supports Habana Gaudi chips! To enable HPUs, `device` needs to be specified as `'hpu'`:
composer_model = MyComposerModel(n_layers=3)
trainer = Trainer(
model=composer_model,
device='hpu',
...
)
**2. Generate Callback (https://github.com/mosaicml/composer/pull/2449)**
We've added a new callback which runs generate on a language model at a given frequency to visualize outputs:
from composer.callbacks import Generate
composer_model = MyComposerModel(n_layers=3)
generate_callback = Generate(prompts=['How good is my model?'], interval='5ba')
trainer = Trainer(
model=composer_model,
callbacks = generate_callback,
...
)
Bug Fixes
**1. Checkpoint Fixes**
Elastic sharded checkpointing now disables torchmetric saving to avoid issues with torchmetrics tensors being sharded. Additionally, checkpointing now falls back on the old path which does not convert torchmetrics tensors to `numpy`. Checkpointing also no longer materializes optimizer state when saving weights only.
**2. MLFlow Performance Improvements**
MLFlow integration has significant performance improvements in logging frequency and system metrics collected.
What's Changed
* Hpu support by vivekgoe in https://github.com/mosaicml/composer/pull/2444
* Change `input_ids` to a kwarg in `HuggingFaceModel.generate` by dakinggg in https://github.com/mosaicml/composer/pull/2459
* Add log_table by irenedea in https://github.com/mosaicml/composer/pull/2437
* Enable composer to work with torch nightly builds, torch 2.1.0, and cuda 12.1. by j316chuck in https://github.com/mosaicml/composer/pull/2463
* Materialize only model state_dict in memory for `save_weights_only` by eracah in https://github.com/mosaicml/composer/pull/2450
* Improve performance of MLflow logging by dbczumar in https://github.com/mosaicml/composer/pull/2442
* Fail fast if scheduler warmup and max duration are incompatible by dakinggg in https://github.com/mosaicml/composer/pull/2458
* Add nightly docker image by j316chuck in https://github.com/mosaicml/composer/pull/2452
* Fix local eval by rishab-partha in https://github.com/mosaicml/composer/pull/2465
* Add torch 2.1.0 args for github release-docker workflow by j316chuck in https://github.com/mosaicml/composer/pull/2470
* Log system metrics on each event by prithvikannan in https://github.com/mosaicml/composer/pull/2412
* Fix torch 2.1.0 docker tag by j316chuck in https://github.com/mosaicml/composer/pull/2472
* Upstream Generate Callback by irenedea in https://github.com/mosaicml/composer/pull/2449
* Bump torch nightly docker image by j316chuck in https://github.com/mosaicml/composer/pull/2476
* Test pytorch 2.1.0 docker images on ci/cd by j316chuck in https://github.com/mosaicml/composer/pull/2469
* Fix huggingface tokenizer loading for slow tokenizers by dakinggg in https://github.com/mosaicml/composer/pull/2483
* Deprecate Fused LayerNorm by nik-mosaic in https://github.com/mosaicml/composer/pull/2475
* Transformers upgrade by dakinggg in https://github.com/mosaicml/composer/pull/2489
* Update RTD build config with build.os by bandish-shah in https://github.com/mosaicml/composer/pull/2490
* Upgrade torch docker version and tests by j316chuck in https://github.com/mosaicml/composer/pull/2488
* upgrade node by j316chuck in https://github.com/mosaicml/composer/pull/2492
* Gating tying modules w/ FSDP for torch 2.0 by bcui19 in https://github.com/mosaicml/composer/pull/2467
* Removing min_params by bcui19 in https://github.com/mosaicml/composer/pull/2494
* Fix torchmetrics backwards compatibility issue by eracah in https://github.com/mosaicml/composer/pull/2468
* Adding some fixes to FSDP tests by bcui19 in https://github.com/mosaicml/composer/pull/2495
* Fail count on mosaicml logger by mvpatel2000 in https://github.com/mosaicml/composer/pull/2496
* Remove PR curve metrics from backward compatibility test and skip torch 1.13 by eracah in https://github.com/mosaicml/composer/pull/2497
* filter warning by mvpatel2000 in https://github.com/mosaicml/composer/pull/2500
* Bump version to 0.16.1 by mvpatel2000 in https://github.com/mosaicml/composer/pull/2498
* Skip metrics in state dict by mvpatel2000 in https://github.com/mosaicml/composer/pull/2501
* Add peak memory stats by mvpatel2000 in https://github.com/mosaicml/composer/pull/2504
* Fix sharded ckpt by mvpatel2000 in https://github.com/mosaicml/composer/pull/2505
* Bump gitpython from 3.1.31 to 3.1.34 by dependabot in https://github.com/mosaicml/composer/pull/2509
* Annotate `torch_prof_remote_file_name` as Optional by srstevenson in https://github.com/mosaicml/composer/pull/2512
New Contributors
* vivekgoe made their first contribution in https://github.com/mosaicml/composer/pull/2444
* irenedea made their first contribution in https://github.com/mosaicml/composer/pull/2437
* j316chuck made their first contribution in https://github.com/mosaicml/composer/pull/2463
* dbczumar made their first contribution in https://github.com/mosaicml/composer/pull/2442
**Full Changelog**: https://github.com/mosaicml/composer/compare/v0.16.0...v0.16.1