yujiepan commited on
Commit
0663073
·
verified ·
1 Parent(s): 6f4c30a

Upload folder using huggingface_hub

Browse files
Files changed (3) hide show
  1. README.md +4 -4
  2. config.json +1 -5
  3. model.safetensors +2 -2
README.md CHANGED
@@ -11,7 +11,7 @@ Structural comparison with `XHToken/Spark-X2.6-4B`:
11
  | Feature | Source | Tiny |
12
  |---|---:|---:|
13
  | Vocabulary / tied embeddings | 131,072 / yes | same |
14
- | Layers | 36 | 12; three 3-sliding + 1-full cycles |
15
  | Hidden size / head dimension | 2,560 / 256 | 16 / 32 |
16
  | Query / KV heads | 16 / 4 | 1 / 1 |
17
  | MLP width | 10,240 | 64 |
@@ -70,8 +70,8 @@ folder.mkdir(parents=True, exist_ok=True)
70
  raw = json.loads(Path(hf_hub_download(source_model_id, "config.json", revision=source_revision)).read_text())
71
  raw.update(
72
  hidden_size=16, head_dim=32, num_attention_heads=1, num_key_value_heads=1,
73
- intermediate_size=64, num_hidden_layers=12,
74
- layer_types=(["sliding_attention"] * 3 + ["full_attention"]) * 3,
75
  )
76
  (folder / "config.json").write_text(json.dumps(raw, indent=2), encoding="utf-8")
77
  for filename in ("configuration_spark.py", "modeling_spark.py"):
@@ -118,7 +118,7 @@ Spark2_5ForCausalLM(
118
  (model): Spark2_5Model(
119
  (embedding): Embedding(131072, 16, padding_idx=2)
120
  (layers): ModuleList(
121
- (0-11): 12 x Spark2_5DecoderLayer(
122
  (self_attn): Spark2_5Attention(
123
  (q_k_v_proj): Linear(in_features=16, out_features=96, bias=False)
124
  (g_proj): Linear(in_features=16, out_features=1, bias=False)
 
11
  | Feature | Source | Tiny |
12
  |---|---:|---:|
13
  | Vocabulary / tied embeddings | 131,072 / yes | same |
14
+ | Layers | 36 | 8; two 3-sliding + 1-full cycles |
15
  | Hidden size / head dimension | 2,560 / 256 | 16 / 32 |
16
  | Query / KV heads | 16 / 4 | 1 / 1 |
17
  | MLP width | 10,240 | 64 |
 
70
  raw = json.loads(Path(hf_hub_download(source_model_id, "config.json", revision=source_revision)).read_text())
71
  raw.update(
72
  hidden_size=16, head_dim=32, num_attention_heads=1, num_key_value_heads=1,
73
+ intermediate_size=64, num_hidden_layers=8,
74
+ layer_types=(["sliding_attention"] * 3 + ["full_attention"]) * 2,
75
  )
76
  (folder / "config.json").write_text(json.dumps(raw, indent=2), encoding="utf-8")
77
  for filename in ("configuration_spark.py", "modeling_spark.py"):
 
118
  (model): Spark2_5Model(
119
  (embedding): Embedding(131072, 16, padding_idx=2)
120
  (layers): ModuleList(
121
+ (0-7): 8 x Spark2_5DecoderLayer(
122
  (self_attn): Spark2_5Attention(
123
  (q_k_v_proj): Linear(in_features=16, out_features=96, bias=False)
124
  (g_proj): Linear(in_features=16, out_features=1, bias=False)
config.json CHANGED
@@ -27,17 +27,13 @@
27
  "sliding_attention",
28
  "sliding_attention",
29
  "sliding_attention",
30
- "full_attention",
31
- "sliding_attention",
32
- "sliding_attention",
33
- "sliding_attention",
34
  "full_attention"
35
  ],
36
  "max_position_embeddings": 1048576,
37
  "mlp_bias": false,
38
  "model_type": "spark2_5",
39
  "num_attention_heads": 1,
40
- "num_hidden_layers": 12,
41
  "num_key_value_heads": 1,
42
  "pad_token_id": 2,
43
  "rms_norm_eps": 1e-06,
 
27
  "sliding_attention",
28
  "sliding_attention",
29
  "sliding_attention",
 
 
 
 
30
  "full_attention"
31
  ],
32
  "max_position_embeddings": 1048576,
33
  "mlp_bias": false,
34
  "model_type": "spark2_5",
35
  "num_attention_heads": 1,
36
+ "num_hidden_layers": 8,
37
  "num_key_value_heads": 1,
38
  "pad_token_id": 2,
39
  "rms_norm_eps": 1e-06,
model.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:254aecb0c2a75d91b96d368caed3996123e13e782ab142dc83bb02b18a2ff473
3
- size 4328808
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7bfcde4ade27abb88956789cbd2b32689868df8b70bf370dbeacc9dac793637f
3
+ size 4284048