{"schema_version":"1.2.0","id":"bigcode/starcoder2-7b","snapshot":{"generated":"2026-11-27T14:50:55Z","digest":"3e3b3951a5cae62c","snapshot_id":11754},"family":{"key":null,"representative":"bigcode/starcoder2-7b","members":1,"relation":"original"},"architecture":{"value":{"arch":"Starcoder2ForCausalLM","model_type":"starcoder2","layers":32,"hidden":4608,"heads":36,"kv_heads":4,"head_dim":128,"vocab":49152,"act":"gelu_pytorch_tanh","rope_theta":1000000,"dtype":"bfloat16","attn":"GQA","gqa_ratio":9.0,"shared_experts":0,"moe_intermediate":18432,"ffn_dense":18432,"is_moe":false,"layer_types":[{"i":0,"attn_kind":"s","mlp_kind":"d","attn":"GQA","heads":36,"kv_heads":4,"head_dim":128,"window":4096,"ffn_dense":18432,"ffn_gate":"geglu","ffn_gate_source":"hidden_act: gelu_pytorch_tanh","kv_per_token":2048}],"layer_schedule":"00000000000000000000000000000000","layer_note":"sliding window 4096 on every layer"},"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":"sliding attention","lines":["36 query -> 4 KV heads","window 4096"],"facts":{"attn_kind":"s","attn":"GQA","heads":36,"kv_heads":4,"window":4096},"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 18432","gelu_pytorch_tanh"],"facts":{"mlp_kind":"d","ffn_dense":18432},"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":"GQA","nodes":[{"id":"qkv","kind":"qkv","label":"QKV projection","lines":["36 query heads x 128","4 KV heads"],"facts":{"heads":36,"kv_heads":4,"head_dim":128},"source":"layer_types[0].heads/kv_heads/head_dim/qkv_bias"},{"id":"attention","kind":"attention","label":"sliding attention","lines":["9:1 query heads share a KV head","window 4096 tokens - the cache stops there","2.0 KB per token"],"facts":{"attn":"GQA","kv_per_token":2048,"window":4096},"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 18432","gelu_pytorch_tanh"],"facts":{"ffn_dense":18432,"ffn_gate":"geglu","act":"gelu_pytorch_tanh"},"source":"layer_types[].ffn_gate (hidden_act: gelu_pytorch_tanh)","derived":"hidden_act: gelu_pytorch_tanh"}],"edges":[]}},"model":{"kind":"model","label":"Starcoder2ForCausalLM","nodes":[{"id":"text","kind":"text","label":"tokenized text","lines":["up to 16k tokens"],"facts":{"ctx":16384},"source":"spec.ctx"},{"id":"embedding","kind":"embedding","label":"token embedding","lines":["49,152 x 4608"],"facts":{"vocab":49152,"hidden":4608},"source":"spec.vocab/hidden/tied_embeddings"},{"id":"block.0","kind":"use","label":"transformer block","lines":["sliding attention","dense MLP"],"facts":{"attn_kind":"s","mlp_kind":"d","window":4096},"ref":"block.0","count":32,"source":"layer_types[0]"},{"id":"norm","kind":"norm","label":"final norm","lines":["hidden 4608"],"facts":{"hidden":4608},"source":"spec.hidden"},{"id":"head","kind":"head","label":"linear output layer","lines":["4608 x 49,152"],"facts":{"vocab":49152,"hidden":4608},"source":"spec.vocab/hidden"}],"facts":{"params_total":7173923840,"params_active":7173923840,"kv_bytes_per_token":0,"kv_window_bytes":268435456,"vocab":49152,"hidden":4608,"ctx":16384},"edges":[["text","embedding"],["embedding","block.0"],["block.0","norm"],["norm","head"]]},"omissions":[]},"provenance":{"class":"derived","source":"config.json","method":"spec-v1"}},"lineage":{"org":"bigcode","tier":"B","foundational":true,"excluded_because":null,"family":"starcoder","generation":"2","size":"7B","role":null,"line":null,"ladder":["2"],"position":1,"rungs":1,"first_of_line":true,"new_rung":false},"params":{"total":7173923840,"active":7173923840,"active_ratio":1.0,"params_per_expert":null,"mtp_excluded":null,"provenance":{"class":"derived","method":"dense-identity-v1","total_from":"safetensors-header-v1","from_base":null},"withheld":null},"inference":{"kv_bytes_per_token":0,"kv_window_bytes":268435456,"max_ctx_sliding":4096,"sliding_layers":32,"attn_layers":32,"gb_fp16":14.35,"gb_q4":3.95,"gb_active_fp16":14.35,"ctx":16384},"quants":null,"evidence":null,"claims":[{"field":"params.total","claim":"7b","derived":7173923840,"delta":-0.0242,"quote":"7b","source":"repo-name","source_url":"https://huggingface.co/bigcode/starcoder2-7b"}],"diagrams":{"structure":"/diagrams/bigcode--starcoder2-7b-structure.svg"},"history":{"points":2,"first":"2026-09-16T15:22:25Z","last":"2026-09-22T19:46:58Z"},"links":{"hf":"https://huggingface.co/bigcode/starcoder2-7b","papers":["https://arxiv.org/abs/2305.13245","https://arxiv.org/abs/2205.14135","https://arxiv.org/abs/2004.05150","https://arxiv.org/abs/2207.14255","https://arxiv.org/abs/2402.19173"],"license":"bigcode-openrail-m"},"counters":{"downloads":12621,"likes":227,"created":"2024-02-20","modified":"2024-06-11"},"flags":{"variant":false,"gated":false,"closed_weights":false}}