Gemma3nModelMetadata
Metadata for Gemma 3n models extracted from GGUF files.
Gemma 3n has several unique characteristics:
Variable intermediate (FFN) sizes per layer (MatFormer architecture)
Hybrid attention pattern (4 local sliding-window + 1 global)
Per-layer embeddings (optional)
KV cache sharing for the last N layers
Constructors
Properties
Functions
Returns the cache layer index for the given layer. Shared layers map to a single cache slot.
Returns the effective attention window size for the given layer. Sliding layers use slidingWindow, global layers use contextLength.
Returns the feed-forward dimension for the given layer.
Returns the layer type at the given layer index. Pattern repeats: "sliding", "sliding", "sliding", "sliding", "full"
Returns the RoPE base frequency for the given layer. Local/sliding layers use ropeBaseLocal (10k), global layers use ropeBaseGlobal (1M).
Returns whether the given layer shares its KV cache with another layer. The last kvSharedLayers layers share their KV cache.