Search the archive

14,371 indexed articles, 13,299 of them summarised by us.

Articles
14,371
Research papers
91,965
Models priced
2,254
Providers
163

8 results for “Transformers.js”

Newest and most relevant first

Experimenting with the proposed Cross-Origin Storage API in Transformers.js

Browser-cached AI model files are re-downloaded per origin today; an experimental cross-origin shared cache in Transformers.js 4.2.0 could eliminate hundreds of megabytes of duplicate downloads.

A Google Chrome engineer writing on Hugging Face's blog explains an early browser proposal called Cross-Origin Storage. Today, when two different websites use the same AI model, like the Whisper speech-recognition model, each site makes your browser download the same large files again, wasting storage and time. The proposal lets browsers share these files across websites, identifying them by a cryptographic fingerprint instead of by site. No browser supports it natively yet; developers can try it via an extension or an experimental flag in Transformers.js.

Web apps running AI models in the browser currently re-download identical files per site, the article's example wastes 177 MB of duplicate Whisper weights, because caches are isolated by origin for security. Google Chrome's Thomas Steiner proposes Cross-Origin Storage, keyed by SHA-256 hash, with Transformers.js 4.2.0 already piloting it behind an opt-in flag. The API is not standardized or natively implemented, and privacy mitigations for rare files are still undecided. Cost savings for bandwidth and storage are real but deferred until browsers ship it.

The proposal adds navigator.crossOriginStorage, modeled on OPFS's getFileHandle(), keyed by SHA-256 rather than URL. Writes verify the hash, giving automatic integrity checks; origins controls visibility ('*' global, list-restricted, or same-site) and can be upgraded but never downgraded to prevent narrowing attacks. Timing-attack-driven cache partitioning (Network Isolation Key) is the problem; mitigations like availability gating for rare hashes are unresolved. Transformers.js PR #1549 enables it via env.experimental_useCrossOriginStorage, resolving hashes from Xet pointer files.

Huggingface Blog →

AI Resume Analyzer matches candidates to jobs using smart AI evaluations straight from the browser.

Very little for most professionals: it's a demo-grade open-source tool, but it shows developers they can run AI resume-matching entirely in-browser without servers or API keys.

A developer named Adrian Hajdin has published a free, open-source tool called AI Resume Analyzer on GitHub. You upload a resume (as a PDF) and paste in a job description, and it gives a match score plus lists of missing skills and strengths. Unlike typical AI tools, everything runs inside your web browser using a downloaded AI model, so personal resume data never leaves your computer. It's aimed at side projects and small teams, not serious HR departments.

AI Resume Analyzer is a free open-source demo, not a production HR system, so it poses no competitive threat to recruiting platforms. Its significance is architectural: it runs AI scoring fully client-side via Transformers.js, eliminating server costs and API keys while keeping sensitive candidate data on the user's machine. Small teams or hackathon builders gain a starting point; enterprises gain nothing. No benchmark figures or accuracy claims are provided.

A client-side resume-to-job-description matcher built as a single HTML page with JavaScript, using Transformers.js and Hugging Face's inference API for local model inference. It extracts text from uploaded PDFs, produces a match score with missing-skills/strengths insights, and treats semantic equivalents like '5 years Python' and 'strong Python background' alike. No build step, npm install, or Docker is required; models can be swapped and scoring logic customized. Works offline after model load, though the article gives no accuracy benchmarks.

GitHub Opensource Projects →

How to Use Transformers.js in a Chrome Extension

Developers can now build Chrome extensions that run LLM inference fully locally using Transformers.js, avoiding server costs and keeping user data on-device under Manifest V3 constraints.

Hugging Face published a guide and open-source example showing how to run its Transformers.js tool, software that runs AI models directly in a web browser, inside a Chrome browser extension. The example extension uses the Gemma 4 E2B model as a local chat assistant that can read web pages, manage tabs, and search browsing history without sending data to any server. It matters for developers building browser-based AI helpers and for users who want AI features that process data entirely on their own computer.

Hugging Face released a working reference architecture and open-source code for shipping local AI in Chrome extensions under Manifest V3, using Gemma 4 E2B plus a MiniLM embedding model. The pattern, background service worker hosting models, side panel chat UI, content script for page access, lets teams offer privacy-friendly AI features without inference servers or per-token API spend. The trade-off is managing model downloads, MV3 service-worker restarts, and broad host permissions that raise store-review risk.

The guide recreates Hugging Face's Gemma 4 Browser Assistant: a background service worker hosts Transformers.js pipelines, text-generation with onnx-community/gemma-4-E2B-it-ONNX (q4f16) using DynamicCache KV caching, and feature-extraction with all-MiniLM-L6-v2 (fp32) for semantic search over history and page content. Typed message contracts link side panel and content script; tool calls are parsed from Gemma-4 chat-template tokens via extractToolCalls. State is split across background memory, chrome.storage.local, and IndexedDB; artifacts cache under the extension origin. MV3 service-worker suspension requires re-initializable model state.

Huggingface Blog →

Load Llama-3.2 WebGPU in your browser from a local folder

Running LLMs fully locally in the browser is now practical, and the demo shows agentic coding tools can build working custom tools from a few prompts.

