| { |
| "architecture": { |
| "attention_variant": "GQA", |
| "family": "image_text_to_text", |
| "is_moe": false, |
| "positional": "rope", |
| "sliding_window": 512, |
| "tie_word_embeddings": true, |
| "view": "multimodal" |
| }, |
| "capabilities": { |
| "attention_backends": [ |
| "eager" |
| ], |
| "attention_patterns": [ |
| "sliding", |
| "bidirectional" |
| ], |
| "attention_schedule": [ |
| "sliding_attention", |
| "sliding_attention", |
| "sliding_attention", |
| "sliding_attention", |
| "full_attention", |
| "sliding_attention", |
| "sliding_attention", |
| "sliding_attention", |
| "sliding_attention", |
| "full_attention", |
| "sliding_attention", |
| "sliding_attention", |
| "sliding_attention", |
| "sliding_attention", |
| "full_attention", |
| "sliding_attention", |
| "sliding_attention", |
| "sliding_attention", |
| "sliding_attention", |
| "full_attention", |
| "sliding_attention", |
| "sliding_attention", |
| "sliding_attention", |
| "sliding_attention", |
| "full_attention", |
| "sliding_attention", |
| "sliding_attention", |
| "sliding_attention", |
| "sliding_attention", |
| "full_attention", |
| "sliding_attention", |
| "sliding_attention", |
| "sliding_attention", |
| "sliding_attention", |
| "full_attention" |
| ], |
| "task_heads": [ |
| "causal_lm", |
| "image_text_to_text", |
| "multimodal_lm" |
| ], |
| "tensor_parallel": true |
| }, |
| "components": [], |
| "config": { |
| "class_name": "Gemma3nConfig", |
| "model_type": "gemma3n", |
| "module": "transformers.models.gemma3n.configuration_gemma3n", |
| "referenced_fields": {}, |
| "salient_fields": { |
| "is_encoder_decoder": false, |
| "tie_word_embeddings": true |
| } |
| }, |
| "edges": [], |
| "extends": "gemma3", |
| "model_type": "gemma3n", |
| "patches": [ |
| { |
| "added": { |
| "attrs": [ |
| "activation_sparsity_pattern", |
| "altup_active_idx", |
| "altup_coef_clip", |
| "altup_correct_scale", |
| "altup_num_inputs", |
| "attn_logit_softcapping", |
| "base_model_tp_plan", |
| "default_theta", |
| "final_logit_softcapping", |
| "hidden_size", |
| "hidden_size_per_layer_input", |
| "intermediate_size", |
| "laurel_rank", |
| "layer_types", |
| "max_position_embeddings", |
| "model_type", |
| "num_hidden_layers", |
| "num_key_value_heads", |
| "num_kv_shared_layers", |
| "query_pre_attn_scalar", |
| "sliding_window", |
| "use_bidirectional_attention", |
| "vocab_size", |
| "vocab_size_per_layer_input" |
| ], |
| "methods": [ |
| "__post_init__", |
| "convert_rope_params_to_dict" |
| ] |
| }, |
| "component_kind": "config", |
| "parent_class": "Gemma3TextConfig", |
| "relation": "new", |
| "target_class": "Gemma3nTextConfig" |
| }, |
| { |
| "added": { |
| "attrs": [ |
| "conf_attention_chunk_size", |
| "conf_attention_context_left", |
| "conf_attention_context_right", |
| "conf_attention_logit_cap", |
| "conf_conv_kernel_size", |
| "conf_num_attention_heads", |
| "conf_num_hidden_layers", |
| "conf_reduction_factor", |
| "conf_residual_weight", |
| "gradient_clipping", |
| "hidden_size", |
| "input_feat_size", |
| "model_type", |
| "rms_norm_eps", |
| "sscp_conv_channel_size", |
| "sscp_conv_group_norm_eps", |
| "sscp_conv_kernel_size", |
| "sscp_conv_stride_size", |
| "vocab_offset", |
| "vocab_size" |
| ] |
| }, |
| "component_kind": "config", |
| "parent_class": "PreTrainedConfig", |
| "relation": "new", |
| "target_class": "Gemma3nAudioConfig" |
| }, |
| { |
| "added": { |
| "attrs": [ |
| "architecture", |
| "do_pooling", |
| "hidden_size", |
| "initializer_range", |
| "model_args", |
| "model_type", |
| "rms_norm_eps", |
| "vocab_offset", |
| "vocab_size" |
| ] |
| }, |
| "component_kind": "config", |
| "parent_class": "TimmWrapperConfig", |
| "relation": "new", |
| "target_class": "Gemma3nVisionConfig" |
| }, |
| { |
| "added": { |
| "attrs": [ |
| "audio_config", |
| "audio_soft_tokens_per_image", |
| "audio_token_id", |
| "boa_token_id", |
| "boi_token_id", |
| "eoa_token_id", |
| "eoi_token_id", |
| "image_token_id", |
| "initializer_range", |
| "model_type", |
| "sub_configs", |
| "text_config", |
| "tie_word_embeddings", |
| "vision_config", |
| "vision_soft_tokens_per_image" |
| ], |
| "methods": [ |
| "__post_init__" |
| ] |
| }, |
| "component_kind": "config", |
| "parent_class": "PreTrainedConfig", |
| "relation": "new", |
| "target_class": "Gemma3nConfig" |
| }, |
| { |
| "added": { |
| "attrs": [ |
| "audio_mel_mask" |
| ] |
| }, |
| "component_kind": null, |
| "parent_class": "BaseModelOutputWithPooling", |
| "relation": "new", |
| "target_class": "Gemma3nAudioEncoderModelOutput" |
| }, |
| { |
| "added": { |
| "attrs": [ |
| "audio_hidden_states" |
| ] |
| }, |
| "component_kind": null, |
| "parent_class": "PaligemmaModelOutputWithPast", |
| "parent_model": "paligemma", |
| "relation": "inherits", |
| "target_class": "Gemma3nModelOutputWithPast" |
| }, |
| { |
| "added": { |
| "attrs": [ |
| "audio_hidden_states" |
| ] |
| }, |
| "component_kind": null, |
| "parent_class": "PaliGemmaCausalLMOutputWithPast", |
| "parent_model": "paligemma", |
| "relation": "inherits", |
| "target_class": "Gemma3nCausalLMOutputWithPast" |
| }, |
| { |
| "added": { |
| "methods": [ |
| "__init__", |
| "_norm", |
| "forward" |
| ] |
| }, |
| "component_kind": "normalization", |
| "parent_class": "Module", |
| "relation": "new", |
| "target_class": "Gemma3nRMSNorm" |
| }, |
| { |
| "added": { |
| "methods": [ |
| "__init__", |
| "_get_timing_signal_1d_pos", |
| "_relative_shift", |
| "forward" |
| ] |
| }, |
| "component_kind": "embedding", |
| "parent_class": "Module", |
| "relation": "new", |
| "target_class": "Gemma3nAudioRelativePositionEmbedding" |
| }, |
| { |
| "added": { |
| "methods": [ |
| "__init__", |
| "_convert_to_block", |
| "_extract_block_context", |
| "_pad_dim1", |
| "create_local_causal_valid_mask", |
| "forward" |
| ] |
| }, |
| "component_kind": "attention", |
| "parent_class": "Module", |
| "relation": "new", |
| "target_class": "Gemma3nAudioAttention" |
| }, |
| { |
| "added": { |
| "methods": [ |
| "__init__", |
| "forward" |
| ] |
| }, |
| "component_kind": "normalization", |
| "parent_class": "Module", |
| "relation": "new", |
| "target_class": "Gemma3nAudioCumulativeGroupNorm" |
| }, |
| { |
| "added": { |
| "methods": [ |
| "__init__", |
| "forward" |
| ] |
| }, |
| "component_kind": "transformer_block", |
| "parent_class": "Module", |
| "relation": "new", |
| "target_class": "Gemma3nAudioSSCPConvBlock" |
| }, |
| { |
| "added": { |
| "methods": [ |
| "__init__", |
| "forward" |
| ] |
| }, |
| "component_kind": null, |
| "parent_class": "Module", |
| "relation": "new", |
| "target_class": "Gemma3nAudioSubSampleConvProjection" |
| }, |
| { |
| "added": { |
| "methods": [ |
| "__init__", |
| "forward" |
| ] |
| }, |
| "component_kind": "attention", |
| "parent_class": "Module", |
| "relation": "new", |
| "target_class": "Gemma3nAudioConformerAttention" |
| }, |
| { |
| "added": { |
| "methods": [ |
| "__init__", |
| "forward" |
| ] |
| }, |
| "component_kind": "feed_forward", |
| "parent_class": "Module", |
| "relation": "new", |
| "target_class": "Gemma3nAudioConformerFeedForward" |
| }, |
| { |
| "added": { |
| "methods": [ |
| "__init__", |
| "forward" |
| ] |
| }, |
| "component_kind": null, |
| "parent_class": "Module", |
| "relation": "new", |
| "target_class": "Gemma3nAudioConformerLightConv1d" |
| }, |
| { |
| "added": { |
| "methods": [ |
| "__init__", |
| "forward" |
| ] |
| }, |
| "component_kind": "transformer_block", |
| "parent_class": "Module", |
| "relation": "new", |
| "target_class": "Gemma3nAudioConformerBlock" |
| }, |
| { |
| "added": { |
| "methods": [ |
| "__init__", |
| "forward" |
| ] |
| }, |
| "component_kind": "transformer_block", |
| "parent_class": "Module", |
| "relation": "new", |
| "target_class": "Gemma3nTextLaurelBlock" |
| }, |
| { |
| "added": { |
| "methods": [ |
| "_gaussian_topk" |
| ] |
| }, |
| "component_kind": "feed_forward", |
| "overridden": { |
| "methods": [ |
| "__init__", |
| "forward" |
| ] |
| }, |
| "parent_class": "Gemma2MLP", |
| "parent_model": "gemma2", |
| "relation": "inherits", |
| "target_class": "Gemma3nTextMLP" |
| }, |
| { |
| "added": { |
| "methods": [ |
| "__init__", |
| "compute_router_modalities", |
| "correct", |
| "forward", |
| "predict", |
| "scale_corrected_output" |
| ] |
| }, |
| "component_kind": null, |
| "parent_class": "Module", |
| "relation": "new", |
| "target_class": "Gemma3nTextAltUp" |
| }, |
| { |
| "added": { |
| "methods": [ |
| "__init__", |
| "forward" |
| ] |
| }, |
| "component_kind": "attention", |
| "parent_class": "Module", |
| "relation": "new", |
| "target_class": "Gemma3nTextAttention" |
| }, |
| { |
| "component_kind": "transformer_block", |
| "overridden": { |
| "methods": [ |
| "__init__", |
| "forward" |
| ] |
| }, |
| "parent_class": "Gemma3DecoderLayer", |
| "relation": "inherits", |
| "target_class": "Gemma3nTextDecoderLayer" |
| }, |
| { |
| "added": { |
| "attrs": [ |
| "input_modalities" |
| ], |
| "methods": [ |
| "_resize_per_layer_embeddings", |
| "get_per_layer_input_embeddings", |
| "resize_token_embeddings", |
| "set_per_layer_input_embeddings" |
| ] |
| }, |
| "component_kind": "model", |
| "overridden": { |
| "attrs": [ |
| "_can_record_outputs", |
| "_no_split_modules", |
| "_skip_keys_device_placement", |
| "config" |
| ], |
| "methods": [ |
| "_init_weights" |
| ] |
| }, |
| "parent_class": "Gemma2PreTrainedModel", |
| "parent_model": "gemma2", |
| "relation": "inherits", |
| "target_class": "Gemma3nPreTrainedModel" |
| }, |
| { |
| "added": { |
| "attrs": [ |
| "config", |
| "input_modalities", |
| "main_input_name" |
| ], |
| "methods": [ |
| "__init__", |
| "forward" |
| ] |
| }, |
| "component_kind": "encoder", |
| "parent_class": "Gemma3nPreTrainedModel", |
| "relation": "new", |
| "target_class": "Gemma3nAudioEncoder" |
| }, |
| { |
| "added": { |
| "methods": [ |
| "get_per_layer_inputs", |
| "project_per_layer_inputs" |
| ] |
| }, |
| "component_kind": "model", |
| "overridden": { |
| "attrs": [ |
| "config" |
| ], |
| "methods": [ |
| "__init__", |
| "forward" |
| ] |
| }, |
| "parent_class": "Gemma3TextModel", |
| "relation": "inherits", |
| "target_class": "Gemma3nTextModel" |
| }, |
| { |
| "added": { |
| "methods": [ |
| "__init__", |
| "forward" |
| ] |
| }, |
| "component_kind": null, |
| "parent_class": "Module", |
| "relation": "new", |
| "target_class": "Gemma3nMultimodalEmbedder" |
| }, |
| { |
| "added": { |
| "methods": [ |
| "get_audio_features", |
| "get_per_layer_input_embeddings", |
| "set_per_layer_input_embeddings" |
| ] |
| }, |
| "component_kind": "model", |
| "overridden": { |
| "methods": [ |
| "__init__", |
| "forward", |
| "get_image_features", |
| "get_placeholder_mask" |
| ] |
| }, |
| "parent_class": "PaliGemmaModel", |
| "parent_model": "paligemma", |
| "relation": "inherits", |
| "target_class": "Gemma3nModel" |
| }, |
| { |
| "added": { |
| "attrs": [ |
| "accepts_loss_kwargs" |
| ], |
| "methods": [ |
| "get_per_layer_input_embeddings", |
| "set_per_layer_input_embeddings" |
| ] |
| }, |
| "component_kind": "lm_head", |
| "deleted": { |
| "methods": [ |
| "create_masks_for_generate" |
| ] |
| }, |
| "overridden": { |
| "methods": [ |
| "forward", |
| "prepare_inputs_for_generation" |
| ] |
| }, |
| "parent_class": "PaliGemmaForConditionalGeneration", |
| "parent_model": "paligemma", |
| "relation": "inherits", |
| "target_class": "Gemma3nForConditionalGeneration" |
| } |
| ], |
| "provenance": { |
| "config_class": "Gemma3nConfig", |
| "config_module": "transformers.models.gemma3n.configuration_gemma3n", |
| "model_class": null, |
| "model_module": null |
| }, |
| "repeats": [], |
| "schema_version": "architecture-template-v0", |
| "status": "config_only", |
| "templates": [], |
| "warnings": [ |
| "meta build failed (ImportError): \nTimmWrapperModel requires the PIL library but it was not found in your environment. You can install it with pip:\n`pip install pillow`. Please note that you may need to restart your runtime after inst" |
| ] |
| } |
|
|