← Back to the wire

How to Use Transformers.js in a Chrome Extension

AnnouncementProductApr 23, 2026

Hugging Face released a Transformers.js demo browser extension powered by Gemma 4 E2B. Nico Martin's guide details running local AI in a Chrome extension under Manifest V3 constraints. The architecture uses a background service worker for model hosting and inference, a side panel for chat UI, and a content script for page actions. All inference runs locally, with Gemma 4 handling reasoning and MiniLM generating embeddings for semantic search.

Evidence

1source· awaiting independent confirmation

No score is assigned. Sources and their independence are shown in the citation chain below.

Citation chain · 1 source

Hugging FaceCompanyNico MartinPersonTransformers.jsModelGemma 4 E2BModel
Canonical: https://huggingface.co/blog/transformersjs-chrome-extension