• About Us
  • Disclaimer
  • Contact Us
  • Privacy Policy
Friday, March 13, 2026
mGrowTech
No Result
View All Result
  • Technology And Software
    • Account Based Marketing
    • Channel Marketing
    • Marketing Automation
      • Al, Analytics and Automation
      • Ad Management
  • Digital Marketing
    • Social Media Management
    • Google Marketing
  • Direct Marketing
    • Brand Management
    • Marketing Attribution and Consulting
  • Mobile Marketing
  • Event Management
  • PR Solutions
  • Technology And Software
    • Account Based Marketing
    • Channel Marketing
    • Marketing Automation
      • Al, Analytics and Automation
      • Ad Management
  • Digital Marketing
    • Social Media Management
    • Google Marketing
  • Direct Marketing
    • Brand Management
    • Marketing Attribution and Consulting
  • Mobile Marketing
  • Event Management
  • PR Solutions
No Result
View All Result
mGrowTech
No Result
View All Result
Home Google Marketing

Introducing Metrax: performant, efficient, and robust model evaluation metrics in JAX

Josh by Josh
November 15, 2025
in Google Marketing
0
Introducing Metrax: performant, efficient, and robust model evaluation metrics in JAX


At Google, as teams were migrating from TensorFlow to JAX, teams were manually reimplementing metrics that were previously provided by TensorFlow, because JAX did not have a built-in metrics library. So each team using JAX was implementing its own version of accuracy, F1, RMS error, etc. While creating metrics may seem, to some, like a fairly simple and straightforward topic, when considering large scale training and evaluation across datacenter-sized distributed compute environments, it becomes somewhat less trivial.

And thus the idea for Metrax was born: to bring a high-performance library for efficient and robust model evaluation metrics in JAX. Metrax currently provides predefined metrics used to evaluate various types of machine learning models (classification, regression, recommendation, vision, audio, and language), and provides compatibility and consistency in distributed and scaled training environments. This allows you to focus on the model evaluation results, rather than (re)implementing various metrics definitions. Metrax adds to the ever-evolving ecosystem of JAX-based tooling, integrating well with the JAX AI Stack, a suite of tools that are designed to work together to power your AI tooling needs. Today, Metrax is already used by some of the largest software stacks at Google, including teams in Google Search, YouTube, and Google’s own post-training library, Tunix.

Strengths of Metrax

Particularly noteworthy is the inclusion of the ability to compute “at K” metrics for multiple values of K, in parallel, which allows you to more comprehensively evaluate model performance, more quickly. For example, you can use PrecisionAtK to determine the precision of your model for multiple values of K (say, at K=1, K=8, and K=20), all in one forward pass through your model, rather than needing to call PrecisionAtK multiple times with each of these arguments. There are several “at K” metrics available for you to try out, including RecallAtK and NDCGAtK. All the metrics, along with their definitions, can be found at the documentation located here.

The last thing you want to worry about when working on your machine learning research project is whether your metrics are implemented correctly across your system, so having a well-tested metrics library will help the community create less error prone code and model evaluations.

Performance

Metrax leverages some of the core strengths of JAX, including vmap and jit, to enable it to do things like multiple “at K” operations, and to do so in a highly performant manner. While not every metric offered is “jit-able” due to the nature of the metric, the goal is to ensure all metrics are well-written and demonstrate best practices. Beyond the classic metrics such as accuracy, precision, and recall, the library also features a robust set of NLP-related metrics, including Perplexity, BLEU, and ROUGE, as well as metrics for vision models, such as Intersection over Union (IoU), Signal-to-Noise Ratio (SNR), and Structural Similarity Index (SSIM). There’s no need to vibe code your metrics implementations anymore, just use Metrax!

Metrax in action

Let’s see how to use Metrax with your code. This is what it looks like to compute precision metrics from your model’s output. Notice that we pass in the predictions and labels, along with a threshold value, and then to compute the metric’s value, we need to call compute().

import metrax

# Directly compute the metric state.
metric_state = metrax.Precision.from_model_output(
    predictions=predictions,
    labels=labels,
    threshold=0.5
)

# The result is then readily available by calling compute().
result = metric_state.compute()
result

Python

Oftentimes, we do evaluations in batches, so we want to be able to iteratively add more information to our collection of metrics. Metrax supports this workflow with a function called merge(). This is a great function to use inside your evaluation loop as you’re aggregating your metrics over the course of your training run. Notice we still call compute() when we’re ready to get a final value.

# Iteratively merging precision metrics
for labels_b, predictions_b, weights_b in zip(labels_batched, predictions_batched, sample_weights_batched):
    batch_metric_state = metrax.Precision.from_model_output(
        predictions=predictions_b,
        labels=labels_b
    )
    metric_state = metric_state.merge(batch_metric_state)

