deniz.in

Markets

Weather

Loading weather

· via dev.to (home feed)

Gev brings fully local AI Gmail labeling to the browser with a bundled Transformers.js model

A developer's Gev extension sorts Gmail into labels like Receipts and Newsletters by running a Transformers.js model entirely inside the browser, with no inference API in the loop.

Gev brings fully local AI Gmail labeling to the browser with a bundled Transformers.js model

A Gmail labeler with no AI service in the loop

A developer has published details of Gev, a browser extension that reads Gmail messages and files them into labels such as Receipts, Personal, Updates and Newsletters. In a post on dev.to, the author explains that the project grew out of a simple frustration: wanting an easier way to organize the inbox without letting an AI provider see the contents of the messages being sorted.

The distinguishing design decision is that classification never leaves the user's machine.

How the local pipeline works

According to the dev.to post, Gev is built on Transformers.js, the JavaScript library for running transformer models in the browser, and it uses the laya model from receptron's GitHub repository for the classification work.

Two components ship inside the extension package: the model itself and the ONNX runtime that executes it. The author states that there is no inference API and no hosted model anywhere in the setup — the extension is the entire runtime environment.

The only external communication is with Gmail itself, which is unavoidable given that the extension's job is to read a Gmail mailbox. Beyond that mailbox access, message data goes nowhere else: no third-party host receives the text that gets classified.

For context, Transformers.js wraps ONNX Runtime Web, which executes neural networks in the browser using WebAssembly or WebGPU. That is what makes an arrangement like Gev's feasible: the same extension that talks to Gmail can also run a text classifier, with no server-side component to build, host or pay for.

The trade-offs of shipping the model

Bundling an inference engine into an extension is not free. The download grows to include model weights, and every improvement to the classifier has to ride along with an extension update rather than being swapped in server-side. On-device models also tend to be compact compared with large cloud-hosted models, so users should expect occasional mislabels on unusual mail. The dev.to post does not report benchmark numbers, accuracy figures or package size, so how well Gev performs in practice remains an open question.

Why it matters

Most "smart" features in mail clients involve the provider processing message contents on its servers. Gev sketches the opposite arrangement: an inference engine distributed as part of the client, where the only party that sees the data is the mail provider the user already has an account with.

For extension developers, the project is a useful template for the pattern: pick a compact classifier, bundle it with an ONNX runtime, keep the logic local. For users, it is evidence that useful AI assistance does not require a cloud round trip. As browser-based ML runtimes mature and small classification models improve, fully local tooling like this becomes less of a novelty and more of a default option.

  • #browser-extensions
  • #machine-learning
  • #privacy
  • #gmail
  • #onnx

Related posts