Library / SDK
marin-community/marin avatar
marin-community/marin

Marin: An Open Research Framework for Training Foundation Models, From TinyStories to 5e24 FLOPs

Open-source framework for the research and development of foundation models. Marin's primary use case is training language model like Llama, DeepSeek, Qwen, etc.

3,649 stars292 forksPythonApache-2.0

At a glance

What is it?
Marin is an open-source Python framework for the full lifecycle of training large language models, from data curation to evaluation. It emphasizes open development and reproducible experiments, with recent work on scaling laws and mixture-of-experts models.
Who is it for?
Adopt Marin if you are a researcher or engineer who needs a reproducible, step-based framework for training language models, especially if you value open development and want to scale from small experiments to large GPU or TPU pods. Do not adopt it if you need a plug-and-play training library with minimal setup, as Marin requires understanding its step graph and configuration system.
Can I use it commercially?
Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 1 day ago.
What is it written in?
Mainly Python, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 14, 2026, and from our analysis. They are not legal advice.

DEEP OPEN-SOURCE ANALYSIS

What Marin Actually Solves

Marin addresses the messy, under-documented process of training large language models. Most open-source projects release final weights and a few config files. Marin's stated core value is open development: it records every step from raw data to final model, including failed experiments. The problem it solves is not just "how to train a transformer" but "how to run a research program where every decision is auditable and reproducible." The intended audience is researchers and engineers who want to train models like Llama, DeepSeek, or Qwen, and who care about the process as much as the artifact. The README explicitly mentions use for audio-text, DNA, and protein models, so it is not limited to text. However, the primary focus is language models, and the examples and scaling suite are all text-based.

The Step-Graph Execution Model

Marin experiments are defined as a set of steps that depend on each other, executed in topological order, like a Makefile. This is the core architectural mechanism. The example in the README shows a tokenization step and a training step. The training step depends on the tokenized dataset step, so it runs after tokenization completes. This is a deliberate design choice: it forces experiments to be decomposed into discrete, cacheable stages. The `tokenized` function returns a lazy handle, so nothing downloads until the step actually runs. This lazy evaluation is similar to how build systems defer work. The dependency graph is not just for ordering; it also enables resumability. If a step fails or is changed, only downstream steps need to re-run. This is a significant advantage over monolithic training scripts, but it also means you must think in terms of steps, not just a single Python file.

Getting Started: Installation and First Experiment

The README points to an installation tutorial in `docs/tutorials/installation.md` and a first-experiment tutorial that trains a tiny language model. The example script imports from `fray.cluster`, `levanter.optim`, and `marin.execution.lazy`, among others. The `lower` function from `marin.execution.lazy` appears to compile the lazy graph into executable steps. The `StepRunner` from `marin.execution.step_runner` is the executor. The example uses a `marin_tokenizer` and a `llama_nano` model configuration, both from local experiment modules. To run it, you clone the repository, install the package (likely via `pip install marin` or from source, as per the installation docs), and then run the script. The README warns that the example is complete but you may need to adjust paths and configs. The key takeaway is that Marin is not a command-line tool with a single `train` command; it is a library where you define steps in Python and run them via a runner.

The Delphi Scaling Suite: From 3e18 to 1e23 FLOPs

Marin's most concrete deliverable is Delphi, an open scaling suite that scales an LLM recipe from 3e18 to 1e23 FLOPs. It has three parts: a scaling recipe that maps compute budgets to model configurations, a suite of models trained on Google TPU Research Cloud, and a scaling law that predicts larger models from smaller ones. The README claims the scaling law extrapolates 300x past the fit. This is a strong claim, and you should verify it by looking at the plot-ready data on Hugging Face. The suite includes checkpoints for every run, training mixture pipelines that deterministically reproduce the mix from Nemotron-CC, StarCoderData, and ProofPile 2, and a forkable `CompletedAdamHParams` class for recipe code. This is not just a benchmark; it is a methodology. If you are planning a large pretraining run, Delphi gives you a starting point for choosing model size and data mix, but you must be prepared to adapt it to your own compute environment.

