EADST

gemma-3n-E4B-it配置文件config.json解析

{
  "architectures": ["Gemma3nForConditionalGeneration"]  // 模型主架构名称
  "audio_config": {  // 音频模型配置开始
    "conf_attention_chunk_size": 12,  // 注意力块大小
    "conf_attention_context_left": 13,  // 注意力左上下文窗口
    "conf_attention_context_right": 0,  // 注意力右上下文窗口
    "conf_attention_logit_cap": 50.0,  // logits 截断上限
    "conf_conv_kernel_size": 5,  // 卷积核大小
    "conf_num_attention_heads": 8,  // 注意力头数量
    "conf_num_hidden_layers": 12,  // transformer 层数
    "conf_positional_bias_size": 256,  // 位置偏置大小
    "conf_reduction_factor": 4,  // 降采样因子
    "conf_residual_weight": 0.5,  // 残差连接权重
    "gradient_clipping": 10000000000.0,  // 梯度裁剪值
    "hidden_size": 1536,  // 隐藏层维度
    "input_feat_size": 128,  // 输入特征维度
    "model_type": "gemma3n_audio",  // 音频模型类型
    "rms_norm_eps": 1e-06,  // RMSNorm 的 epsilon
    "sscp_conv_channel_size": [128, 32],  // 卷积层通道数量
    "sscp_conv_eps": 0.001,  // 卷积层 epsilon
    "sscp_conv_kernel_size": [[3, 3], [3, 3]],  // 每层卷积核大小
    "sscp_conv_stride_size": [[2, 2], [2, 2]],  // 每层卷积步幅
    "torch_dtype": "bfloat16",  // 数据类型为 bfloat16
    "vocab_offset": 262272,  // 词表偏移
    "vocab_size": 128  // 音频词表大小
  },
  "audio_soft_tokens_per_image": 188,  // 每段音频的软 token 数
  "audio_token_id": 262273,  // 音频 token 的 ID
  "boa_token_id": 256000,  // 音频开始 token ID
  "boi_token_id": 255999,  // 图像开始 token ID
  "eoa_token_id": 262272,  // 音频结束 token ID
  "eoi_token_id": 262144,  // 图像结束 token ID
  "eos_token_id": [1, 106],  // 文本结束 token ID
  "image_token_id": 262145,  // 图像 token ID
  "initializer_range": 0.02,  // 参数初始化范围
  "model_type": "gemma3n",  // 总体模型类型
  "text_config": {  // 文本模型配置开始
    "activation_sparsity_pattern": [...],  // 激活稀疏性配置
    "altup_active_idx": 0,  // ALTUP 激活索引
    "altup_coef_clip": 120.0,  // ALTUP 系数裁剪
    "altup_correct_scale": true,  // 是否修正缩放
    "altup_lr_multiplier": 1.0,  // ALTUP 学习率因子
    "altup_num_inputs": 4,  // ALTUP 输入数
    "attention_bias": false,  // 是否使用注意力 bias
    "attention_dropout": 0.0,  // 注意力 dropout
    "final_logit_softcapping": 30.0,  // logits 最终上限
    "head_dim": 256,  // 每个注意力头的维度
    "hidden_activation": "gelu_pytorch_tanh",  // 激活函数类型
    "hidden_size": 2048,  // 隐藏层维度
    "hidden_size_per_layer_input": 256,  // 每层输入维度
    "initializer_range": 0.02,  // 初始化范围
    "intermediate_size": 16384,  // FeedForward 中间层大小
    "laurel_rank": 64,  // Laurel 模块秩值
    "layer_types": [...],  // 每层使用的注意力类型
    "max_position_embeddings": 32768,  // 最大位置编码长度
    "model_type": "gemma3n_text",  // 文本模型类型
    "num_attention_heads": 8,  // 注意力头数
    "num_hidden_layers": 35,  // 文本模型层数
    "num_key_value_heads": 2,  // KV 头数量
    "num_kv_shared_layers": 15,  // 共享 KV 的层数
    "query_pre_attn_scalar": 256,  // 注意力前缩放因子
    "rms_norm_eps": 1e-06,  // RMSNorm 的 epsilon
    "rope_local_base_freq": 10000.0,  // RoPE 的局部基频
    "rope_scaling": null,  // RoPE 缩放参数
    "rope_theta": 1000000.0,  // RoPE 的 theta 参数
    "sliding_window": 512,  // 滑动窗口大小
    "torch_dtype": "bfloat16",  // 数据类型为 bfloat16
    "use_cache": true,  // 启用缓存
    "vocab_size": 262400,  // 总词表大小
    "vocab_size_per_layer_input": 262144  // 每层词表输入大小
  },
  "vision_config": {  // 图像模型配置开始
    "architecture": "mobilenetv5_300m_enc",  // 使用的视觉骨干网络
    "do_pooling": true,  // 是否进行池化
    "hidden_size": 2048,  // 隐藏层大小
    "initializer_range": 0.02,  // 初始化范围
    "label_names": ["LABEL_0", "LABEL_1"],  // 类别标签名
    "model_type": "gemma3n_vision",  // 视觉模型类型
    "num_classes": 2,  // 分类数
    "rms_norm_eps": 1e-06,  // RMSNorm 的 epsilon
    "torch_dtype": "bfloat16",  // 数据类型为 bfloat16
    "vocab_offset": 262144,  // 图像 token 偏移
    "vocab_size": 128  // 图像词表大小
  },
  "vision_soft_tokens_per_image": 256  // 每张图的软 token 数
}
相关标签
About Me
XD
Goals determine what you are going to be.
Category
标签云
Animate 继承 Qwen2 Hungarian Docker Review Llama EXCEL 关于博主 Land 多线程 图形思考法 Transformers Paddle UNIX Plate mmap SQLite Food Magnet Agent Password Anaconda CTC tqdm Permission 音频 阿里云 FP8 Quantization Data Input ONNX Michelin GPTQ YOLO Diagram 搞笑 Bin Plotly Bipartite ResNet-50 TTS GGML NameSilo VPN FP32 Heatmap Tiktoken SVR Gemma Math 报税 InvalidArgumentError Hotel 版权 printf Distillation OpenCV Excel Website OCR WAN Safetensors tar Base64 Card CSV Video Tracking git Baidu ChatGPT CC Clash v2ray Miniforge GIT RAR Windows JSON Tensor 净利润 API Jetson VSCode Use Paper Algorithm Interview Template Python Cloudreve 递归学习法 Django Image2Text VGG-16 CEIR NLP Augmentation PyTorch 多进程 证件照 CV Github TensorRT Pytorch 第一性原理 diffusers ModelScope Datetime Sklearn Vmess Zip BF16 CUDA 腾讯云 LoRA Bitcoin uWSGI Vim Claude git-lfs Shortcut PyCharm WebCrawler COCO 域名 v0.dev Jupyter GoogLeNet Attention IndexTTS2 Ptyhon 飞书 XML HaggingFace UI 公式 llama.cpp XGBoost MD5 Crawler 财报 TSV Git transformers BTC RGB hf scipy PDF Pillow SQL Google GPT4 Firewall TensorFlow Domain C++ PDB FP64 Qwen2.5 Ubuntu Streamlit CAM Translation Pickle Logo Hilton Disk Random LLAMA 算法题 Qwen Statistics torchinfo FlashAttention Numpy Markdown uwsgi Proxy AI logger Conda Linux Color Quantize Freesound 签证 Web OpenAI FastAPI Mixtral SAM DeepSeek Pandas FP16 LLM DeepStream SPIE Nginx LeetCode Knowledge PIP HuggingFace BeautifulSoup Breakpoint Bert QWEN CLAP NLTK LaTeX Dataset
站点统计

本站现有博文316篇,共被浏览746810

本站已经建立2394天!

热门文章
文章归档
回到顶部