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
标签云
多进程 Docker CSV Land Sklearn DeepSeek Vim Baidu 搞笑 Password Qwen Datetime Diagram Review Logo Card Algorithm Data v0.dev Bitcoin Zip Use Attention Qwen2 GIT 音频 API PyCharm TTS VSCode BTC Freesound Excel Nginx NLTK hf PIP Quantization Input NLP JSON Pandas BF16 Animate WAN 财报 阿里云 Quantize 顶会 TSV Plotly ONNX Tiktoken Markdown BeautifulSoup GPTQ 继承 Magnet scipy git-lfs Firewall RAR Windows PDB FP64 Heatmap FP16 Michelin UI DeepStream Pytorch Conda LLM 强化学习 Llama CTC Bert mmap EXCEL VGG-16 LeetCode 签证 CV OpenCV PyTorch Linux Disk transformers GGML NameSilo 第一性原理 证件照 AI ChatGPT VPN 版权 HuggingFace SQLite tar Bipartite Ptyhon tqdm LoRA CUDA RGB Mixtral Statistics logger Jupyter Agent Git COCO Hotel diffusers Transformers 净利润 OCR SPIE SVR Paddle Django TensorRT Website GPT4 llama.cpp SQL 算法题 UNIX OpenAI FastAPI Clash News 域名 Breakpoint Qwen2.5 InvalidArgumentError Safetensors 关于博主 Distillation Tensor Interview Shortcut Web CC Dataset Numpy Github Hungarian uwsgi Crawler Google ModelScope git ResNet-50 飞书 图形思考法 Proxy Video Translation SAM PDF Hilton LaTeX FP32 TensorFlow Bin Math Color Gemma Tracking Cloudreve Vmess Jetson CEIR Search FlashAttention Random Python Ubuntu IndexTTS2 Food HaggingFace Permission Paper WebCrawler Pillow uWSGI QWEN C++ 报税 递归学习法 腾讯云 XML 公式 torchinfo FP8 云服务器 Anaconda Augmentation YOLO CLAP Streamlit printf Template Claude v2ray Plate Knowledge 多线程 Miniforge XGBoost Base64 GoogLeNet Image2Text MD5 Domain CAM Pickle LLAMA
站点统计

本站现有博文321篇,共被浏览763870

本站已经建立2439天!

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