{"schema_version":"1.2.0","id":"Salesforce/codegen2-16B_P","snapshot":{"generated":"2026-11-27T14:50:55Z","digest":"3e3b3951a5cae62c","snapshot_id":11754},"family":{"key":null,"representative":"Salesforce/codegen2-16B_P","members":1,"relation":"original"},"architecture":{"value":{"arch":"CodeGenForCausalLM","model_type":"codegen","layers":34,"hidden":6144,"heads":24,"kv_heads":24,"head_dim":256,"vocab":51200,"act":"gelu_new","tied_embeddings":false,"dtype":"float32","attn":"MHA","gqa_ratio":1.0,"shared_experts":0,"is_moe":false,"layer_types":[{"i":0,"attn_kind":"a","mlp_kind":"d","attn":"MHA","heads":24,"kv_heads":24,"head_dim":256,"ffn_gate":"geglu","ffn_gate_source":"hidden_act: gelu_new","kv_per_token":24576}],"layer_schedule":"0000000000000000000000000000000000","layer_note":""},"graph":{"schema":"osynk-arch/1","root":"model","defs":{"block.0":{"kind":"block","label":"transformer block","nodes":[{"id":"in","kind":"io","label":"in","lines":["residual stream"]},{"id":"norm1","kind":"norm","label":"norm","lines":["type not stated"],"withheld":"no norm key in the config, so the type cannot be told"},{"id":"attention","kind":"use","label":"full attention","lines":["24 query -> 24 KV heads"],"facts":{"attn_kind":"a","attn":"MHA","heads":24,"kv_heads":24},"ref":"attention.0","source":"layer_types[0].attn/kv_lora_rank/heads/kv_heads/window"},{"id":"add1","kind":"add","label":"+","lines":["residual"]},{"id":"norm2","kind":"norm","label":"norm","lines":["same as above"]},{"id":"mlp","kind":"use","label":"dense MLP","lines":["width not stated","gelu_new"],"facts":{"mlp_kind":"d"},"ref":"mlp.0","source":"layer_types[0].mlp_kind/experts/experts_per_tok/ffn_dense"},{"id":"add2","kind":"add","label":"+","lines":["residual"]},{"id":"out","kind":"io","label":"out","lines":["to the next layer"]}],"edges":[["in","norm1"],["norm1","attention"],["attention","add1"],["add1","norm2"],["norm2","mlp"],["mlp","add2"],["add2","out"],["in","add1"],["add1","add2"]],"omissions":[]},"attention.0":{"kind":"attention","label":"MHA","nodes":[{"id":"qkv","kind":"qkv","label":"QKV projection","lines":["24 query heads x 256"],"facts":{"heads":24,"kv_heads":24,"head_dim":256},"source":"layer_types[0].heads/kv_heads/head_dim/qkv_bias"},{"id":"attention","kind":"attention","label":"full attention","lines":["every head has its own K/V","24.0 KB per token"],"facts":{"attn":"MHA","kv_per_token":24576},"source":"layer_types[0].attn/kv_lora_rank/window/kv_per_token"},{"id":"proj","kind":"proj","label":"output projection","lines":["back to hidden"]}],"edges":[["qkv","attention"],["attention","proj"]]},"mlp.0":{"kind":"mlp","label":"dense MLP","nodes":[{"id":"ffn","kind":"ffn","label":"dense FFN","lines":["width not stated","gelu_new"],"facts":{"ffn_gate":"geglu","act":"gelu_new"},"source":"layer_types[].ffn_gate (hidden_act: gelu_new)","derived":"hidden_act: gelu_new","withheld":"the config states one FFN width and this model uses it for the experts, so the dense width is unknown"}],"edges":[]}},"model":{"kind":"model","label":"CodeGenForCausalLM","nodes":[{"id":"text","kind":"text","label":"tokenized text","lines":["up to 2k tokens"],"facts":{"ctx":2048},"source":"spec.ctx"},{"id":"embedding","kind":"embedding","label":"token embedding","lines":["51,200 x 6144"],"facts":{"vocab":51200,"hidden":6144,"tied_embeddings":false},"source":"spec.vocab/hidden/tied_embeddings"},{"id":"block.0","kind":"use","label":"transformer block","lines":["full attention","dense MLP"],"facts":{"attn_kind":"a","mlp_kind":"d"},"ref":"block.0","count":34,"source":"layer_types[0]"},{"id":"norm","kind":"norm","label":"final norm","lines":["hidden 6144"],"facts":{"hidden":6144},"source":"spec.hidden"},{"id":"head","kind":"head","label":"linear output layer","lines":["6144 x 51,200"],"facts":{"vocab":51200,"hidden":6144},"source":"spec.vocab/hidden"}],"facts":{"params_total":16000000000,"params_active":16000000000,"kv_bytes_per_token":835584,"vocab":51200,"hidden":6144,"ctx":2048},"edges":[["text","embedding"],["embedding","block.0"],["block.0","norm"],["norm","head"]]},"omissions":[]},"provenance":{"class":"derived","source":"config.json","method":"spec-v1"}},"lineage":{"org":"Salesforce","tier":"B","foundational":true,"excluded_because":null,"family":"codegen p","generation":"2","size":"16B","role":null,"line":null,"ladder":["1.2507","2","2.5"],"position":2,"rungs":3,"first_of_line":false,"new_rung":true},"params":{"total":16000000000,"active":16000000000,"active_ratio":1.0,"params_per_expert":null,"mtp_excluded":null,"provenance":{"class":"claim","method":"dense-identity-v1","total_from":"name-hint-v1","from_base":null},"withheld":null},"inference":{"kv_bytes_per_token":835584,"attn_layers":34,"gb_fp16":32.0,"gb_q4":8.8,"gb_active_fp16":32.0,"ctx":2048},"quants":null,"evidence":null,"claims":[],"diagrams":{"structure":"/diagrams/Salesforce--codegen2-16B_P-structure.svg"},"history":{"points":2,"first":"2026-09-16T15:22:25Z","last":"2026-09-21T09:42:55Z"},"links":{"hf":"https://huggingface.co/Salesforce/codegen2-16B_P","papers":["https://arxiv.org/abs/2305.02309"],"license":"apache-2.0"},"counters":{"downloads":49213,"likes":45,"created":"2023-04-26","modified":"2025-01-31"},"flags":{"variant":false,"gated":false,"closed_weights":false}}