Gemma 4 Β· Transformers.js v4.0.1 β€” Teaching Demo

This page runs a large language model entirely in your browser. Uses Gemma 4 E2B-IT (ONNX) via Transformers.js v4 and the CDN versions are at @huggingface/transformers


βš™ Generation Settings






πŸ“– What is a token?

A token is ~ΒΎ of a word. Gemma 4 E2B context: 128,000 tokens.

Step 1 β€” Adjust generation settings above if desired.
Step 2 β€” Choose model & device below, then click Load Model.
First download is ~900 MB (q4). After that it is cached and reloads in seconds.

For a larger model try 'E4B', needs a powerful computer





By Jeremy Ellis Github Profile Β· LinkedIn jeremy-ellis-4237a9bb Β· This Github my-examples-of-gemma4
Use at your own risk