HF: Year One

2026-12-02

I joined Hugging Face last January after two years of building AI in Firefox at Mozilla. Moving from a browser vendor to the company that fights for OSS for AI was quite exciting. This is a recap post of (almost) year one at Hugging Face.

AI coding as a tool-building accelerator

The biggest change in the way I work as a developer is AI-assisted coding. Whether you think it’s great or terrible, I don’t write code the way I did two years ago. It started for me at Mozilla when I launched the RustNN effort. Once the architecture was settled, writing a new inference engine by feeding an agent WebNN WPT conformance tests worked surprisingly fast and well.

Looking back at the past year, this has accelerated and the code produced by agents has gotten much better. I think running a local AI for coding will soon become a commodity, and I am convinced that at some point we will do all of our coding with local models.

At this point, iterating on a prototype to try out something takes hours, not weeks. It does not change much in the long run of what it means to run a product in production or build a tool, but it is a hell of an accelerator to see what works and what does not.

And to be honest, for some tooling front ends, the HTML/CSS/JS produced by AI agents is good enough for what we need.

Since my main focus at Hugging Face has been building tools that make Transformers developers’ lives easier, and since almost everyone now uses AI assistance, I have started to design those tools for agents first.

Guardrails for model code: mlinter

mlinter is a very exciting project because it turns Transformers maintainers’ expertise into concrete, deterministic rules. Let’s be realistic: adding code in that project can be intimidating, and while it’s well documented, if you are not a seasoned contributor, it’s hard to keep in your head all the subtle rules of how a model runs in that lib.

And this goes beyond writing code that works: it’s also a matter of taste. Why things are done the way they are. And contributors come up with new ideas all the time.

This is why mlinter exists: it captures simple rules, like Ruff does for Python code, and runs them against your patch at the speed of light using simple AST lookups.

For me this project is a total success because I am not the one writing the rules anymore: maintainers add them and I just do the releases now :)

We have 68 rules and counting!

Launch blog post: https://huggingface.co/blog/huggingface/mlinter Repo: https://github.com/huggingface/transformers-mlinter

Docs that test themselves

This is a very small and simple feature, but the concept is powerful. Docs drift away from the code they present unless you have guardrails for this.

This has been a problem forever. For example, if you ask an agent to “describe an image using a local model”, it will select a popular model on the HF Hub and use the README snippet to build that.

And if that snippet is broken or outdated, your agent might go into a long quest to fix it.

See https://github.com/huggingface/transformers-mic/blob/main/docs/agent-walkthrough/README.md

So Runnable Markdown is this very simple doctest-adapted feature that makes sure your examples work and can be tested in CI.

Blog post: https://huggingface.co/blog/huggingface/runnable-examples

This format is being used now in our functional tests and I feel like this could be an interesting standard for model cards.

Making CI readable

In my first weeks at Hugging Face, when I was trying to dig into CI issues, I realized that we had some blind spots because we lacked observability.

For instance, a failing test required digging into cryptic GitHub logs, and it was quite hard to determine if it was an infra issue or a real problem. You had to ssh into some box.

So I worked on creating an observability platform for Transformers based on OpenTelemetry: a pytest OTel plugin on the test side, and a very standard OTel Collector, Tempo and Prometheus stack with Grafana dashboards on the server side.

It then started to get direct GitHub notifications to make it a live dashboard, and grew into a whole application for maintainers: it now includes benchmarks, failure reports, project health, actions to run agents, etc.

You can find it here: https://transformers-ci.huggingface.cool

And Grafana gradually became just a wrapper around frames served by a Python server. The search box, the menu and many other elements are replaced on the fly when Grafana loads, and a lot of Prometheus queries are being rewritten as pure Tempo queries. Grafana will soon be completely removed in favor of a pure Python web app, but I am glad we took this path and made the first version with it.

Serge

Serge is an AI code reviewer for GitHub that you summon from a pull request with a simple @askserge please review comment. The review rules live in .ai/review-rules.md on the default branch, so a PR can’t rewrite the rules it gets judged by, and approvals are blocked by default: Serge comments, humans approve.

What matters the most to me in Serge, and what makes it better than Copilot in my opinion, is that it does not just read the diff. It checks out the project in a CI runner, so it can run the linters, the tests and mlinter, and base its comments on what they actually output.

It can run as a GitHub Action, as a GitHub App, or as a staged web app where a maintainer edits the drafts before anything lands on the PR. And you can pick any model available through Hugging Face Inference Providers, open-weight ones included.

Blog post: https://huggingface.co/blog/huggingface/serge Project: https://github.com/huggingface/serge

relore

Agents are great at reading code, but they have no idea of what happened around it. They will happily start working on a bug that was already discussed in an issue, or that someone already fixed in a PR waiting for review.

relore indexes the issues, PRs and review discussions next to the code, and distinguishes between a maintainer decision, a contributor claim and some bot output.

