"""Illustrative parameter counts and weighted outputs, not model inference."""
import json
if __name__=="__main__":
    shared,experts,each=20,8,100
    routes=[(0,1),(1,2),(2,3)]
    total=shared+experts*each
    active=shared+2*each
    touched=shared+len({e for r in routes for e in r})*each
    weighted=.75*2+.25*6
    assert (total,active,touched)==(820,220,420) and weighted==3
    print(json.dumps({"total_parameters":total,"active_per_token":active,"distinct_touched_across_three_tokens":touched,"two_expert_scalar_output":weighted},indent=2))
