Model or dataset
google/meridian avatar
google/meridian

Meridian: Google's Bayesian MMM framework for in-house marketing mix modeling

Meridian is an MMM framework that enables advertisers to set up and run their own in-house models.

1,532 stars294 forksPythonApache-2.0

At a glance

What is it?
Meridian is an Apache-2.0 Python framework from Google for building in-house marketing mix models using Bayesian causal inference and NUTS sampling. It targets advertisers who want control over their MMM, with GPU support and calibration features, but it demands serious compute and a statistical background.
Who is it for?
Adopt Meridian if you are an advertiser with in-house data science talent, a need for custom Bayesian MMM, and access to GPU resources; it offers a full pipeline from data preparation to scenario planning. Avoid it if you lack statistical modeling expertise or cannot provision at least one GPU, as CPU training will be slow.
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 5 days 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 Meridian actually does for advertisers

Meridian solves a specific problem: measuring how marketing channels drive revenue or other KPIs using aggregated data, without relying on cookies or user-level information. It is built for advertisers who want to run their own marketing mix models in-house rather than outsourcing to a vendor. The framework answers three questions: which channels drove revenue, what was the marketing ROI, and how should future budgets be allocated. It handles both national-level and geo-level data, with geo-level encouraged for better causal identification. This is not a plug-and-play dashboard; it is a modeling framework that assumes you have the data and the skills to interpret Bayesian output.

The Bayesian mechanism: NUTS and causal inference

At its core, Meridian uses Bayesian causal inference. The README states that it relies on a holistic MCMC sampling approach called the No U Turn Sampler (NUTS). NUTS is a Hamiltonian Monte Carlo variant that adapts step sizes and trajectory lengths automatically, which makes it more efficient than classic random-walk Metropolis but still computationally heavy. The model incorporates non-marketing factors that affect sales, such as seasonality or economic indicators, through control variables. The Bayesian framework allows you to incorporate prior information, which is essential for calibration with experiments. The documentation emphasizes that the model is highly customizable, meaning you can adjust priors and model structure, but that flexibility comes at the cost of requiring you to understand what you are changing.

Getting it running: install commands and hardware requirements

Installation is straightforward but has hard requirements. You need Python 3.11 through 3.13. For Linux with an NVIDIA GPU and CUDA toolchain, the command is `pip install --upgrade google-meridian[and-cuda]`. For macOS and general CPU users, it is `pip install --upgrade google-meridian`, but the README notes there is no official GPU support for macOS. You can also install the latest unreleased version from GitHub using a pip URL with the `git+https` syntax. The README recommends a minimum of 1 GPU and notes that the project was tested on a T4 GPU with 16 GB of RAM. A fresh virtual environment is recommended to avoid dependency conflicts, as defined in `pyproject.toml`. If you are on a CPU-only machine, expect slow training because NUTS is compute intensive; the README explicitly says GPU support is developed across the library using tensors to reduce training time.

Where the documentation is thin: limitations and failure modes

The README is clear about compute needs but silent on several practical failure modes. One obvious limitation is that the model is only as good as your data. If you do not have clean, aggregated data at the geo or national level, you cannot use Meridian. The framework also requires statistical expertise; it does not hand you a simple answer. The NUTS sampler can fail to converge, and the documentation mentions post-modeling guidance for model fit and debugging, but that is not a substitute for experience. Another limitation is the compute barrier. The README says a GPU is recommended, not optional. On a CPU, training time could be prohibitive for large datasets. The project also has no recent releases listed in the provided material, which raises a question about release cadence. You should check the GitHub issues and discussions for known problems, as the team responds weekly in batches.

Calibration and frequency optimization: the differentiators

Two features stand out in the README. First, Meridian supports calibration of MMM with experiments and other prior information. This is a real advantage over simpler MMM tools that ignore experimental lift results. Second, it can optimize target ad frequency using reach and frequency data. This goes beyond typical budget allocation and addresses the question of how often to show an ad, not just how much to spend. These features are described as methodologies, meaning they are built into the modeling framework, not afterthoughts. For advertisers who run lift tests or have reach curves, these capabilities make Meridian more than a standard regression model. However, the README does not provide details on how to configure these features, so you will need to consult the full documentation and user guide.

Alternatives: LightweightMMM and the migration path

The most direct alternative is LightweightMMM, also a Google project. The README includes a migration guide, which implies that LightweightMMM is simpler but less capable. The key difference is that LightweightMMM is a lightweight, often Stan-based approach that is easier to run on a laptop, while Meridian is a full TensorFlow-based framework with NUTS and GPU support. If you already use LightweightMMM, the migration guide explains the differences, but the README does not list them. From the tone, Meridian is meant to replace LightweightMMM for serious in-house teams that need more customization and calibration. Another alternative would be a Bayesian MMM built directly on PyMC or Stan, but that requires you to build the model yourself. Meridian gives you a pre-built structure with customization points, which is a middle ground between a black-box vendor tool and a from-scratch model.

Maintenance, support, and license implications

Meridian is released under Apache-2.0, which is permissive and allows commercial use, modification, and redistribution with attribution. The README does not mention any copyleft restrictions, so you can integrate it into proprietary systems. For maintenance, the project is not archived, and the README directs users to GitHub Discussions for questions and Issues for bug reports. The team responds weekly in batches, which is a slower cadence than some open source projects. There are no recent releases listed in the material, so you should verify the latest version on PyPI before relying on it. The dependency on TensorFlow Probability and CUDA means that upgrades to those libraries could break your environment; the README recommends a fresh virtual environment to manage this. Plan for ongoing maintenance as TensorFlow evolves.

Who should adopt Meridian and what to verify first

Meridian is for advertisers with in-house data science teams who want full control over their MMM and have GPU infrastructure. It is not for small businesses or marketers without statistical modeling experience. Before adopting, verify that your data meets the aggregation requirements, that your Python environment is 3.11-3.13, and that you can provision at least one T4-class GPU. Run the Getting Started Colab with sample data to see if the training time is acceptable. Check the GitHub Issues for recent bug reports, since the team responds in batches and there may be unresolved problems. If you are coming from LightweightMMM, read the migration guide to understand what changes in your workflow. The framework is powerful, but only if you are prepared to handle the compute and the statistical complexity. The README states that GPU support is out-of-the-box, but that assumes you have the hardware. Start with the sample data, measure the training time, and then decide if it fits your production needs.

Editorial conclusion

Adopt Meridian if you are an advertiser with in-house data science talent, a need for custom Bayesian MMM, and access to GPU resources; it offers a full pipeline from data preparation to scenario planning. Avoid it if you lack statistical modeling expertise or cannot provision at least one GPU, as CPU training will be slow. Before adopting, verify your data meets the framework's requirements for geo-level or national aggregation, confirm your Python 3.11-3.13 environment can handle TensorFlow Probability dependencies, and review the migration guide if you currently use LightweightMMM. Test the Getting Started Colab on your own data to gauge training time and model fit before committing.

Official sources

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

Community notes