Current Focus: Mixture-of-Experts at 5e24 FLOPs

Marin's current work is pretraining and posttraining a large mixture-of-experts model with 5e24 model-FLOPs and over 500 billion total parameters. This is a frontier-scale effort, and it is not something a typical user will replicate. The README mentions a technique called "Quantile Balancing" for keeping MoE experts load balanced, validated at 32B-A5B scale. This is a concrete algorithmic contribution. The repository also includes retrospective reports on an 8B model that outperformed Llama 3.1 8B on their benchmark suite, and a 32B model. These reports are in `docs/reports/`. For a user considering Marin, this focus means the framework is being actively tested at extreme scale, which is a good sign for stability, but it also means some features may be optimized for TPU pods and multi-slice setups, not just single-GPU workstations.

Limitations and When Marin Is the Wrong Tool

Marin is not a lightweight library. The step-graph model adds conceptual overhead. If you just want to fine-tune a model on a single GPU, Marin is overkill. The README's example requires importing from `fray` and `levanter`, which are external dependencies. This coupling means you need to understand those projects as well. The documentation is spread across ReadTheDocs, a `docs/` folder, and blog posts, which can be disorienting. The README itself is a mix of marketing, tutorial, and links, and it is truncated in the material I have, so I cannot confirm the full installation instructions. Another limitation is that the scaling suite is trained on TPUs, and while the framework supports GPUs, the recipes may not be directly transferable. The README mentions "multislice TPUs" as a scaling path, which suggests that CPU or single-GPU users are not the primary audience. If you need a stable, well-documented library with a large community, Marin is still early-stage; the last push is from August 2026, but the project is not archived.

Alternatives: Pythia and Other Frameworks

The README explicitly cites EleutherAI's Pythia as an inspiration for Delphi. Pythia is a suite of models trained on the same data with varying sizes, designed for studying scaling and learning dynamics. The difference is that Pythia provides the models and checkpoints, but not a framework for training your own. Marin aims to give you the recipe and the code to reproduce the process. Another alternative is the Hugging Face Transformers library with its `Trainer` API, which is much simpler and more widely used. Transformers is a library, not a research program; it does not enforce a step graph or open development. If you want to train a custom model quickly, Transformers is easier. Marin's advantage is its focus on reproducibility and scaling laws, which is valuable for research but not for production fine-tuning. The choice depends on whether you need a process or just a tool.

Maintenance, License, and Upgrade Costs

Marin is licensed under Apache-2.0, which is permissive and allows commercial use, modification, and distribution, with no copyleft obligations. This is a low legal barrier for adoption. The repository is actively maintained, with the last push in August 2026 and recent releases for dev wheels and components like `marin-zephyr` and `marin-rigging`. The release cadence suggests ongoing development. The maintenance cost for you is in keeping up with changes to the API. The README references specific commit hashes for scripts, which indicates that the codebase is evolving and examples may break. The documentation is on ReadTheDocs, which is a good sign, but you should expect to read the source code when something is unclear. The upgrade cost is moderate: because experiments are defined as code, you will need to update your scripts when the API changes. The presence of agent skills in `.agents/skills/` suggests the project is also experimenting with AI-assisted development, which could be a double-edged sword for stability.

Editorial conclusion

Adopt Marin if you are a researcher or engineer who needs a reproducible, step-based framework for training language models, especially if you value open development and want to scale from small experiments to large GPU or TPU pods. Do not adopt it if you need a plug-and-play training library with minimal setup, as Marin requires understanding its step graph and configuration system. Before adopting, verify that the documentation on ReadTheDocs matches the current repository state, check the compatibility of the `fray` and `levanter` dependencies with your cluster, and review the `experiments/` directory for examples that match your use case. Marin's value is in its process transparency and scaling suite, so confirm that the Delphi scaling recipe and the `CompletedAdamHParams` class are applicable to your model size and compute budget before committing.

Official sources

  1. Official documentation
  2. Official README
  3. Project repository
  4. Release notes
Community notes

Community notes