GithubHelp home page GithubHelp logo

jfrankle / mosaicml-examples Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mosaicml/examples

0.0 0.0 0.0 15.73 MB

Fast and flexible reference benchmarks

License: Apache License 2.0

Shell 0.43% Python 99.07% Makefile 0.44% Dockerfile 0.06%

mosaicml-examples's Introduction

MosaicmML Examples

This repo contains reference examples for training ML models quickly and to high accuracy. It's designed to be easily forked and modified.

It currently features the following examples:

Installation

To get started, either clone or fork this repo and install whichever example[s] you're interested in. E.g., to get started training GPT-style language models, just:

git clone https://github.com/mosaicml/examples.git
cd examples
pip install ".[llm]"  # or pip install ".[llm-cpu]" if no NVIDIA GPU
cd llm

Tests and Linting

If you already have the dependencies for a given example installed, you can just run:

pre-commit run --all-files  # autoformatting
pyright .  # type checking
pytest tests/  # run tests

from the example's directory.

To run the full suite of tests for all examples, invoke make test in the project's root directory. Similarly, invoke make lint to autoformat your code and detect type issues throughout the whole codebase. This is much slower than linting or testing just one example because it installs all the dependencies for each example from scratch in a fresh virtual environment.

Examples

This repo features the following examples, each as their own subdirectory:

ResNet-50 + ImageNet

drawing

Figure 1: Comparison of MosaicML recipes against other results, all measured on 8x A100s on MosaicML Cloud.

Train the MosaicML ResNet, the fastest ResNet50 implementation that yields a โœจ 7x โœจ faster time-to-train compared to a strong baseline. See our blog for more details and recipes. Our recipes were also demonstrated at MLPerf, a cross industry ML benchmark.

๐Ÿš€ Get started with the code here.

DeepLabV3 + ADE20k

drawing

Train the MosaicML DeepLabV3 that yields a โœจ5xโœจ faster time-to-train compared to a strong baseline. See our blog for more details and recipes.

๐Ÿš€ Get started with the code here.

Large Language Models (LLMs)

Training curves for various LLM sizes.

A simple yet feature complete implementation of GPT, that scales to 70B parameters while maintaining high performance on GPU clusters. Flexible code, written with vanilla PyTorch, that uses PyTorch FSDP and some recent efficiency improvements.

๐Ÿš€ Get started with the code here.

BERT

This benchmark covers both pre-training and fine-tuning a BERT model. With this starter code, you'll be able to do Masked Language Modeling (MLM) pre-training on the C4 dataset and classification fine-tuning on GLUE benchmark tasks.

We also provide the source code and recipe behind our Mosaic BERT model, which you can train yourself using this repo.

๐Ÿš€ Get started with the code here.

mosaicml-examples's People

Contributors

abhi-mosaic avatar dblalock avatar vchiley avatar bandish-shah avatar samhavens avatar landanjs avatar hanlint avatar dakinggg avatar alextrott16 avatar bmosaicml avatar mvpatel2000 avatar a-jacobson avatar galtay avatar knighton avatar mrseeker avatar growlix avatar vladd-i avatar bcui19 avatar corymosaicml avatar nik-mosaic avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.