result = metric_state.compute()
result

Python

For a full set of examples check out this notebook, which demonstrates more ways you can use Metrax, including scaling to multiple devices and integrations with Flax NNX, a modeling library that abstracts away some of the implementation details of building AI models.

Contribute

Metrax is developed on GitHub, and happy to accept community contributions. Some of the metrics available today were in fact added by community contributors; big shout out to GitHub users @nikolasavic3 and @Mrigankkh for their efforts! So if there are more metrics you’d like to see added to it, submit a pull request and work with the development team to include it into Metrax. You can learn more at github.com/google/metrax.

Also, be sure to check out the other libraries in the JAX ecosystem, at jaxstack.ai. There you can find more libraries that integrate well with Metrax, and additional content about building machine learning models.



Source_link

READ ALSO

New AI features in Google Maps

Google Maps is getting AI-powered ‘Ask Maps’ feature and more immersive navigation

Related Posts

New AI features in Google Maps
Google Marketing

New AI features in Google Maps

March 13, 2026
Google Maps is getting AI-powered ‘Ask Maps’ feature and more immersive navigation
Google Marketing

Google Maps is getting AI-powered ‘Ask Maps’ feature and more immersive navigation

March 12, 2026
Boosting disaster resilience with Google’s Groundsource
Google Marketing

Boosting disaster resilience with Google’s Groundsource

March 12, 2026
Google announces Google Play paid games updates
Google Marketing

Google announces Google Play paid games updates

March 12, 2026
How Google AI helps improve heart health in rural Australia
Google Marketing

How Google AI helps improve heart health in rural Australia

March 12, 2026
Google’s Gemini AI is getting a bigger role across Docs, Sheets, and Slides
Google Marketing

Google’s Gemini AI is getting a bigger role across Docs, Sheets, and Slides

March 11, 2026
Next Post
OpenAI Researchers Train Weight Sparse Transformers to Expose Interpretable Circuits

OpenAI Researchers Train Weight Sparse Transformers to Expose Interpretable Circuits

POPULAR NEWS

Trump ends trade talks with Canada over a digital services tax

Trump ends trade talks with Canada over a digital services tax

June 28, 2025
Communication Effectiveness Skills For Business Leaders

Communication Effectiveness Skills For Business Leaders

June 10, 2025
15 Trending Songs on TikTok in 2025 (+ How to Use Them)

15 Trending Songs on TikTok in 2025 (+ How to Use Them)

June 18, 2025
App Development Cost in Singapore: Pricing Breakdown & Insights

App Development Cost in Singapore: Pricing Breakdown & Insights

June 22, 2025
Google announced the next step in its nuclear energy plans 

Google announced the next step in its nuclear energy plans 

August 20, 2025

EDITOR'S PICK

International Women’s Day and Women’s History Month

International Women’s Day and Women’s History Month

March 8, 2026
Build Semantic Search with LLM Embeddings

Build Semantic Search with LLM Embeddings

March 8, 2026
Episource is notifying millions of people that their health data was stolen

Episource is notifying millions of people that their health data was stolen

July 14, 2025
You’ve been targeted by government spyware. Now what?

You’ve been targeted by government spyware. Now what?

December 29, 2025

About

We bring you the best Premium WordPress Themes that perfect for news, magazine, personal blog, etc. Check our landing page for details.

Follow us

Categories

  • Account Based Marketing
  • Ad Management
  • Al, Analytics and Automation
  • Brand Management
  • Channel Marketing
  • Digital Marketing
  • Direct Marketing
  • Event Management
  • Google Marketing
  • Marketing Attribution and Consulting
  • Marketing Automation
  • Mobile Marketing
  • PR Solutions
  • Social Media Management
  • Technology And Software
  • Uncategorized

Recent Posts

  • A 4-part process for building an executive voice framework
  • How to watch Jensen Huang’s Nvidia GTC 2026 keynote
  • How to Build an Autonomous Machine Learning Research Loop in Google Colab Using Andrej Karpathy’s AutoResearch Framework for Hyperparameter Discovery and Experiment Tracking
  • New AI features in Google Maps
  • About Us
  • Disclaimer
  • Contact Us
  • Privacy Policy
No Result
View All Result
  • Technology And Software
    • Account Based Marketing
    • Channel Marketing
    • Marketing Automation
      • Al, Analytics and Automation
      • Ad Management
  • Digital Marketing
    • Social Media Management
    • Google Marketing
  • Direct Marketing
    • Brand Management
    • Marketing Attribution and Consulting
  • Mobile Marketing
  • Event Management
  • PR Solutions