TLDRocket
Sign in

Browser Integration

12 summarised stories about Browser Integration, each linking back to the original source. Browse all topics →

Thursday, 23 April 2026

How to Use Transformers.js in a Chrome Extension

Hugging Face Blog 2 months ago

Transformers.js was integrated into a Chrome extension using Manifest V3 by centralizing model inference and agent orchestration in a background service worker while keeping UI and page logic in separate side panel and content script runtimes. The extension loads two models—Gemma-4-E2B for text generation and MiniLM-L6-v2 for embeddings—entirely in the background, with all inference cached under the extension origin rather than per-website. The architecture separates conversation state (background memory), user settings (chrome.storage.local), and retrieval data (IndexedDB), enabling responsive UI, reusable models across tabs, and clear messaging contracts between runtimes.