Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Hugging Face 9 min read Announcement mediumAdept

Gemma 3n fully available in the open-source ecosystem!

Gemma 3n, Google's natively multimodal on-device model accepting text, image, audio and video, now runs in transformers, timm, MLX, llama.cpp (text only), Transformers.js/ONNX and Ollama. The E2B and E4B variants have 5B and 8B real parameters but need only about 2GB and 3GB of GPU memory. Per-Layer Embeddings offload embeddings to the CPU, and a nested MatFormer design trains E2B as a sub-model of E4B so layers can be mixed and matched to a memory budget. Vision uses a new MobileNet-V5-300 encoder, audio uses a USM-based encoder over 160ms chunks, and code snippets plus free Colab notebooks cover inference and fine-tuning.

Assumes: Hugging Face transformersPyTorch basics

Related posts

  • Welcome Gemma 4: Frontier multimodal intelligence on device

    Hugging Face mediumAdept

    Google DeepMind's Gemma 4 is an Apache 2-licensed multimodal model family in five sizes: E2B, E4B, a 12B encoder-free Unified model, a 31B dense model and a 26B MoE with 4B active parameters. The models take text, image, video and in some sizes audio, with context windows up to 256K. The architecture combines alternating sliding-window and global attention, dual RoPE configurations, Per-Layer Embeddings that feed a small per-layer residual signal, and a shared KV cache in which the final layers reuse earlier layers' key/value tensors to save memory and compute. Practical guidance covers modality ordering in prompts (images before text, audio after), native JSON bounding-box output on a 1000x1000 grid, and running or fine-tuning the models with transformers, llama.cpp, MLX, transformers.js, Mistral.rs and TRL.

  • Welcome Gemma 3: Google's all new multimodal, multilingual, long context open LLM

    Hugging Face mediumAdept

    Gemma 3 is Google's open-weight model family in 1B, 4B, 12B and 27B sizes, with 128k context (32k for 1B), image input via a SigLIP encoder on the 4B and larger models, and support for 140+ languages. Long context comes from pretraining at 32k and then scaling to 128k with RoPE base frequency raised to 1M. KV cache size is cut by interleaving 5 local sliding-window layers (window 1024) per global layer. Images get bidirectional attention and "pan and scan" cropping, and a 262K-entry SentencePiece tokenizer improves CJK encoding. The 27B IT model scores 1339 Elo on Chatbot Arena, and the post includes inference code for transformers, MLX, llama.cpp and HF Endpoints.

  • Welcome Gemma - Google’s new open LLM

    Hugging Face mediumAdept

    Google's Gemma open LLM family ships in 2B and 7B sizes, each with base and instruction-tuned variants and an 8K context. On the Open LLM Leaderboard Gemma 7B scores 63.75, comparable to Mistral 7B, while Gemma 2B trails Phi-2. Hugging Face supports it through Transformers 4.38, including bfloat16 inference in about 18 GB, 4-bit loading in about 9 GB, and a ~4x speedup with torch.compile. Other integrations include JAX/Flax weights, Vertex AI/GKE and Inference Endpoints deployment via Text Generation Inference with an OpenAI-compatible Messages API, and a QLoRA fine-tuning recipe with TRL that takes about 9 hours on one A10G.

  • Build specialized multimodal models with LFM3

    Hugging Face hardMaster

    LFM3 is Liquid AI's new family of ~2B-parameter models: text, vision, audio, omni and decision variants, all built on one shared LFM3-1.7B-Base backbone and designed for single-GPU fine-tuning and on-device deployment. The backbone is a 24-layer tri-hybrid found by hardware-in-the-loop architecture search. It mixes 13 gated short convolutions (kernel size 7), 5 sliding-window attention layers and 6 global attention layers, and adds head-wise sigmoid-gated attention, partial RoPE and sandwich norm. Pre-training covered 22T tokens, with a 3.5T-token agentic mid-training stage that extends context to 256K. Reported results include LFM3-1.7B beating LFM2.5-2.6B with 35% fewer parameters and running about 25% faster at 8K context. New in-house vision and audio encoders cut compute (2.2x fewer FLOPs than Qwen3.5-2B's encoder), and the LiquidCodec speech tokenizer decodes about 87x real time on one CPU thread; `transformers` usage snippets are included for each model.

  • PaliGemma – Google's Cutting-Edge Open Vision Language Model

    Hugging Face mediumAdept

    PaliGemma is Google's open vision-language model family that pairs a SigLIP-So400m image encoder with a Gemma-2B text decoder through a linear projector. It ships as pretrained, mix and task-specific fine-tuned checkpoints at 224, 448 and 896 resolutions. Behaviour is steered with task prefixes such as "detect" and "segment", and detections come back as <loc> tokens normalized to 1024. Images become 256 to 4096 prefix tokens with full attention over the image and prompt, so higher resolutions cost much more memory while helping mainly fine-grained tasks like OCR. The post includes transformers code for inference, 4-bit loading, and fine-tuning the decoder with full training or QLoRA, plus big_vision transfer configs.

The quest for software engineering knowledge.

Look:
Layout: