File size: 3,004 Bytes
ab92572
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1088c4f
ab92572
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
{
  "mic": "0.3",
  "name": "GLM-MoE-DSA causal LM",
  "usage": "AutoTokenizer + AutoModelForCausalLM, batched, left padding, next-token loss",
  "architecture": "GlmMoeDsaForCausalLM",
  "checkpoints": {
    "zai-org/GLM-5.3": {
      "fixture": "huggingface-mic/GLM-5.3-mic"
    }
  },
  "fixtures": {
    "huggingface-mic/GLM-5.3-mic": {
      "built_from": "zai-org/GLM-5.3",
      "covers": [
        "zai-org/GLM-5.3"
      ],
      "why_separate": "The checkpoint is a 78-layer 256-expert MoE with FP8 block-quantized weights; the slim fixture shrinks depth, experts, and vocab so CPU runners can measure the public API without the full download.",
      "build": {
        "seed": 17,
        "model_class": "GlmMoeDsaForCausalLM",
        "config_overrides": {
          "fields": {
            "n_routed_experts": 8,
            "n_shared_experts": 1,
            "num_experts_per_tok": 2,
            "moe_intermediate_size": 64,
            "intermediate_size": 128,
            "hidden_size": 128,
            "num_attention_heads": 4,
            "num_key_value_heads": 4,
            "head_dim": 32,
            "q_lora_rank": 64,
            "kv_lora_rank": 32,
            "qk_nope_head_dim": 24,
            "qk_rope_head_dim": 8,
            "v_head_dim": 32,
            "index_head_dim": 16,
            "index_n_heads": 2,
            "index_topk": 8,
            "first_k_dense_replace": 1,
            "num_nextn_predict_layers": 1,
            "max_position_embeddings": 512,
            "dtype": "float32"
          },
          "reason": "Shrink depth, expert count, and vocab so the fixture fits CPU memory; shrink already drops the FP8 quantization_config, so fixture weights are plain float32."
        }
      }
    }
  },
  "integrations": {
    "transformers": {
      "entry_point": "integrations/transformers/usage.md",
      "format": "runnable-markdown",
      "requires": [
        "transformers>=5",
        "torch"
      ],
      "targets": [
        "fixtures"
      ],
      "variants": {
        "default": {},
        "eager": {
          "attn_implementation": "eager"
        },
        "bfloat16": {
          "dtype": "bfloat16"
        }
      },
      "training": true,
      "resources": {
        "fixture": {
          "memory_gb": 2,
          "download_mb": 20
        },
        "zai-org/GLM-5.3": {
          "devices": [
            "cuda"
          ],
          "gpus": 1,
          "gpu_memory_gb": 80,
          "memory_gb": 64,
          "download_mb": 350000
        }
      }
    }
  },
  "outputs": {
    "runtime": {
      "compare": "exact"
    },
    "next_token_ids": {
      "compare": "exact"
    },
    "next_token_logits": {
      "compare": "allclose",
      "atol": 0.0001,
      "rtol": 0.0001
    },
    "training.loss": {
      "compare": "allclose",
      "atol": 0.0001,
      "rtol": 0.0001
    },
    "training.gradients": {
      "compare": "all_true"
    },
    "training.updated": {
      "compare": "true"
    }
  }
}