inspector / ir /artifacts /convnextv2.json
lysandre's picture
lysandre HF Staff
Deploy architecture inspector
32d8c58 verified
Raw
History Blame Contribute Delete
5.84 kB
{
"architecture": {
"family": "image_classification",
"is_moe": false,
"view": "encoder"
},
"capabilities": {
"task_heads": [
"backbone",
"image",
"image_classification"
],
"tensor_parallel": false
},
"components": [
{
"children": [
"embeddings",
"encoder",
"layernorm"
],
"class_name": "ConvNextV2Model",
"id": "model",
"kind": "model",
"path_pattern": "model"
},
{
"attributes": {},
"children": [
"embeddings.patch_embeddings",
"embeddings.layernorm"
],
"class_name": "ConvNextV2Embeddings",
"id": "embeddings",
"kind": "embedding",
"path_pattern": "model.embeddings"
},
{
"class_name": "Conv2d",
"id": "embeddings.patch_embeddings",
"kind": "convolution",
"path_pattern": "model.embeddings.patch_embeddings"
},
{
"attributes": {
"norm_type": "layer"
},
"class_name": "ConvNextV2LayerNorm",
"id": "embeddings.layernorm",
"kind": "normalization",
"path_pattern": "model.embeddings.layernorm"
},
{
"children": [
"encoder_conv_next_v2_stages"
],
"class_name": "ConvNextV2Encoder",
"id": "encoder",
"kind": "encoder",
"path_pattern": "model.encoder"
},
{
"attributes": {
"norm_type": "layer"
},
"class_name": "LayerNorm",
"id": "layernorm",
"kind": "normalization",
"path_pattern": "model.layernorm"
}
],
"config": {
"class_name": "ConvNextV2Config",
"model_type": "convnextv2",
"module": "transformers.models.convnextv2.configuration_convnextv2",
"referenced_fields": {
"depths": [
3,
3,
9,
3
]
},
"salient_fields": {
"hidden_act": "gelu",
"is_encoder_decoder": false
}
},
"dataflow": {
"input": {
"name": "pixel_values",
"shape": [
"B",
3,
224,
224
]
},
"output": {
"shape": [
"B",
768,
7,
7
]
},
"shapes": {
"embeddings": {
"in": [
"B",
3,
224,
224
],
"out": [
"B",
96,
56,
56
]
},
"encoder": {
"in": [
"B",
96,
56,
56
],
"out": [
"B",
768,
7,
7
]
},
"layernorm": {
"in": [
"B",
768
],
"out": [
"B",
768
]
}
},
"source": "observed_forward_meta"
},
"edges": [
{
"kind": "data",
"source": "embeddings",
"target": "encoder"
},
{
"kind": "data",
"source": "encoder",
"target": "layernorm"
}
],
"extends": null,
"model_type": "convnextv2",
"provenance": {
"config_class": "ConvNextV2Config",
"config_module": "transformers.models.convnextv2.configuration_convnextv2",
"model_class": "ConvNextV2Model",
"model_module": "transformers.models.convnextv2.modeling_convnextv2"
},
"repeats": [
{
"body": "encoder_conv_next_v2_stage",
"container_path_pattern": "model.encoder.stages",
"count": 4,
"count_expr": "4",
"count_source": "module_tree",
"id": "encoder_conv_next_v2_stages",
"index_symbol": "i",
"item_path_pattern": "model.encoder.stages.{i}",
"kind": "symbolic_repeat",
"provenance": {
"class_name": "ConvNextV2Stage",
"container_path_pattern": "model.encoder.stages",
"item_path_pattern": "model.encoder.stages.{i}",
"source": "module_tree_repeat_collapse"
},
"repeated_class_name": "ConvNextV2Stage"
},
{
"body": "encoder_layer",
"container_path_pattern": "model.encoder.stages.{i}.layers",
"count": 3,
"count_expr": "config.depths[i]",
"count_source": "config",
"id": "encoder_layers",
"index_symbol": "j",
"item_path_pattern": "model.encoder.stages.{i}.layers.{j}",
"kind": "symbolic_repeat",
"provenance": {
"class_name": "ConvNextV2Layer",
"container_path_pattern": "model.encoder.stages.{i}.layers",
"item_path_pattern": "model.encoder.stages.{i}.layers.{j}",
"source": "module_tree_repeat_collapse"
},
"repeated_class_name": "ConvNextV2Layer"
}
],
"schema_version": "architecture-template-v0",
"templates": [
{
"children": [
"encoder_conv_next_v2_stage.downsampling_layer",
"encoder_layers"
],
"class_name": "ConvNextV2Stage",
"id": "encoder_conv_next_v2_stage",
"kind": "module",
"path_pattern": "model.encoder.stages.{i}"
},
{
"class_name": "ModuleList",
"id": "encoder_conv_next_v2_stage.downsampling_layer",
"kind": "repeated_container",
"path_pattern": "model.encoder.stages.{i}.downsampling_layer"
},
{
"children": [
"encoder_layer.dwconv",
"encoder_layer.layernorm"
],
"class_name": "ConvNextV2Layer",
"id": "encoder_layer",
"kind": "convolution",
"path_pattern": "model.encoder.stages.{i}.layers.{j}"
},
{
"class_name": "Conv2d",
"id": "encoder_layer.dwconv",
"kind": "convolution",
"path_pattern": "model.encoder.stages.{i}.layers.{j}.dwconv"
},
{
"attributes": {
"norm_type": "layer"
},
"class_name": "ConvNextV2LayerNorm",
"id": "encoder_layer.layernorm",
"kind": "normalization",
"path_pattern": "model.encoder.stages.{i}.layers.{j}.layernorm"
}
]
}