yujiepan commited on
Commit
0434c2c
·
verified ·
1 Parent(s): cc8624c

Upload folder using huggingface_hub

Browse files
Files changed (4) hide show
  1. .meta/create_model.py +2 -3
  2. README.md +3 -3
  3. config.json +0 -1
  4. consolidated.safetensors +2 -2
.meta/create_model.py CHANGED
@@ -60,7 +60,6 @@ def create_model(source_model_id: str, source_revision: str, save_folder: str):
60
  "quant_method": "fp8",
61
  "activation_scheme": "dynamic",
62
  "weight_block_size": [64, 64],
63
- "scale_fmt": "ue8m0",
64
  "modules_to_not_convert": [
65
  "model.vision_tower",
66
  "model.multi_modal_projector",
@@ -199,7 +198,7 @@ def create_model(source_model_id: str, source_revision: str, save_folder: str):
199
  rows, columns = value.shape
200
  blocks = value.float().reshape(rows // 64, 64, columns // 64, 64)
201
  maximum = blocks.abs().amax(dim=(1, 3)).clamp_min(torch.finfo(torch.float32).tiny)
202
- inverse = torch.pow(2.0, torch.ceil(torch.log2(1.0 / maximum))).to(torch.float8_e8m0fnu)
203
  state[name] = (
204
  (blocks * inverse.float()[:, None, :, None])
205
  .clamp(-448, 448)
@@ -207,7 +206,7 @@ def create_model(source_model_id: str, source_revision: str, save_folder: str):
207
  .to(torch.float8_e4m3fn)
208
  .contiguous()
209
  )
210
- state[name.removesuffix(".weight") + ".qscale_weight"] = (1.0 / inverse.float()).to(torch.float8_e8m0fnu)
211
 
212
  for name, value in list(state.items()):
213
  if should_quantize(name, value):
 
60
  "quant_method": "fp8",
61
  "activation_scheme": "dynamic",
62
  "weight_block_size": [64, 64],
 
63
  "modules_to_not_convert": [
64
  "model.vision_tower",
65
  "model.multi_modal_projector",
 
198
  rows, columns = value.shape
199
  blocks = value.float().reshape(rows // 64, 64, columns // 64, 64)
200
  maximum = blocks.abs().amax(dim=(1, 3)).clamp_min(torch.finfo(torch.float32).tiny)
201
+ inverse = torch.pow(2.0, torch.ceil(torch.log2(1.0 / maximum)))
202
  state[name] = (
203
  (blocks * inverse.float()[:, None, :, None])
204
  .clamp(-448, 448)
 
206
  .to(torch.float8_e4m3fn)
207
  .contiguous()
208
  )
209
+ state[name.removesuffix(".weight") + ".qscale_weight"] = (1.0 / inverse).contiguous()
210
 
211
  for name, value in list(state.items()):
212
  if should_quantize(name, value):
README.md CHANGED
@@ -9,8 +9,8 @@ This is a randomly initialized tiny model based on [mistralai/Mistral-Large-4-1T
9
 
10
  | Feature | Source | This repo |
11
  |---|---|---|
12
- | Checkpoint tensor elements | 7.13B BF16, 63.84M F32, 1.05T F8_E4M3 | 54.84M BF16, 1.31M F8_E4M3, 320 F8_E8M0 |
13
- | Safetensors weight files | 1.06 TB (54 files) | 111.12 MB (consolidated.safetensors) |
14
  | Architecture / input | Multimodal MoE; text and image | Same |
15
  | Vocabulary rows / tied embeddings | 204,800 / false | 204,800 / true |
16
  | Backbone layers | 72 | 12: three complete RoPE/RoPE/RoPE/NoPE cycles |
@@ -20,7 +20,7 @@ This is a randomly initialized tiny model based on [mistralai/Mistral-Large-4-1T
20
  | Cross-layer KV sharing | Source pattern | Two complete three-own/one-shared NoPE cycles |
21
  | Vision tower | 30 layers; 2,048 width | 4 layers; 64 width |
22
  | DSpark | 3 dense MLA stages; rank 512; depth 3 | 3 dense MLA stages; rank 8; depth 3 |
23
- | Checkpoint precision | E4M3 block-FP8 + UE8M0 scales; BF16 exclusions | Same format; 64×64 blocks |
24
 
25
  TP=2 vLLM uses a 64-wide FP8 activation group per rank, which fixes the residual width at 128. The checkpoint retains 64×64 FP8 blocks, a 512-wide MLA latent KV required by H20 sparse MLA, and four 32-wide attention heads. The input/output BF16 token table is tied, saving one 52.43 MB matrix; the optimized vLLM kernel constraints still place the checkpoint above the 30 MB soft target.
26
 
 
9
 
10
  | Feature | Source | This repo |
11
  |---|---|---|
12
+ | Checkpoint tensor elements | 7.13B BF16, 63.84M F32, 1.05T F8_E4M3 | 54.84M BF16, 320 F32, 1.31M F8_E4M3 |
13
+ | Safetensors weight files | 1.06 TB (54 files) | 111.13 MB (consolidated.safetensors) |
14
  | Architecture / input | Multimodal MoE; text and image | Same |
15
  | Vocabulary rows / tied embeddings | 204,800 / false | 204,800 / true |
16
  | Backbone layers | 72 | 12: three complete RoPE/RoPE/RoPE/NoPE cycles |
 
20
  | Cross-layer KV sharing | Source pattern | Two complete three-own/one-shared NoPE cycles |
21
  | Vision tower | 30 layers; 2,048 width | 4 layers; 64 width |
22
  | DSpark | 3 dense MLA stages; rank 512; depth 3 | 3 dense MLA stages; rank 8; depth 3 |
23
+ | Checkpoint precision | E4M3 block-FP8 + FP32 scales; BF16 exclusions | Same format; 64×64 blocks |
24
 
25
  TP=2 vLLM uses a 64-wide FP8 activation group per rank, which fixes the residual width at 128. The checkpoint retains 64×64 FP8 blocks, a 512-wide MLA latent KV required by H20 sparse MLA, and four 32-wide attention heads. The input/output BF16 token table is tied, saving one 52.43 MB matrix; the optimized vLLM kernel constraints still place the checkpoint above the 30 MB soft target.
26
 
config.json CHANGED
@@ -14,7 +14,6 @@
14
  64,
15
  64
16
  ],
17
- "scale_fmt": "ue8m0",
18
  "modules_to_not_convert": [
19
  "model.vision_tower",
20
  "model.multi_modal_projector",
 
14
  64,
15
  64
16
  ],
 
17
  "modules_to_not_convert": [
18
  "model.vision_tower",
19
  "model.multi_modal_projector",
consolidated.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:233e1a76d998d19bf117cf6acc381c31eeb46a3313811543d60f7d42cfaada56
3
- size 111124456
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ab784992be89268fd19a096a69a31216896129dd6703af7339411b09d7e4bf4a
3
+ size 111125104