Simon Willison modified an existing browser-based chat demo so it can run the Llama 3.2 model (a small open-source AI model) directly from a folder on your own computer, using WebGPU, a browser technology that lets programs use your graphics chip for AI. Normally the demo downloads the model, about 1.2GB, over the internet each time. Instead you browse to a local folder and it loads instantly, with nothing sent anywhere. He built it mostly by giving instructions to OpenAI's Codex coding assistant.

Willison used OpenAI's Codex CLI with GPT-5 to add local-file loading to a Llama 3.2 browser demo in four prompts, costing roughly 54 cents of tokens or falling within his $20/month ChatGPT Plus plan. The result runs a 1.2GB on-device model in Chrome or Firefox Nightly with no network download. For teams, this is a cheap proof that agentic coding tools can implement niche features without engineers.

The demo uses Transformers.js with WebGPU to run Llama-3.2-1B-Instruct-q4f16 ONNX quantized weights, loaded via the File System Access API from a local folder instead of network fetch. Codex CLI (GPT-5) made the change in four prompts, inspecting Transformers.js source, consuming 169,818 input, 17,112 output and 1,176,320 cached tokens (~$0.54 at list prices). Inference runs at roughly 10 tokens/second in Chrome or Firefox Nightly.

Simon Willison’s Weblog →

Introducing EmbeddingGemma

Google ships a 308M-parameter open-weights embedding model runnable on-device, giving engineers a free local alternative to API-based embeddings for retrieval and semantic search.

Google has released EmbeddingGemma, a small free-to-download program that converts text into 'embeddings', which are number lists a computer uses to compare how similar two pieces of writing are. It is tiny, 308 million parameters, small enough to run on less than 200MB of memory once compressed. That means it can run directly on ordinary devices, even in a web browser. Developers building search or recommendation features are the main audience.

Google's EmbeddingGemma is an open-weights, 308M-parameter embedding model under the Gemma license, capable of running on under 200MB of RAM with quantization. For teams, it enables on-device or self-hosted semantic search without per-query API costs, though embedding model quality versus hosted alternatives will decide adoption. Distribution through Ollama, llama.cpp, sentence-transformers and others lowers integration friction; no benchmark figures are given.

Google released EmbeddingGemma, a 308M-parameter embedding model built on the Gemma 3 architecture, trained on 100+ languages and released under the Gemma license. With quantization it runs in under 200MB of RAM, enabling fully client-side inference, demonstrated by a Transformers.js browser demo, Semantic Galaxy, which loads a ~400MB model and visualizes sentence similarity in 2D. Weights are available via sentence-transformers, llama.cpp, MLX, Ollama and LM Studio. The article includes no benchmark scores.

Simon Willison’s Weblog →

Introducing Gemma 3 270M: The compact model for hyper-efficient AI

Google has released a tiny new AI model called Gemma 3 270M. It's not for general chat like bigger AIs, but it's great for making specialized AI tools that are very efficient, fast, and cheap to run. Think of it as a small, specialized tool instead of a large, general-purpose one.

Google's new Gemma 3 270M is a compact AI model designed for hyper-efficient, specialized applications. Business leaders can leverage this model for cost-effective, high-accuracy task-specific solutions through fine-tuning, enabling lean and fast production systems. This "right tool for the job" philosophy optimizes resource utilization for targeted AI deployments.

Gemma 3 270M is a 270-million parameter model optimized for task-specific fine-tuning, demonstrating strong instruction-following and text structuring capabilities. Its small footprint (241MB GGUF) allows for efficient deployment and operation, particularly for specialized tasks like text classification and data extraction, and can run in environments like browsers via transformers.js.

Simon Willison’s Weblog →

Qwen3 Embedding

Free Apache 2.0 embedding models that top the MTEB leaderboard give engineers a self-hostable alternative to paid embedding APIs.

Qwen, a Chinese AI lab, has released new models called Qwen3 Embedding that turn text into number lists ('embeddings') computers can compare for search and grouping. They come in three sizes, 0.6B, 4B and 8B parameters, plus matching reranking models. They are the highest-scoring open-weight models on the MTEB leaderboard and use the permissive Apache 2.0 license. Developers building search or recommendation tools can download and run them for free.

Qwen released the Qwen3 Embedding family under Apache 2.0, and the models now hold the top open-weight spots on the MTEB leaderboard, trailing only Google's gemini-embedding-001. For teams paying per-token for commercial embedding APIs, this offers a free, self-hosted replacement with a small 639MB option for modest hardware. The main cost is operational: hosting and updating models yourself instead of relying on a vendor.

Qwen3 Embedding ships in 0.6B, 4B and 8B parameter sizes, each with a text embedding and a text reranking variant, all Apache 2.0. The 0.6B model produces 1024-dimensional vectors and is available as a 639MB Q8 GGUF; the 8B model outputs 4096 dimensions. Qwen3-Embedding-8B ranks second on MTEB behind gemini-embedding-001, with 99% zero-shot performance. Willison verified the 0.6B output via his llm-sentence-transformers plugin, and a Transformers.js/WebGPU port enables in-browser use at 560MB download.

Simon Willison’s Weblog →