CoolFace
Modelpublic

KikoCis/Elffuss-Gemma4-E4B-litert

sourceHugging Facegemmaupdated 3mo agoView on Hugging Face
0likes27downloads
Model Card

Elffuss · Gemma-4 E4B — agentic, in the browser (LiteRT-LM)

A `.litertlm` build of Gemma-4 E4B lightly healed to be the local brain of the Elffuss family — in-browser agentic tools where apps don't exist, they're generated. It runs fully client-side on WebGPU via Google's LiteRT-LM runtime (@litert-lm/core), so nothing leaves the user's machine.

The Elffuss family (this model powers all of them)

  • —🧝‍🦅 [Elffuss Claw](https://elffuss-claw.utopiaia.com) — the agentic web OS: chat is the only interface; ask for an app and it's generated as HTML, instantly. With Claude-Code-style skills & plugins.
  • —🧝‍💻 [Elffuss Code](https://elffuss-code.utopiaia.com) — an in-browser IDE (Monaco) with the elf as your coding agent; open a folder and it becomes a VS-Code-like workspace.
  • —🧝 [Elffuss](https://elffuss.utopiaia.com) — where it all started; the original agentic web OS.
Base model © Google — google/gemma-4-e4b-it, under the Gemma license. This is a derivative: a small task-alignment heal + conversion to .litertlm. Weights are otherwise Google's.

What the heal does

Aligned to Elffuss's exact three-mode contract, so a small model reliably does the right thing:

  1. 1.Generate an app → a complete self-contained HTML document (inline CSS/JS, dark theme, <canvas>/WebGL for anything visual). No CDNs, no network — it runs in a sandboxed iframe instantly.
  2. 2.Use a tool → a clean ` `tool block with valid JSON (fs.*, tasks.add, memory.save, web.fetch`, …).
  3. 3.Otherwise → a short, warm reply.

Held-out check (prompts not in training): it generalizes — e.g. "hazme un juego de asteroides" → a novel, self-contained canvas game; "recuérdame en 30 minutos llamar a mamá" → {"tool":"tasks.add","args":{"inMinutes":30,"prompt":"llamar a mamá"}}. It learned the format and style, not the training examples.

Format & size

  • —`model.litertlm` — LiteRT-LM bundle (tokenizer + model + metadata), int4 weights (dynamic_wi4_afp32), ~4 GB. Text-generation task (the base's vision/audio towers are not exported).
  • —Runtime: LiteRT-LM Web (@litert-lm/core, Engine.create) on WebGPU (Chrome/Edge). Recommended hardware: a GPU with ≥24 GB.

Use (browser, LiteRT-LM Web)

js
import { Engine } from 'https://cdn.jsdelivr.net/npm/@litert-lm/core/+esm';
const engine = await Engine.create({
  model: 'https://huggingface.co/KikoCis/Elffuss-Gemma4-E4B-litert/resolve/main/model.litertlm',
  mainExecutorSettings: { maxNumTokens: 4096 },
});
const conv = await engine.createConversation({ preface: { messages: [{ role: 'system', content: ELFFUSS_SYSTEM }] } });
for await (const chunk of conv.sendMessageStreaming('hazme una app de pomodoro')) { /* stream */ }

Honest notes

  • —This IS a retrained model (LoRA fine-tune on the base's language model, merged into the weights), not a repackage. Two separate steps went into it:
  • —The heal (training): LoRA on Elffuss-format agentic data; training loss 3.69 → 0.39 at the chosen checkpoint, validated on held-out prompts (novel apps + correct tool JSON — it generalizes, it doesn't recite).
  • —The conversion: exporting a fine-tuned Gemma-4 to .litertlm required patching a transformers-version incompatibility in the public litert-torch tooling (patch shipped in scripts/litert_patch.py); the produced bundle validates with litert-lm-peek.
  • —Scope-wise it's a format/style alignment, not a capability overhaul — it makes a capable base reliable at Elffuss's job, in-browser.
  • —Base model, its capabilities, and its license are Google's. Respect the Gemma terms.