My favorite example is a GPTNeoXJapanese RoPE bug: relore inflight found an already approved fix and stopped the agent from opening a duplicate PR, which saved maintainers a useless review.

It also turned out to be useful beyond agents. Our CI jobs can query relore instead of calling gh search over and over, so we no longer hit GitHub’s API rate limits. The repository history gets indexed once, and every job, bot and agent reads from that same index.

relore was recently improved with vector search, and I have started some research to see if we could move from a search index over the project history to something smarter that helps agents make better decisions. No breakthrough for now.

Blog post: https://huggingface.co/blog/huggingface/relore-repository-memory Project: https://github.com/huggingface/relore

Letting an agent fix the nightly failures

Nightly CI has a long tail of failures nobody has time to look at, so I built an agent pipeline to take them on. It picks a persistent failure, reproduces it on a GPU, checks with relore that nobody is already on it, writes a patch, then runs the test 5 times without the patch and 5 times with it. Only then does it open a PR.

Over ~80 days it worked on 117 failure groups and landed 29 fixes, using an open-weight model. It does not replace maintainers though: every PR still needs a human to review it.

Blog post: https://huggingface.co/blog/huggingface/anatomy-of-a-bug-fixing-agent Project: https://github.com/huggingface/serge

One thing I am curious about is whether we could train a model for this. Every session leaves a trail behind it: the failure, the patch, the verification runs and the maintainer’s verdict, including the rejected patches. I wonder if this would be enough to fine-tune a smaller open model that knows Transformers’ quirks. The price per million tokens is not the interesting metric here. What matters is how much it costs to get a fix merged, and a smaller model trained on our own fixes could lower it. I have not tried it yet.

Model Integration Contracts

Testing a model integration for real means downloading huge checkpoints and running them on GPUs, and that’s not something you can do on every PR. Model Integration Contracts shrink models into tiny fixtures that keep the same layer kinds, so they can run on CPU in CI against reviewed baselines.

The shrinking is quite drastic: Llama 4 Scout goes from 108.6B down to 44.7M parameters, and UMT5 from 1,227 MB to 66 MB. And yet a fixture caught a UMT5 SDPA bug that had been live in main for two months.

Tests run in a few seconds, so contributors get feedback much faster than when they wait for a GPU job. We also extended it to run the MIC tests against Sentence Transformers and vLLM, to see when a change in Transformers breaks those downstream libraries.

Blog post: https://huggingface.co/blog/transformers-mic Project: https://github.com/huggingface/transformers-mic

Performance side quests

When I have spare cycles, I like to see how far we can push local AI on small machines, an interest that goes back to my Mozilla days when I was adding small models to Firefox.

The most fun one was running a ~180B MoE model on my 32GB MacBook. Accelerate offload copies every expert for each token. experts_offload only streams the experts picked by the router, with an LRU slot pool, prefetching and 3-bit experts.

With that, we went from 0.16 tok/s to 13.9 tok/s decode, on par with Strata. It’s still too slow for a coding agent workflow, but it runs!

KernelAtlas is the other side quest: a deterministic search for the best combination of Hub kernels that checks correctness before timing anything (and sometimes concludes that no Hub kernel wins).

Blog posts: https://huggingface.co/blog/moe-expert-streaming and https://huggingface.co/blog/tarekziade/kernel-atlas Code: https://github.com/huggingface/transformers/pull/50717 and https://github.com/tarekziade/kernelatlas

Benchmarks: is it slower, or is the VM just noisy?

Performance tooling has been a thread through my whole career. At Mozilla I load tested web services at Firefox Sync scale, which became Molotov, and I also created mozperf, a CI tool that runs performance tests on Firefox and detects regressions. At Elastic I built performance regression tests for our enterprise features.

So it felt natural to do the same at Hugging Face. I recycled some initial benchmark scripts we had and built transformers-perf, which runs daily benchmarks on main and on PRs. The results land on the dashboard’s /benchmarks pages, where people already look: https://transformers-ci.huggingface.cool/benchmarks/main

Most of the work was fighting noise with host tuning and a per-run noise probe, and surfacing memory and profiling reports.

Those reports helped me spot an improvement for generation on CUDA: deferring the stop check in compiled generation cuts latency by 15%. The PR is still under review: https://github.com/huggingface/transformers/pull/51485

Repo: https://github.com/huggingface/transformers-perf

What’s next

I think 2027 will be a big year for local AI. I am curious to see how much of our developer tooling we could run with small local models, and I want to spend more time playing with MLX on my MacBook to see how we could better integrate it with Transformers.

I’ve also been thinking about the role of Transformers now that agents can implement models in other inference engines. How do we make sure Transformers remains the natural starting point for those agents? I don’t have a good answer to this yet, but it’s something I would like to explore next year.

It’s been a busy first year, and I am really happy with what we’ve built with the team.

Onto year 2!