marin-community/marin

▲ 2,556 stars today★ 3,768⑂ 303

Open-source framework for the research and development of foundation models.

About marin-community/marin

marin-community/marin is an open-source project on GitHub, mainly written in Python. Open-source framework for the research and development of foundation models. It currently holds 3,768 stars and 303 forks with 0 open issues, and was last pushed on an unknown date (repository created unknown).

Project Overview

Git Homed tracks it on the Today's Trending board.

GitHub Repository Details

Repository marin-community/marin · default branch - · size 0 KB · watchers 0 · source: GitHub REST API and repository README

README

https://github.com/marin-community/marin/blob/HEAD/Marin Marin

https://github.com/marin-community/marin/blob/HEAD/Documentation https://github.com/marin-community/marin/blob/HEAD/License

"I am not afraid of storms, for I am learning how to sail my ship."
– Louisa May Alcott

Marin is a research program, software platform, and community for the research and development of foundation models.

Marin's concern is training large language models. This includes data curation, transformation, filtering, tokenization, pretraining, posttraining, and evaluation. Beyond the artifacts, software, and infrastructure, behind these models, Marin is committed to openly sharing all of the process knowledge required to build these models.

Marin's core value is open development. We document our processes, experiments, and decisions as they happen. Every step, from raw data to the final model, is recorded. Failed experiments are part of that record.

Marin has also been used for building audio-text models, DNA, and protein models. We encourage this work through the use of Marin as a library, in marin/experiments.

Current work

Frontier mixture-of-experts

Our current focus is pretraining, from scratch, and posttraining a large (5e24 model-FLOPs, 500 billion+ total parameters) mixture-of-experts model to succeed on tasks of importance to scientists and researchers.

Scaling suite

Delphi is Marin's open scaling suite scaling a LLM recipe from 3e18 to 1e23 FLOPs, inspired by Pythia. It has three parts: a scaling recipe that maps compute budgets to model configurations, a scaling suite trained from that recipe on the Google TPU Research Cloud, and a scaling law that uses the smaller Delphi models to predict the larger ones.

We released:

Progress was tracked in GitHub issue #1337.

Other learnings

Some additional consolidated learnings can be found on the Open Athena blog. A selection, below:

Other models

Previously, we used Marin to train an 8B parameter model that outperformed Llama 3.1 8B on our base-model benchmark suite. You can see the training script or read the retrospective. We also trained Marin 32B.

Learning more & using Marin

The documentation for Marin is available on ReadTheDocs or in the docs/ folder.

To get started with Marin:

Example

Marin experiments are defined as a set of steps that can depend on each other and are executed in a topological order, like a Makefile.

As a brief example of how you can use Marin, here is a complete script for training a tiny model on TinyStories. You can check out the full script for more details.

from fray.cluster import ResourceConfig
from levanter.optim import AdamConfig
from marin.execution.lazy import lower
from marin.execution.step_runner import StepRunner
from marin.experiment.data import tokenized
from marin.experiment.train import train_lm

from experiments.llama import llama_nano from experiments.marin_tokenizer import marin_tokenizer

1. Tokenize the dataset as a lazy handle — nothing downloads yet.

tinystories_tokenized = tokenized( name="tokenized/tinystories", source="roneneldan/TinyStories", tokenizer=marin_tokenizer, sample_count=1000, # cap at 1 000 samples per shard to keep the tutorial fast )

2. Train the model — depends on the tokenized dataset above.

nano_tinystories_model = train_lm( name="checkpoints/marin-nano-tinystories", version="v1", model=llama_nano, optimizer=AdamConfig(learning_rate=6e-4, weight_decay=0.1), # Steps can depend on other steps: nano_tinystories_model depends on tinystories_tokenized datasets={tinystories_tokenized: 1.0}, batch_size=4, seq_len=2048, num_train_steps=100, z_loss_weight=None, evals=None, # no point evaluating such a tiny model resources=ResourceConfig.with_cpu(), )

if __name__ == "__main__": StepRunner().run([lower(nano_tinystories_model)])

Here, we create two steps, one for tokenizing the dataset and one for training the model. The training step depends on the tokenized dataset step, so it will be executed after the tokenization step is completed.

With slight modifications, you can extend this to train a larger model on a larger dataset, a mixture of datasets, even scaling to very large GPU or TPU pods (or multislice TPUs!).

For Contributors

Core Contributors

Marin's core collaborators come from Stanford CRFM and Open Athena.

https://github.com/marin-community/marin/blob/HEAD/Stanford CRFM     https://github.com/marin-community/marin/blob/HEAD/Open Athena

Supporters

Marin's research is made possible by the generous support of our partners.

https://github.com/marin-community/marin/blob/HEAD/Google TPU Research Cloud The Jen-Hsun and Lori Huang Foundation
for TRC accelerators for GPU clusters
https://github.com/marin-community/marin/blob/HEAD/Siegel Family Endowment https://github.com/marin-community/marin/blob/HEAD/Schmidt Sciences
for supporting development for supporting development

GitHub Stars & Activity

3,768Stars
303Forks
0Open issues
PythonLanguage

GitHub Popularity

GitHub stars3,768
Forks303
Open issues0
Primary languagePython
License-
Stars gained today2,556
Created-
Last pushed-

Trending History

Monthly boardrank #62 · ▲ 2,556 stars

Related GitHub Projects

1

Significant-Gravitas / AutoGPT

Python★ 187,458⑂ 46,009▲ 30 stars
2

docling-project / docling

Python★ 67,380⑂ 4,855▲ 629 stars
3

paperless-ngx / paperless-ngx

Python★ 45,402⑂ 3,137▲ 32 stars
4

anthropics / financial-services

Python★ 35,231⑂ 5,236▲ 236 stars
5

harvard-edge / cs249r_book

Python★ 28,375⑂ 3,589▲ 31 stars
6

browser-use / browser-harness

Python★ 17,832⑂ 1,747▲ 86 stars
7

cactus-compute / needle

Python★ 11,843⑂ 759▲ 404 stars
8

FareedKhan-dev / train-llm-from-scratch

Python★ 10,089⑂ 1,400▲ 196 stars

More Trending Repositories