Skip to content

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

Hugging Face 36 min read Release mediumAdept

Welcome Gemma 4: Frontier multimodal intelligence on device

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.

Assumes: transformer architecture basicsHugging Face transformers

Related posts

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

    Hugging Face mediumAdept

    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.

  • 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.

  • 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.

  • Meta is back with Muse Glimmer: local, agentic, multimodal, and open source

    Hugging Face mediumAdept

    Muse Glimmer is Meta's new open-source (Apache 2.0) 30B dense multimodal model, distilled from Muse and built for local agentic use cases such as coding, document analysis and personal assistants. It pairs a 2B Perception Encoder vision tower with a 28B text decoder. The decoder repeats a (SWA, SWA, SWA, Full) attention pattern across 52 layers, using RoPE on the sliding-window layers and NoPE on the full-attention layers. It also uses gated GQA with 16 query heads per KV head and QK-norm with extra query scaling. Images are reduced 4x via pixel shuffle, and video is sampled at 2 fps up to 96 frames. Day-0 support covers transformers, llama.cpp, vLLM and a DFlash block-diffusion speculative decoding drafter, with code for text, image, video, tool-calling and object-detection inference.

  • 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.

The quest for software engineering knowledge.

Look:
Layout: