Text Generation
Transformers
Safetensors
qwen3
dflash2
dflash
speculative-decoding
block-diffusion
draft-model
qwen3.8
fp8
block-fp8
e4m3
mixed-precision
quantized
vllm
experimental
text-generation-inference
Instructions to use magiccodingman/Qwen3.8-27B-heretic-ara-DFlash2-fp8 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use magiccodingman/Qwen3.8-27B-heretic-ara-DFlash2-fp8 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="magiccodingman/Qwen3.8-27B-heretic-ara-DFlash2-fp8")# Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("magiccodingman/Qwen3.8-27B-heretic-ara-DFlash2-fp8") model = AutoModel.from_pretrained("magiccodingman/Qwen3.8-27B-heretic-ara-DFlash2-fp8", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use magiccodingman/Qwen3.8-27B-heretic-ara-DFlash2-fp8 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "magiccodingman/Qwen3.8-27B-heretic-ara-DFlash2-fp8" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "magiccodingman/Qwen3.8-27B-heretic-ara-DFlash2-fp8", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/magiccodingman/Qwen3.8-27B-heretic-ara-DFlash2-fp8
- SGLang
How to use magiccodingman/Qwen3.8-27B-heretic-ara-DFlash2-fp8 with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "magiccodingman/Qwen3.8-27B-heretic-ara-DFlash2-fp8" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "magiccodingman/Qwen3.8-27B-heretic-ara-DFlash2-fp8", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "magiccodingman/Qwen3.8-27B-heretic-ara-DFlash2-fp8" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "magiccodingman/Qwen3.8-27B-heretic-ara-DFlash2-fp8", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use magiccodingman/Qwen3.8-27B-heretic-ara-DFlash2-fp8 with Docker Model Runner:
docker model run hf.co/magiccodingman/Qwen3.8-27B-heretic-ara-DFlash2-fp8
Upload folder using huggingface_hub
Browse files- .gitattributes +2 -33
- FP8_EXPERIMENT_VALIDATION.md +76 -0
- LICENSE +202 -0
- README.md +163 -0
- config.json +113 -0
- crc32.json +14 -0
- fp8_conversion_manifest.json +42 -0
- fp8_functional_validation.json +152 -0
- fp8_loader_validation.json +15 -0
- fp8_profile_ab_comparison.json +26 -0
- fp8_structural_validation.json +193 -0
- fp8_target_conditioned_validation.json +35 -0
- model.safetensors +3 -0
- sha256sums.txt +12 -0
.gitattributes
CHANGED
|
@@ -1,35 +1,4 @@
|
|
| 1 |
-
*.
|
| 2 |
-
*.arrow filter=lfs diff=lfs merge=lfs -text
|
| 3 |
*.bin filter=lfs diff=lfs merge=lfs -text
|
| 4 |
-
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
| 5 |
-
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
| 6 |
-
*.ftz filter=lfs diff=lfs merge=lfs -text
|
| 7 |
-
*.gz filter=lfs diff=lfs merge=lfs -text
|
| 8 |
-
*.h5 filter=lfs diff=lfs merge=lfs -text
|
| 9 |
-
*.joblib filter=lfs diff=lfs merge=lfs -text
|
| 10 |
-
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
| 11 |
-
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
| 12 |
-
*.model filter=lfs diff=lfs merge=lfs -text
|
| 13 |
-
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
| 14 |
-
*.npy filter=lfs diff=lfs merge=lfs -text
|
| 15 |
-
*.npz filter=lfs diff=lfs merge=lfs -text
|
| 16 |
-
*.onnx filter=lfs diff=lfs merge=lfs -text
|
| 17 |
-
*.ot filter=lfs diff=lfs merge=lfs -text
|
| 18 |
-
*.parquet filter=lfs diff=lfs merge=lfs -text
|
| 19 |
-
*.pb filter=lfs diff=lfs merge=lfs -text
|
| 20 |
-
*.pickle filter=lfs diff=lfs merge=lfs -text
|
| 21 |
-
*.pkl filter=lfs diff=lfs merge=lfs -text
|
| 22 |
*.pt filter=lfs diff=lfs merge=lfs -text
|
| 23 |
-
*.
|
| 24 |
-
*.rar filter=lfs diff=lfs merge=lfs -text
|
| 25 |
-
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
| 26 |
-
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
| 27 |
-
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
| 28 |
-
*.tar filter=lfs diff=lfs merge=lfs -text
|
| 29 |
-
*.tflite filter=lfs diff=lfs merge=lfs -text
|
| 30 |
-
*.tgz filter=lfs diff=lfs merge=lfs -text
|
| 31 |
-
*.wasm filter=lfs diff=lfs merge=lfs -text
|
| 32 |
-
*.xz filter=lfs diff=lfs merge=lfs -text
|
| 33 |
-
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
-
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
-
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
| 1 |
+
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
|
|
|
| 2 |
*.bin filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
*.pt filter=lfs diff=lfs merge=lfs -text
|
| 4 |
+
*.gguf filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
FP8_EXPERIMENT_VALIDATION.md
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Qwen3.8-27B Heretic ARA DFlash2 selective-FP8 experiment
|
| 2 |
+
|
| 3 |
+
## Result
|
| 4 |
+
|
| 5 |
+
**PASS — experimental checkpoint**
|
| 6 |
+
|
| 7 |
+
- Source: [`alphakek/Qwen3.8-27B-heretic-ara-DFlash2`](https://huggingface.co/alphakek/Qwen3.8-27B-heretic-ara-DFlash2)
|
| 8 |
+
- FP8 derivative: `magiccodingman/Qwen3.8-27B-heretic-ara-DFlash2-fp8`
|
| 9 |
+
- Profile: five decoder MLPs in native block-FP8; sensitive and currently incompatible paths remain BF16
|
| 10 |
+
- FP8 format: E4M3 weights, 128 x 128 FP32 inverse scales, dynamic activation metadata
|
| 11 |
+
- Quantized matrices: 15 (gate, up, and down projection in each of five layers)
|
| 12 |
+
- Preserved tensors: 66, byte-identical to the BF16 source
|
| 13 |
+
- Tensor payload: 2,512,200,960 bytes (2.51 GB decimal / 2.34 GiB)
|
| 14 |
+
- BF16 tensor payload: 3,848,808,960 bytes
|
| 15 |
+
- Tensor-payload reduction: 34.73%
|
| 16 |
+
|
| 17 |
+
## Why this is mixed precision
|
| 18 |
+
|
| 19 |
+
The following remain BF16 deliberately:
|
| 20 |
+
|
| 21 |
+
- Q/K/V projections, because the current DFlash fused context-KV path reads their raw weights and bypasses quantization dispatch
|
| 22 |
+
- Attention output projections, because preserving only about 105 MB materially improved proposal KL and top-1 stability
|
| 23 |
+
- The target-hidden-state `fc` adapter
|
| 24 |
+
- Dynamic convolution projections and kernels
|
| 25 |
+
- Candidate-selector projection and codebooks
|
| 26 |
+
- Norms and other small parameters
|
| 27 |
+
|
| 28 |
+
The metadata contains both Transformers checkpoint names and vLLM runtime names for these exclusions.
|
| 29 |
+
|
| 30 |
+
## Structural validation
|
| 31 |
+
|
| 32 |
+
- Source tensor entries: 81
|
| 33 |
+
- Candidate tensor entries: 96
|
| 34 |
+
- FP8 scale tensors: 15
|
| 35 |
+
- Preserved tensors verified byte-for-byte: 66
|
| 36 |
+
- Aggregate relative weight RMSE: 0.0264555
|
| 37 |
+
- FP8 dtype, FP32 scale dtype, positive finite scales, block geometry, tensor closure, and safetensors headers: passed
|
| 38 |
+
|
| 39 |
+
## Controlled sublayer arithmetic
|
| 40 |
+
|
| 41 |
+
Fixed-seed RMSNorm-like BF16 activation vectors were evaluated through every MLP using the BF16 source and the serialized FP8 weights dequantized to BF16.
|
| 42 |
+
|
| 43 |
+
- Aggregate MLP relative output RMSE: 0.0288080
|
| 44 |
+
- Aggregate MLP output cosine similarity: 0.9995862
|
| 45 |
+
- Preserved attention-output projection cosine similarity: 1.0
|
| 46 |
+
- Result: PASS
|
| 47 |
+
|
| 48 |
+
## Target-conditioned DFlash2 proposal validation
|
| 49 |
+
|
| 50 |
+
Eight diverse prompts were passed through the real BF16 27B target. Hidden states from target layers 5, 19, 33, 47, and 61 were supplied identically to the BF16 and selective-FP8 drafters. Their 56 draft positions were then projected through the target's actual 248,320-token LM head.
|
| 51 |
+
|
| 52 |
+
- Mean exact proposal KL, `D_KL(P_BF16 || P_FP8)`: 0.0018930
|
| 53 |
+
- Median proposal KL: 0.0015949
|
| 54 |
+
- P95 proposal KL: 0.0030100
|
| 55 |
+
- Maximum proposal KL: 0.0085216
|
| 56 |
+
- Proposal top-1 agreement: 96.43%
|
| 57 |
+
- Top-16 candidate overlap: 97.66%
|
| 58 |
+
- Draft-hidden relative RMSE: 0.0306350
|
| 59 |
+
- Draft-hidden cosine similarity: 0.9995342
|
| 60 |
+
- Selector path-token agreement: 85.71%
|
| 61 |
+
- Complete seven-token selector-path agreement: 75.0%
|
| 62 |
+
- Result: PASS
|
| 63 |
+
|
| 64 |
+
The selector metric is intentionally harsh: an early path difference changes the predecessor used by every later selector position. In this test, six of eight complete paths matched, one matched six of seven positions, and one diverged from its first position. Target verification still protects final model correctness; this difference can affect acceptance and speed.
|
| 65 |
+
|
| 66 |
+
## Loader validation
|
| 67 |
+
|
| 68 |
+
The official `dflash` 0.1.0 `DFlash2DraftModel` loader successfully loaded the checkpoint with Transformers 5.15.0. On RTX 3090 it correctly dequantized the FP8 MLP weights to BF16 while retaining the selected BF16 modules.
|
| 69 |
+
|
| 70 |
+
## Deployment limitations
|
| 71 |
+
|
| 72 |
+
RTX 3090 cannot execute native W8A8 FP8. These tests validate serialized FP8 weight quality, full DFlash2 proposal behavior with real target hidden states, and checkpoint loading, but not native R9700 kernel throughput.
|
| 73 |
+
|
| 74 |
+
DFlash2's vLLM support is still an experimental, unmerged branch as of this validation. A final R9700 trial must measure end-to-end acceptance length and tokens per second against the BF16 drafter. The BF16 model card baseline is acceptance length 4.24 and throughput 123.2 tok/s under its documented 4x3090 test. Promote this FP8 experiment only if native throughput improves without a material acceptance regression.
|
| 75 |
+
|
| 76 |
+
The BF16 source and the previously finalized 27B FP8 target were not modified.
|
LICENSE
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
Apache License
|
| 3 |
+
Version 2.0, January 2004
|
| 4 |
+
http://www.apache.org/licenses/
|
| 5 |
+
|
| 6 |
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
| 7 |
+
|
| 8 |
+
1. Definitions.
|
| 9 |
+
|
| 10 |
+
"License" shall mean the terms and conditions for use, reproduction,
|
| 11 |
+
and distribution as defined by Sections 1 through 9 of this document.
|
| 12 |
+
|
| 13 |
+
"Licensor" shall mean the copyright owner or entity authorized by
|
| 14 |
+
the copyright owner that is granting the License.
|
| 15 |
+
|
| 16 |
+
"Legal Entity" shall mean the union of the acting entity and all
|
| 17 |
+
other entities that control, are controlled by, or are under common
|
| 18 |
+
control with that entity. For the purposes of this definition,
|
| 19 |
+
"control" means (i) the power, direct or indirect, to cause the
|
| 20 |
+
direction or management of such entity, whether by contract or
|
| 21 |
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
| 22 |
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
| 23 |
+
|
| 24 |
+
"You" (or "Your") shall mean an individual or Legal Entity
|
| 25 |
+
exercising permissions granted by this License.
|
| 26 |
+
|
| 27 |
+
"Source" form shall mean the preferred form for making modifications,
|
| 28 |
+
including but not limited to software source code, documentation
|
| 29 |
+
source, and configuration files.
|
| 30 |
+
|
| 31 |
+
"Object" form shall mean any form resulting from mechanical
|
| 32 |
+
transformation or translation of a Source form, including but
|
| 33 |
+
not limited to compiled object code, generated documentation,
|
| 34 |
+
and conversions to other media types.
|
| 35 |
+
|
| 36 |
+
"Work" shall mean the work of authorship, whether in Source or
|
| 37 |
+
Object form, made available under the License, as indicated by a
|
| 38 |
+
copyright notice that is included in or attached to the work
|
| 39 |
+
(an example is provided in the Appendix below).
|
| 40 |
+
|
| 41 |
+
"Derivative Works" shall mean any work, whether in Source or Object
|
| 42 |
+
form, that is based on (or derived from) the Work and for which the
|
| 43 |
+
editorial revisions, annotations, elaborations, or other modifications
|
| 44 |
+
represent, as a whole, an original work of authorship. For the purposes
|
| 45 |
+
of this License, Derivative Works shall not include works that remain
|
| 46 |
+
separable from, or merely link (or bind by name) to the interfaces of,
|
| 47 |
+
the Work and Derivative Works thereof.
|
| 48 |
+
|
| 49 |
+
"Contribution" shall mean any work of authorship, including
|
| 50 |
+
the original version of the Work and any modifications or additions
|
| 51 |
+
to that Work or Derivative Works thereof, that is intentionally
|
| 52 |
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
| 53 |
+
or by an individual or Legal Entity authorized to submit on behalf of
|
| 54 |
+
the copyright owner. For the purposes of this definition, "submitted"
|
| 55 |
+
means any form of electronic, verbal, or written communication sent
|
| 56 |
+
to the Licensor or its representatives, including but not limited to
|
| 57 |
+
communication on electronic mailing lists, source code control systems,
|
| 58 |
+
and issue tracking systems that are managed by, or on behalf of, the
|
| 59 |
+
Licensor for the purpose of discussing and improving the Work, but
|
| 60 |
+
excluding communication that is conspicuously marked or otherwise
|
| 61 |
+
designated in writing by the copyright owner as "Not a Contribution."
|
| 62 |
+
|
| 63 |
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
| 64 |
+
on behalf of whom a Contribution has been received by Licensor and
|
| 65 |
+
subsequently incorporated within the Work.
|
| 66 |
+
|
| 67 |
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
| 68 |
+
this License, each Contributor hereby grants to You a perpetual,
|
| 69 |
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
| 70 |
+
copyright license to reproduce, prepare Derivative Works of,
|
| 71 |
+
publicly display, publicly perform, sublicense, and distribute the
|
| 72 |
+
Work and such Derivative Works in Source or Object form.
|
| 73 |
+
|
| 74 |
+
3. Grant of Patent License. Subject to the terms and conditions of
|
| 75 |
+
this License, each Contributor hereby grants to You a perpetual,
|
| 76 |
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
| 77 |
+
(except as stated in this section) patent license to make, have made,
|
| 78 |
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
| 79 |
+
where such license applies only to those patent claims licensable
|
| 80 |
+
by such Contributor that are necessarily infringed by their
|
| 81 |
+
Contribution(s) alone or by combination of their Contribution(s)
|
| 82 |
+
with the Work to which such Contribution(s) was submitted. If You
|
| 83 |
+
institute patent litigation against any entity (including a
|
| 84 |
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
| 85 |
+
or a Contribution incorporated within the Work constitutes direct
|
| 86 |
+
or contributory patent infringement, then any patent licenses
|
| 87 |
+
granted to You under this License for that Work shall terminate
|
| 88 |
+
as of the date such litigation is filed.
|
| 89 |
+
|
| 90 |
+
4. Redistribution. You may reproduce and distribute copies of the
|
| 91 |
+
Work or Derivative Works thereof in any medium, with or without
|
| 92 |
+
modifications, and in Source or Object form, provided that You
|
| 93 |
+
meet the following conditions:
|
| 94 |
+
|
| 95 |
+
(a) You must give any other recipients of the Work or
|
| 96 |
+
Derivative Works a copy of this License; and
|
| 97 |
+
|
| 98 |
+
(b) You must cause any modified files to carry prominent notices
|
| 99 |
+
stating that You changed the files; and
|
| 100 |
+
|
| 101 |
+
(c) You must retain, in the Source form of any Derivative Works
|
| 102 |
+
that You distribute, all copyright, patent, trademark, and
|
| 103 |
+
attribution notices from the Source form of the Work,
|
| 104 |
+
excluding those notices that do not pertain to any part of
|
| 105 |
+
the Derivative Works; and
|
| 106 |
+
|
| 107 |
+
(d) If the Work includes a "NOTICE" text file as part of its
|
| 108 |
+
distribution, then any Derivative Works that You distribute must
|
| 109 |
+
include a readable copy of the attribution notices contained
|
| 110 |
+
within such NOTICE file, excluding those notices that do not
|
| 111 |
+
pertain to any part of the Derivative Works, in at least one
|
| 112 |
+
of the following places: within a NOTICE text file distributed
|
| 113 |
+
as part of the Derivative Works; within the Source form or
|
| 114 |
+
documentation, if provided along with the Derivative Works; or,
|
| 115 |
+
within a display generated by the Derivative Works, if and
|
| 116 |
+
wherever such third-party notices normally appear. The contents
|
| 117 |
+
of the NOTICE file are for informational purposes only and
|
| 118 |
+
do not modify the License. You may add Your own attribution
|
| 119 |
+
notices within Derivative Works that You distribute, alongside
|
| 120 |
+
or as an addendum to the NOTICE text from the Work, provided
|
| 121 |
+
that such additional attribution notices cannot be construed
|
| 122 |
+
as modifying the License.
|
| 123 |
+
|
| 124 |
+
You may add Your own copyright statement to Your modifications and
|
| 125 |
+
may provide additional or different license terms and conditions
|
| 126 |
+
for use, reproduction, or distribution of Your modifications, or
|
| 127 |
+
for any such Derivative Works as a whole, provided Your use,
|
| 128 |
+
reproduction, and distribution of the Work otherwise complies with
|
| 129 |
+
the conditions stated in this License.
|
| 130 |
+
|
| 131 |
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
| 132 |
+
any Contribution intentionally submitted for inclusion in the Work
|
| 133 |
+
by You to the Licensor shall be under the terms and conditions of
|
| 134 |
+
this License, without any additional terms or conditions.
|
| 135 |
+
Notwithstanding the above, nothing herein shall supersede or modify
|
| 136 |
+
the terms of any separate license agreement you may have executed
|
| 137 |
+
with Licensor regarding such Contributions.
|
| 138 |
+
|
| 139 |
+
6. Trademarks. This License does not grant permission to use the trade
|
| 140 |
+
names, trademarks, service marks, or product names of the Licensor,
|
| 141 |
+
except as required for reasonable and customary use in describing the
|
| 142 |
+
origin of the Work and reproducing the content of the NOTICE file.
|
| 143 |
+
|
| 144 |
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
| 145 |
+
agreed to in writing, Licensor provides the Work (and each
|
| 146 |
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
| 147 |
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
| 148 |
+
implied, including, without limitation, any warranties or conditions
|
| 149 |
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
| 150 |
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
| 151 |
+
appropriateness of using or redistributing the Work and assume any
|
| 152 |
+
risks associated with Your exercise of permissions under this License.
|
| 153 |
+
|
| 154 |
+
8. Limitation of Liability. In no event and under no legal theory,
|
| 155 |
+
whether in tort (including negligence), contract, or otherwise,
|
| 156 |
+
unless required by applicable law (such as deliberate and grossly
|
| 157 |
+
negligent acts) or agreed to in writing, shall any Contributor be
|
| 158 |
+
liable to You for damages, including any direct, indirect, special,
|
| 159 |
+
incidental, or consequential damages of any character arising as a
|
| 160 |
+
result of this License or out of the use or inability to use the
|
| 161 |
+
Work (including but not limited to damages for loss of goodwill,
|
| 162 |
+
work stoppage, computer failure or malfunction, or any and all
|
| 163 |
+
other commercial damages or losses), even if such Contributor
|
| 164 |
+
has been advised of the possibility of such damages.
|
| 165 |
+
|
| 166 |
+
9. Accepting Warranty or Additional Liability. While redistributing
|
| 167 |
+
the Work or Derivative Works thereof, You may choose to offer,
|
| 168 |
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
| 169 |
+
or other liability obligations and/or rights consistent with this
|
| 170 |
+
License. However, in accepting such obligations, You may act only
|
| 171 |
+
on Your own behalf and on Your sole responsibility, not on behalf
|
| 172 |
+
of any other Contributor, and only if You agree to indemnify,
|
| 173 |
+
defend, and hold each Contributor harmless for any liability
|
| 174 |
+
incurred by, or claims asserted against, such Contributor by reason
|
| 175 |
+
of your accepting any such warranty or additional liability.
|
| 176 |
+
|
| 177 |
+
END OF TERMS AND CONDITIONS
|
| 178 |
+
|
| 179 |
+
APPENDIX: How to apply the Apache License to your work.
|
| 180 |
+
|
| 181 |
+
To apply the Apache License to your work, attach the following
|
| 182 |
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
| 183 |
+
replaced with your own identifying information. (Don't include
|
| 184 |
+
the brackets!) The text should be enclosed in the appropriate
|
| 185 |
+
comment syntax for the file format. We also recommend that a
|
| 186 |
+
file or class name and description of purpose be included on the
|
| 187 |
+
same "printed page" as the copyright notice for easier
|
| 188 |
+
identification within third-party archives.
|
| 189 |
+
|
| 190 |
+
Copyright 2026 Alibaba Cloud
|
| 191 |
+
|
| 192 |
+
Licensed under the Apache License, Version 2.0 (the "License");
|
| 193 |
+
you may not use this file except in compliance with the License.
|
| 194 |
+
You may obtain a copy of the License at
|
| 195 |
+
|
| 196 |
+
http://www.apache.org/licenses/LICENSE-2.0
|
| 197 |
+
|
| 198 |
+
Unless required by applicable law or agreed to in writing, software
|
| 199 |
+
distributed under the License is distributed on an "AS IS" BASIS,
|
| 200 |
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 201 |
+
See the License for the specific language governing permissions and
|
| 202 |
+
limitations under the License.
|
README.md
ADDED
|
@@ -0,0 +1,163 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
library_name: transformers
|
| 3 |
+
license: apache-2.0
|
| 4 |
+
pipeline_tag: text-generation
|
| 5 |
+
base_model:
|
| 6 |
+
- alphakek/Qwen3.8-27B-heretic-ara-DFlash2
|
| 7 |
+
base_model_relation: quantized
|
| 8 |
+
inference: false
|
| 9 |
+
tags:
|
| 10 |
+
- dflash2
|
| 11 |
+
- dflash
|
| 12 |
+
- speculative-decoding
|
| 13 |
+
- block-diffusion
|
| 14 |
+
- draft-model
|
| 15 |
+
- qwen3.8
|
| 16 |
+
- fp8
|
| 17 |
+
- block-fp8
|
| 18 |
+
- e4m3
|
| 19 |
+
- mixed-precision
|
| 20 |
+
- quantized
|
| 21 |
+
- safetensors
|
| 22 |
+
- vllm
|
| 23 |
+
- experimental
|
| 24 |
+
---
|
| 25 |
+
|
| 26 |
+
# Qwen3.8-27B-heretic-ara-DFlash2 — selective FP8 experiment
|
| 27 |
+
|
| 28 |
+
This is an **experimental, mixed-precision FP8 quantization** of
|
| 29 |
+
[`alphakek/Qwen3.8-27B-heretic-ara-DFlash2`](https://huggingface.co/alphakek/Qwen3.8-27B-heretic-ara-DFlash2),
|
| 30 |
+
prepared and validated by
|
| 31 |
+
[`magiccodingman`](https://huggingface.co/magiccodingman).
|
| 32 |
+
|
| 33 |
+
It is a target-specific speculative-decoding drafter, not a standalone language
|
| 34 |
+
model. Use it only with
|
| 35 |
+
[`heretic-org/Qwen3.8-27B-heretic-ara`](https://huggingface.co/heretic-org/Qwen3.8-27B-heretic-ara)
|
| 36 |
+
or a weight-compatible quantization of that exact target, such as the paired
|
| 37 |
+
`magiccodingman/Qwen3.8-27B-heretic-ara-fp8` repository.
|
| 38 |
+
|
| 39 |
+
## Why selective FP8
|
| 40 |
+
|
| 41 |
+
Quantizing every drafter matrix was measurably less stable. The selected profile
|
| 42 |
+
quantizes the large MLP projections and preserves DFlash-sensitive paths in
|
| 43 |
+
BF16.
|
| 44 |
+
|
| 45 |
+
| Property | Value |
|
| 46 |
+
|---|---:|
|
| 47 |
+
| Weight format | FP8 E4M3 with BF16 exclusions |
|
| 48 |
+
| Scale granularity | 128 × 128 blocks |
|
| 49 |
+
| Activation metadata | Dynamic FP8 |
|
| 50 |
+
| FP8 matrices | 15: gate/up/down projections across five layers |
|
| 51 |
+
| BF16 tensors | 66, byte-identical to the source |
|
| 52 |
+
| Tensor payload | 2.51 GB (2.34 GiB) |
|
| 53 |
+
| Source BF16 payload | 3.85 GB |
|
| 54 |
+
| Payload reduction | **34.73%** |
|
| 55 |
+
|
| 56 |
+
The following remain BF16 deliberately:
|
| 57 |
+
|
| 58 |
+
- Q/K/V projections required by the current fused context-KV path
|
| 59 |
+
- attention output projections
|
| 60 |
+
- target-hidden-state adapter
|
| 61 |
+
- dynamic convolution projections and kernels
|
| 62 |
+
- candidate-selector projection and codebooks
|
| 63 |
+
- norms and other small parameters
|
| 64 |
+
|
| 65 |
+
## Validation
|
| 66 |
+
|
| 67 |
+
Eight prompts were run through the real BF16 27B target. Identical hidden states
|
| 68 |
+
from target layers 5, 19, 33, 47, and 61 were supplied to the BF16 and selective-
|
| 69 |
+
FP8 drafters, producing 56 compared draft positions through the target's actual
|
| 70 |
+
248,320-token LM head.
|
| 71 |
+
|
| 72 |
+
| Metric | Result |
|
| 73 |
+
|---|---:|
|
| 74 |
+
| Mean `D_KL(P_BF16 || P_FP8)` | **0.0018930** |
|
| 75 |
+
| Median proposal KL | 0.0015949 |
|
| 76 |
+
| P95 proposal KL | 0.0030100 |
|
| 77 |
+
| Maximum proposal KL | 0.0085216 |
|
| 78 |
+
| Proposal top-1 agreement | **96.43%** |
|
| 79 |
+
| Top-16 candidate overlap | **97.66%** |
|
| 80 |
+
| Draft-hidden cosine similarity | **0.9995342** |
|
| 81 |
+
| Selector path-token agreement | 85.71% |
|
| 82 |
+
| Complete seven-token path agreement | 75.0% |
|
| 83 |
+
|
| 84 |
+
Structural validation, block geometry, finite scales, preserved-tensor hashes,
|
| 85 |
+
controlled MLP arithmetic, official `dflash` 0.1.0 loading, and repository
|
| 86 |
+
checksums passed. See [`FP8_EXPERIMENT_VALIDATION.md`](./FP8_EXPERIMENT_VALIDATION.md)
|
| 87 |
+
and the included JSON reports for full details.
|
| 88 |
+
|
| 89 |
+
The selector-path metric is intentionally strict: one early token difference
|
| 90 |
+
changes the predecessor used by later selector positions. Target verification
|
| 91 |
+
protects the final output distribution, but proposal drift may still change
|
| 92 |
+
acceptance length and throughput.
|
| 93 |
+
|
| 94 |
+
## Usage with the paired target
|
| 95 |
+
|
| 96 |
+
The drafter repository intentionally has no tokenizer or multimodal processor.
|
| 97 |
+
Those artifacts come from the target model repository and were not present in
|
| 98 |
+
the upstream drafter repository.
|
| 99 |
+
|
| 100 |
+
Example using the proposed Hub repository names:
|
| 101 |
+
|
| 102 |
+
```bash
|
| 103 |
+
vllm serve magiccodingman/Qwen3.8-27B-heretic-ara-fp8 \
|
| 104 |
+
--tensor-parallel-size 4 \
|
| 105 |
+
--reasoning-parser qwen3 \
|
| 106 |
+
--kv-cache-dtype fp8 \
|
| 107 |
+
--speculative-config '{"model":"magiccodingman/Qwen3.8-27B-heretic-ara-DFlash2-fp8","method":"dflash","num_speculative_tokens":6}'
|
| 108 |
+
```
|
| 109 |
+
|
| 110 |
+
At the time this checkpoint was validated, DFlash2 support for vLLM was still
|
| 111 |
+
being developed in
|
| 112 |
+
[`vllm-project/vllm#52816`](https://github.com/vllm-project/vllm/pull/52816).
|
| 113 |
+
Use a compatible DFlash2-enabled build. Backend support for this selective
|
| 114 |
+
block-FP8 layout must also be verified on the deployment system.
|
| 115 |
+
|
| 116 |
+
> **Hardware note:** RTX 3090 does not execute native W8A8 FP8. The local tests
|
| 117 |
+
> validated the serialized weights and proposal behavior by dequantizing FP8
|
| 118 |
+
> matrices to BF16. Native FP8 kernel throughput was not measured.
|
| 119 |
+
|
| 120 |
+
## Performance expectation
|
| 121 |
+
|
| 122 |
+
The upstream BF16 drafter card reports **123.2 tok/s** and **4.24 average
|
| 123 |
+
acceptance length** on its 4× RTX 3090 TP4 test, versus 116.9 tok/s and 4.01 for
|
| 124 |
+
the stock `z-lab` drafter. Those are upstream BF16 results, **not results for
|
| 125 |
+
this FP8 derivative**.
|
| 126 |
+
|
| 127 |
+
Before relying on this checkpoint, compare the BF16 and FP8 drafters on the same
|
| 128 |
+
hardware, prompts, concurrency, speculative-token count, and runtime build.
|
| 129 |
+
Measure both tokens/second and acceptance length.
|
| 130 |
+
|
| 131 |
+
## Provenance and credits
|
| 132 |
+
|
| 133 |
+
The derivative chain is:
|
| 134 |
+
|
| 135 |
+
1. [Qwen Team — `Qwen/Qwen3.8-27B`](https://huggingface.co/Qwen/Qwen3.8-27B)
|
| 136 |
+
2. [`heretic-org/Qwen3.8-27B-heretic-ara`](https://huggingface.co/heretic-org/Qwen3.8-27B-heretic-ara), the target model
|
| 137 |
+
3. [`z-lab/Qwen3.8-27B-DFlash2`](https://huggingface.co/z-lab/Qwen3.8-27B-DFlash2), the stock target-conditioned DFlash2 drafter
|
| 138 |
+
4. [`alphakek/Qwen3.8-27B-heretic-ara-DFlash2`](https://huggingface.co/alphakek/Qwen3.8-27B-heretic-ara-DFlash2), SpecForge-tuned for the Heretic ARA target and warm-started from the `z-lab` drafter
|
| 139 |
+
5. This selective-FP8 conversion by [`magiccodingman`](https://huggingface.co/magiccodingman)
|
| 140 |
+
|
| 141 |
+
DFlash and its implementation are credited to the
|
| 142 |
+
[`z-lab/dflash`](https://github.com/z-lab/dflash) project and its authors. The
|
| 143 |
+
upstream target's ARA transformation credits
|
| 144 |
+
[`p-e-w/heretic`](https://github.com/p-e-w/heretic),
|
| 145 |
+
[`timrohrbaugh/heretic`](https://github.com/timrohrbaugh/heretic), and the
|
| 146 |
+
[ARA contribution](https://github.com/p-e-w/heretic/pull/211).
|
| 147 |
+
|
| 148 |
+
This quantization is an independent derivative and is not an official Qwen,
|
| 149 |
+
Heretic, z-lab, Inco, alphakek, or vLLM release.
|
| 150 |
+
|
| 151 |
+
## Limitations and responsibility
|
| 152 |
+
|
| 153 |
+
This checkpoint is experimental. It may load correctly yet provide no speedup
|
| 154 |
+
if the runtime dequantizes its FP8 matrices or lacks compatible fused kernels.
|
| 155 |
+
Selector-path drift can reduce speculative acceptance even when target
|
| 156 |
+
verification preserves final-generation correctness. It also inherits the
|
| 157 |
+
target model's limitations and reduced refusal behavior. Users are responsible
|
| 158 |
+
for deployment safeguards, legal compliance, and generated content.
|
| 159 |
+
|
| 160 |
+
## License
|
| 161 |
+
|
| 162 |
+
Apache License 2.0. See [`LICENSE`](./LICENSE). All upstream notices and
|
| 163 |
+
attributions remain applicable.
|
config.json
ADDED
|
@@ -0,0 +1,113 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"DFlash2DraftModel"
|
| 4 |
+
],
|
| 5 |
+
"attention_bias": false,
|
| 6 |
+
"attention_dropout": 0.0,
|
| 7 |
+
"bos_token_id": null,
|
| 8 |
+
"dflash_config": {
|
| 9 |
+
"block_size": 8,
|
| 10 |
+
"conv_group_size": 16,
|
| 11 |
+
"conv_kernel_size": 2,
|
| 12 |
+
"mask_token_id": 248070,
|
| 13 |
+
"selector_rank": 256,
|
| 14 |
+
"selector_top_k": 16,
|
| 15 |
+
"target_layer_ids": [
|
| 16 |
+
5,
|
| 17 |
+
19,
|
| 18 |
+
33,
|
| 19 |
+
47,
|
| 20 |
+
61
|
| 21 |
+
]
|
| 22 |
+
},
|
| 23 |
+
"draft_vocab_size": 248320,
|
| 24 |
+
"dtype": "bfloat16",
|
| 25 |
+
"eos_token_id": 248044,
|
| 26 |
+
"head_dim": 128,
|
| 27 |
+
"hidden_act": "silu",
|
| 28 |
+
"hidden_size": 5120,
|
| 29 |
+
"initializer_range": 0.02,
|
| 30 |
+
"intermediate_size": 17408,
|
| 31 |
+
"is_causal": false,
|
| 32 |
+
"layer_types": [
|
| 33 |
+
"sliding_attention",
|
| 34 |
+
"sliding_attention",
|
| 35 |
+
"sliding_attention",
|
| 36 |
+
"sliding_attention",
|
| 37 |
+
"sliding_attention"
|
| 38 |
+
],
|
| 39 |
+
"max_position_embeddings": 262144,
|
| 40 |
+
"max_window_layers": 5,
|
| 41 |
+
"model_type": "qwen3",
|
| 42 |
+
"num_attention_heads": 32,
|
| 43 |
+
"num_hidden_layers": 5,
|
| 44 |
+
"num_key_value_heads": 8,
|
| 45 |
+
"num_target_layers": 64,
|
| 46 |
+
"pad_token_id": 248044,
|
| 47 |
+
"rms_norm_eps": 1e-06,
|
| 48 |
+
"rope_parameters": {
|
| 49 |
+
"rope_theta": 10000000,
|
| 50 |
+
"rope_type": "default"
|
| 51 |
+
},
|
| 52 |
+
"rope_theta": 10000000,
|
| 53 |
+
"sliding_window": 2048,
|
| 54 |
+
"tie_word_embeddings": false,
|
| 55 |
+
"transformers_version": "5.8.1",
|
| 56 |
+
"use_cache": true,
|
| 57 |
+
"use_sliding_window": true,
|
| 58 |
+
"vocab_size": 248320,
|
| 59 |
+
"quantization_config": {
|
| 60 |
+
"quant_method": "fp8",
|
| 61 |
+
"fmt": "e4m3",
|
| 62 |
+
"activation_scheme": "dynamic",
|
| 63 |
+
"weight_block_size": [
|
| 64 |
+
128,
|
| 65 |
+
128
|
| 66 |
+
],
|
| 67 |
+
"modules_to_not_convert": [
|
| 68 |
+
"fc",
|
| 69 |
+
"candidate_selector.hidden_projection",
|
| 70 |
+
"layers.0.self_attn.q_proj",
|
| 71 |
+
"layers.0.self_attn.k_proj",
|
| 72 |
+
"layers.0.self_attn.v_proj",
|
| 73 |
+
"layers.0.attention_conv.kernel_projection",
|
| 74 |
+
"layers.0.mlp_conv.kernel_projection",
|
| 75 |
+
"layers.0.self_attn.o_proj",
|
| 76 |
+
"layers.1.self_attn.q_proj",
|
| 77 |
+
"layers.1.self_attn.k_proj",
|
| 78 |
+
"layers.1.self_attn.v_proj",
|
| 79 |
+
"layers.1.attention_conv.kernel_projection",
|
| 80 |
+
"layers.1.mlp_conv.kernel_projection",
|
| 81 |
+
"layers.1.self_attn.o_proj",
|
| 82 |
+
"layers.2.self_attn.q_proj",
|
| 83 |
+
"layers.2.self_attn.k_proj",
|
| 84 |
+
"layers.2.self_attn.v_proj",
|
| 85 |
+
"layers.2.attention_conv.kernel_projection",
|
| 86 |
+
"layers.2.mlp_conv.kernel_projection",
|
| 87 |
+
"layers.2.self_attn.o_proj",
|
| 88 |
+
"layers.3.self_attn.q_proj",
|
| 89 |
+
"layers.3.self_attn.k_proj",
|
| 90 |
+
"layers.3.self_attn.v_proj",
|
| 91 |
+
"layers.3.attention_conv.kernel_projection",
|
| 92 |
+
"layers.3.mlp_conv.kernel_projection",
|
| 93 |
+
"layers.3.self_attn.o_proj",
|
| 94 |
+
"layers.4.self_attn.q_proj",
|
| 95 |
+
"layers.4.self_attn.k_proj",
|
| 96 |
+
"layers.4.self_attn.v_proj",
|
| 97 |
+
"layers.4.attention_conv.kernel_projection",
|
| 98 |
+
"layers.4.mlp_conv.kernel_projection",
|
| 99 |
+
"layers.4.self_attn.o_proj",
|
| 100 |
+
"model.fc",
|
| 101 |
+
"model.layers.64.self_attn.qkv_proj",
|
| 102 |
+
"model.layers.65.self_attn.qkv_proj",
|
| 103 |
+
"model.layers.66.self_attn.qkv_proj",
|
| 104 |
+
"model.layers.67.self_attn.qkv_proj",
|
| 105 |
+
"model.layers.68.self_attn.qkv_proj",
|
| 106 |
+
"model.layers.64.self_attn.o_proj",
|
| 107 |
+
"model.layers.65.self_attn.o_proj",
|
| 108 |
+
"model.layers.66.self_attn.o_proj",
|
| 109 |
+
"model.layers.67.self_attn.o_proj",
|
| 110 |
+
"model.layers.68.self_attn.o_proj"
|
| 111 |
+
]
|
| 112 |
+
}
|
| 113 |
+
}
|
crc32.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
".gitattributes": "e7fee763",
|
| 3 |
+
"FP8_EXPERIMENT_VALIDATION.md": "c98a9597",
|
| 4 |
+
"LICENSE": "d1f0e2df",
|
| 5 |
+
"README.md": "f147d01b",
|
| 6 |
+
"config.json": "a01c1b98",
|
| 7 |
+
"fp8_conversion_manifest.json": "8a828d1a",
|
| 8 |
+
"fp8_functional_validation.json": "ed798b59",
|
| 9 |
+
"fp8_loader_validation.json": "f594d40b",
|
| 10 |
+
"fp8_profile_ab_comparison.json": "74917788",
|
| 11 |
+
"fp8_structural_validation.json": "37f3bdb7",
|
| 12 |
+
"fp8_target_conditioned_validation.json": "3adf7278",
|
| 13 |
+
"model.safetensors": "ae0e162a"
|
| 14 |
+
}
|
fp8_conversion_manifest.json
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"source": "alphakek/Qwen3.8-27B-heretic-ara-DFlash2",
|
| 3 |
+
"output": "magiccodingman/Qwen3.8-27B-heretic-ara-DFlash2-fp8",
|
| 4 |
+
"profile": "mlp-only",
|
| 5 |
+
"format": "experimental selective native block-FP8 E4M3",
|
| 6 |
+
"weight_block_size": [
|
| 7 |
+
128,
|
| 8 |
+
128
|
| 9 |
+
],
|
| 10 |
+
"activation_scheme": "dynamic",
|
| 11 |
+
"scale_storage": "float32 weight_scale_inv",
|
| 12 |
+
"quantized_tensors": 15,
|
| 13 |
+
"quantized_modules": [
|
| 14 |
+
"layers.0.mlp.down_proj",
|
| 15 |
+
"layers.0.mlp.gate_proj",
|
| 16 |
+
"layers.0.mlp.up_proj",
|
| 17 |
+
"layers.1.mlp.down_proj",
|
| 18 |
+
"layers.1.mlp.gate_proj",
|
| 19 |
+
"layers.1.mlp.up_proj",
|
| 20 |
+
"layers.2.mlp.down_proj",
|
| 21 |
+
"layers.2.mlp.gate_proj",
|
| 22 |
+
"layers.2.mlp.up_proj",
|
| 23 |
+
"layers.3.mlp.down_proj",
|
| 24 |
+
"layers.3.mlp.gate_proj",
|
| 25 |
+
"layers.3.mlp.up_proj",
|
| 26 |
+
"layers.4.mlp.down_proj",
|
| 27 |
+
"layers.4.mlp.gate_proj",
|
| 28 |
+
"layers.4.mlp.up_proj"
|
| 29 |
+
],
|
| 30 |
+
"preserved_strategy": {
|
| 31 |
+
"qkv": "BF16; required by current DFlash fused context-KV precompute",
|
| 32 |
+
"fc": "BF16 target-hidden-state adapter",
|
| 33 |
+
"convolution": "BF16; runtime constructs these with quant_config=None",
|
| 34 |
+
"candidate_selector": "BF16; runtime constructs it with quant_config=None",
|
| 35 |
+
"norms_and_small_parameters": "BF16"
|
| 36 |
+
},
|
| 37 |
+
"source_tensor_entries": 81,
|
| 38 |
+
"output_tensor_entries": 96,
|
| 39 |
+
"output_tensor_bytes": 2512200960,
|
| 40 |
+
"torch_version": "2.13.0+cu130",
|
| 41 |
+
"python_version": "3.12.3"
|
| 42 |
+
}
|
fp8_functional_validation.json
ADDED
|
@@ -0,0 +1,152 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"status": "pass",
|
| 3 |
+
"profile": "mlp-only",
|
| 4 |
+
"comparison": "BF16 weights vs block-FP8 weights dequantized to BF16",
|
| 5 |
+
"input_distribution": "fixed-seed unit-normal BF16 vectors (RMSNorm-like)",
|
| 6 |
+
"samples_per_mlp": 64,
|
| 7 |
+
"samples_per_attention_output_projection": 128,
|
| 8 |
+
"mlp_aggregate": {
|
| 9 |
+
"rmse": 51.15606406613011,
|
| 10 |
+
"relative_rmse": 0.028808014285076088,
|
| 11 |
+
"cosine_similarity": 0.999586214895275,
|
| 12 |
+
"maximum_absolute_error": 1024.0
|
| 13 |
+
},
|
| 14 |
+
"attention_output_projection_aggregate": {
|
| 15 |
+
"rmse": 0.0,
|
| 16 |
+
"relative_rmse": 0.0,
|
| 17 |
+
"cosine_similarity": 1.0,
|
| 18 |
+
"maximum_absolute_error": 0.0
|
| 19 |
+
},
|
| 20 |
+
"gates": {
|
| 21 |
+
"mlp_relative_rmse_max": 0.1,
|
| 22 |
+
"mlp_cosine_similarity_min": 0.995,
|
| 23 |
+
"attention_relative_rmse_max": 0.05,
|
| 24 |
+
"attention_cosine_similarity_min": 0.998
|
| 25 |
+
},
|
| 26 |
+
"per_layer_mlp": [
|
| 27 |
+
{
|
| 28 |
+
"layer": 0,
|
| 29 |
+
"rmse": 46.944710713054484,
|
| 30 |
+
"relative_rmse": 0.02199275336409562,
|
| 31 |
+
"cosine_similarity": 0.9997595575772288,
|
| 32 |
+
"maximum_absolute_error": 1024.0,
|
| 33 |
+
"squared_error": 722143105.4933598,
|
| 34 |
+
"reference_energy": 1493014623467.2358,
|
| 35 |
+
"dot": 1489775007178.6418,
|
| 36 |
+
"candidate_energy": 1487257533995.5679,
|
| 37 |
+
"elements": 327680
|
| 38 |
+
},
|
| 39 |
+
{
|
| 40 |
+
"layer": 1,
|
| 41 |
+
"rmse": 51.91130504990165,
|
| 42 |
+
"relative_rmse": 0.031573682259121584,
|
| 43 |
+
"cosine_similarity": 0.9995025435310865,
|
| 44 |
+
"maximum_absolute_error": 1024.0,
|
| 45 |
+
"squared_error": 883026687.421299,
|
| 46 |
+
"reference_energy": 885774882473.856,
|
| 47 |
+
"dot": 883571172877.6316,
|
| 48 |
+
"candidate_energy": 882250489968.8706,
|
| 49 |
+
"elements": 327680
|
| 50 |
+
},
|
| 51 |
+
{
|
| 52 |
+
"layer": 2,
|
| 53 |
+
"rmse": 53.50805681930253,
|
| 54 |
+
"relative_rmse": 0.03490318748371408,
|
| 55 |
+
"cosine_similarity": 0.9993913110064463,
|
| 56 |
+
"maximum_absolute_error": 512.0,
|
| 57 |
+
"squared_error": 938184587.5352235,
|
| 58 |
+
"reference_energy": 770119488860.0505,
|
| 59 |
+
"dot": 768330396334.169,
|
| 60 |
+
"candidate_energy": 767479488395.8666,
|
| 61 |
+
"elements": 327680
|
| 62 |
+
},
|
| 63 |
+
{
|
| 64 |
+
"layer": 3,
|
| 65 |
+
"rmse": 51.742237285112125,
|
| 66 |
+
"relative_rmse": 0.038977179685573425,
|
| 67 |
+
"cosine_similarity": 0.9992402571060341,
|
| 68 |
+
"maximum_absolute_error": 384.0,
|
| 69 |
+
"squared_error": 877284268.2020159,
|
| 70 |
+
"reference_energy": 577456825572.1453,
|
| 71 |
+
"dot": 576257438543.1458,
|
| 72 |
+
"candidate_energy": 575935335782.396,
|
| 73 |
+
"elements": 327680
|
| 74 |
+
},
|
| 75 |
+
{
|
| 76 |
+
"layer": 4,
|
| 77 |
+
"rmse": 51.43689078790791,
|
| 78 |
+
"relative_rmse": 0.024536587190349065,
|
| 79 |
+
"cosine_similarity": 0.9997013312358347,
|
| 80 |
+
"maximum_absolute_error": 1024.0,
|
| 81 |
+
"squared_error": 866960583.5332537,
|
| 82 |
+
"reference_energy": 1440028343049.15,
|
| 83 |
+
"dot": 1436015671674.3086,
|
| 84 |
+
"candidate_energy": 1432869960883.038,
|
| 85 |
+
"elements": 327680
|
| 86 |
+
}
|
| 87 |
+
],
|
| 88 |
+
"per_layer_attention_output_projection": [
|
| 89 |
+
{
|
| 90 |
+
"layer": 0,
|
| 91 |
+
"rmse": 0.0,
|
| 92 |
+
"relative_rmse": 0.0,
|
| 93 |
+
"cosine_similarity": 1.0,
|
| 94 |
+
"maximum_absolute_error": 0.0,
|
| 95 |
+
"squared_error": 0.0,
|
| 96 |
+
"reference_energy": 33139259.3109601,
|
| 97 |
+
"dot": 33139259.3109601,
|
| 98 |
+
"candidate_energy": 33139259.3109601,
|
| 99 |
+
"elements": 655360
|
| 100 |
+
},
|
| 101 |
+
{
|
| 102 |
+
"layer": 1,
|
| 103 |
+
"rmse": 0.0,
|
| 104 |
+
"relative_rmse": 0.0,
|
| 105 |
+
"cosine_similarity": 1.0,
|
| 106 |
+
"maximum_absolute_error": 0.0,
|
| 107 |
+
"squared_error": 0.0,
|
| 108 |
+
"reference_energy": 41008694.364316456,
|
| 109 |
+
"dot": 41008694.364316456,
|
| 110 |
+
"candidate_energy": 41008694.364316456,
|
| 111 |
+
"elements": 655360
|
| 112 |
+
},
|
| 113 |
+
{
|
| 114 |
+
"layer": 2,
|
| 115 |
+
"rmse": 0.0,
|
| 116 |
+
"relative_rmse": 0.0,
|
| 117 |
+
"cosine_similarity": 1.0,
|
| 118 |
+
"maximum_absolute_error": 0.0,
|
| 119 |
+
"squared_error": 0.0,
|
| 120 |
+
"reference_energy": 47956004.669400826,
|
| 121 |
+
"dot": 47956004.669400826,
|
| 122 |
+
"candidate_energy": 47956004.669400826,
|
| 123 |
+
"elements": 655360
|
| 124 |
+
},
|
| 125 |
+
{
|
| 126 |
+
"layer": 3,
|
| 127 |
+
"rmse": 0.0,
|
| 128 |
+
"relative_rmse": 0.0,
|
| 129 |
+
"cosine_similarity": 1.0,
|
| 130 |
+
"maximum_absolute_error": 0.0,
|
| 131 |
+
"squared_error": 0.0,
|
| 132 |
+
"reference_energy": 54665058.895079024,
|
| 133 |
+
"dot": 54665058.895079024,
|
| 134 |
+
"candidate_energy": 54665058.895079024,
|
| 135 |
+
"elements": 655360
|
| 136 |
+
},
|
| 137 |
+
{
|
| 138 |
+
"layer": 4,
|
| 139 |
+
"rmse": 0.0,
|
| 140 |
+
"relative_rmse": 0.0,
|
| 141 |
+
"cosine_similarity": 1.0,
|
| 142 |
+
"maximum_absolute_error": 0.0,
|
| 143 |
+
"squared_error": 0.0,
|
| 144 |
+
"reference_energy": 76522649.49797027,
|
| 145 |
+
"dot": 76522649.49797027,
|
| 146 |
+
"candidate_energy": 76522649.49797027,
|
| 147 |
+
"elements": 655360
|
| 148 |
+
}
|
| 149 |
+
],
|
| 150 |
+
"limitation": "This validates selected sublayer arithmetic, not native W8A8 kernels or end-to-end DFlash2 acceptance. The current DFlash2 vLLM implementation is an unmerged experimental branch.",
|
| 151 |
+
"elapsed_seconds": 1.1974219349795021
|
| 152 |
+
}
|
fp8_loader_validation.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"status": "pass",
|
| 3 |
+
"loader": "dflash 0.1.0 / Transformers 5.15.0",
|
| 4 |
+
"architecture": "DFlash2DraftModel",
|
| 5 |
+
"parameters": 1924404480,
|
| 6 |
+
"checkpoint": "selective native block-FP8 with BF16 preserved modules",
|
| 7 |
+
"test_hardware": "NVIDIA RTX 3090 (SM 8.6)",
|
| 8 |
+
"observed_behavior": "Transformers loaded all 81 source tensors and dequantized serialized FP8 matrices to BF16 because SM 8.6 lacks native W8A8 FP8.",
|
| 9 |
+
"module_routing": {
|
| 10 |
+
"mlp_gate_projection_after_load": "bfloat16 (dequantized from FP8)",
|
| 11 |
+
"q_projection_after_load": "bfloat16 (preserved)",
|
| 12 |
+
"candidate_selector_projection_after_load": "bfloat16 (preserved)"
|
| 13 |
+
},
|
| 14 |
+
"limitation": "This confirms checkpoint/metadata compatibility, not native FP8 kernel execution."
|
| 15 |
+
}
|
fp8_profile_ab_comparison.json
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"decision": "select mlp-only profile",
|
| 3 |
+
"reason": "Preserving attention output projections costs approximately 105 MB but improves proposal KL, top-1 agreement, and hidden-state fidelity.",
|
| 4 |
+
"profiles": {
|
| 5 |
+
"mlp_plus_attention_output_fp8": {
|
| 6 |
+
"tensor_payload_bytes": 2407368960,
|
| 7 |
+
"quantized_matrices": 20,
|
| 8 |
+
"proposal_kl_mean": 0.0026533013419426316,
|
| 9 |
+
"proposal_top1_agreement": 0.9285714030265808,
|
| 10 |
+
"top16_candidate_overlap": 0.9754464285714286,
|
| 11 |
+
"draft_hidden_relative_rmse": 0.03659051767294803,
|
| 12 |
+
"draft_hidden_cosine_similarity": 0.9993306398391724,
|
| 13 |
+
"selector_path_token_agreement": 0.8571429252624512
|
| 14 |
+
},
|
| 15 |
+
"mlp_only_fp8": {
|
| 16 |
+
"tensor_payload_bytes": 2512200960,
|
| 17 |
+
"quantized_matrices": 15,
|
| 18 |
+
"proposal_kl_mean": 0.0018929995239503794,
|
| 19 |
+
"proposal_top1_agreement": 0.9642857313156128,
|
| 20 |
+
"top16_candidate_overlap": 0.9765625,
|
| 21 |
+
"draft_hidden_relative_rmse": 0.03063499420217177,
|
| 22 |
+
"draft_hidden_cosine_similarity": 0.9995341897010803,
|
| 23 |
+
"selector_path_token_agreement": 0.8571429252624512
|
| 24 |
+
}
|
| 25 |
+
}
|
| 26 |
+
}
|
fp8_structural_validation.json
ADDED
|
@@ -0,0 +1,193 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"status": "pass",
|
| 3 |
+
"profile": "mlp-only",
|
| 4 |
+
"source_tensor_entries": 81,
|
| 5 |
+
"candidate_tensor_entries": 101,
|
| 6 |
+
"quantized_tensors": 15,
|
| 7 |
+
"preserved_tensors_byte_equivalent": 66,
|
| 8 |
+
"aggregate_rmse": 0.00343747144092223,
|
| 9 |
+
"aggregate_relative_rmse": 0.026455517670677747,
|
| 10 |
+
"worst_relative_rmse_tensors": [
|
| 11 |
+
{
|
| 12 |
+
"tensor": "layers.3.mlp.gate_proj.weight",
|
| 13 |
+
"shape": [
|
| 14 |
+
17408,
|
| 15 |
+
5120
|
| 16 |
+
],
|
| 17 |
+
"rmse": 0.0032719125529877802,
|
| 18 |
+
"relative_rmse": 0.026461520725813415,
|
| 19 |
+
"maximum_absolute_error": 0.045758962631225586,
|
| 20 |
+
"scale_min": 0.0009940011659637094,
|
| 21 |
+
"scale_max": 0.0035923549439758062
|
| 22 |
+
},
|
| 23 |
+
{
|
| 24 |
+
"tensor": "layers.0.mlp.gate_proj.weight",
|
| 25 |
+
"shape": [
|
| 26 |
+
17408,
|
| 27 |
+
5120
|
| 28 |
+
],
|
| 29 |
+
"rmse": 0.003276958150145669,
|
| 30 |
+
"relative_rmse": 0.026461051027726844,
|
| 31 |
+
"maximum_absolute_error": 0.03962057828903198,
|
| 32 |
+
"scale_min": 0.0010157993528991938,
|
| 33 |
+
"scale_max": 0.003383091650903225
|
| 34 |
+
},
|
| 35 |
+
{
|
| 36 |
+
"tensor": "layers.2.mlp.up_proj.weight",
|
| 37 |
+
"shape": [
|
| 38 |
+
17408,
|
| 39 |
+
5120
|
| 40 |
+
],
|
| 41 |
+
"rmse": 0.0035662104279010677,
|
| 42 |
+
"relative_rmse": 0.02646011386372461,
|
| 43 |
+
"maximum_absolute_error": 0.04241067171096802,
|
| 44 |
+
"scale_min": 0.0010681153507903218,
|
| 45 |
+
"scale_max": 0.004202706273645163
|
| 46 |
+
},
|
| 47 |
+
{
|
| 48 |
+
"tensor": "layers.4.mlp.gate_proj.weight",
|
| 49 |
+
"shape": [
|
| 50 |
+
17408,
|
| 51 |
+
5120
|
| 52 |
+
],
|
| 53 |
+
"rmse": 0.00329046166073514,
|
| 54 |
+
"relative_rmse": 0.026459302783789097,
|
| 55 |
+
"maximum_absolute_error": 0.03348219394683838,
|
| 56 |
+
"scale_min": 0.0009722027461975813,
|
| 57 |
+
"scale_max": 0.003383091650903225
|
| 58 |
+
},
|
| 59 |
+
{
|
| 60 |
+
"tensor": "layers.4.mlp.up_proj.weight",
|
| 61 |
+
"shape": [
|
| 62 |
+
17408,
|
| 63 |
+
5120
|
| 64 |
+
],
|
| 65 |
+
"rmse": 0.0035572689212522556,
|
| 66 |
+
"relative_rmse": 0.02645898389165941,
|
| 67 |
+
"maximum_absolute_error": 0.03627234697341919,
|
| 68 |
+
"scale_min": 0.0010637555969879031,
|
| 69 |
+
"scale_max": 0.003069196594879031
|
| 70 |
+
},
|
| 71 |
+
{
|
| 72 |
+
"tensor": "layers.1.mlp.up_proj.weight",
|
| 73 |
+
"shape": [
|
| 74 |
+
17408,
|
| 75 |
+
5120
|
| 76 |
+
],
|
| 77 |
+
"rmse": 0.0035208753277019625,
|
| 78 |
+
"relative_rmse": 0.02645866599872885,
|
| 79 |
+
"maximum_absolute_error": 0.037946462631225586,
|
| 80 |
+
"scale_min": 0.0010550363222137094,
|
| 81 |
+
"scale_max": 0.0031912666745483875
|
| 82 |
+
},
|
| 83 |
+
{
|
| 84 |
+
"tensor": "layers.0.mlp.up_proj.weight",
|
| 85 |
+
"shape": [
|
| 86 |
+
17408,
|
| 87 |
+
5120
|
| 88 |
+
],
|
| 89 |
+
"rmse": 0.0032898814757157777,
|
| 90 |
+
"relative_rmse": 0.026457355227407442,
|
| 91 |
+
"maximum_absolute_error": 0.03236609697341919,
|
| 92 |
+
"scale_min": 0.0010157993528991938,
|
| 93 |
+
"scale_max": 0.002947126282379031
|
| 94 |
+
},
|
| 95 |
+
{
|
| 96 |
+
"tensor": "layers.2.mlp.down_proj.weight",
|
| 97 |
+
"shape": [
|
| 98 |
+
5120,
|
| 99 |
+
17408
|
| 100 |
+
],
|
| 101 |
+
"rmse": 0.003520015099063686,
|
| 102 |
+
"relative_rmse": 0.026456624226654197,
|
| 103 |
+
"maximum_absolute_error": 0.10491061210632324,
|
| 104 |
+
"scale_min": 0.0010811942629516125,
|
| 105 |
+
"scale_max": 0.0110909603536129
|
| 106 |
+
},
|
| 107 |
+
{
|
| 108 |
+
"tensor": "layers.3.mlp.up_proj.weight",
|
| 109 |
+
"shape": [
|
| 110 |
+
17408,
|
| 111 |
+
5120
|
| 112 |
+
],
|
| 113 |
+
"rmse": 0.0035803991978373777,
|
| 114 |
+
"relative_rmse": 0.026455870434037503,
|
| 115 |
+
"maximum_absolute_error": 0.04464280605316162,
|
| 116 |
+
"scale_min": 0.0010506765684112906,
|
| 117 |
+
"scale_max": 0.00537109375
|
| 118 |
+
},
|
| 119 |
+
{
|
| 120 |
+
"tensor": "layers.0.mlp.down_proj.weight",
|
| 121 |
+
"shape": [
|
| 122 |
+
5120,
|
| 123 |
+
17408
|
| 124 |
+
],
|
| 125 |
+
"rmse": 0.003413225732495426,
|
| 126 |
+
"relative_rmse": 0.026454801653551588,
|
| 127 |
+
"maximum_absolute_error": 0.20089268684387207,
|
| 128 |
+
"scale_min": 0.0010114397155120969,
|
| 129 |
+
"scale_max": 0.01736886240541935
|
| 130 |
+
},
|
| 131 |
+
{
|
| 132 |
+
"tensor": "layers.1.mlp.gate_proj.weight",
|
| 133 |
+
"shape": [
|
| 134 |
+
17408,
|
| 135 |
+
5120
|
| 136 |
+
],
|
| 137 |
+
"rmse": 0.003344292283514903,
|
| 138 |
+
"relative_rmse": 0.02645373161442601,
|
| 139 |
+
"maximum_absolute_error": 0.032924115657806396,
|
| 140 |
+
"scale_min": 0.0009852817747741938,
|
| 141 |
+
"scale_max": 0.0031738278921693563
|
| 142 |
+
},
|
| 143 |
+
{
|
| 144 |
+
"tensor": "layers.2.mlp.gate_proj.weight",
|
| 145 |
+
"shape": [
|
| 146 |
+
17408,
|
| 147 |
+
5120
|
| 148 |
+
],
|
| 149 |
+
"rmse": 0.0033150167877642202,
|
| 150 |
+
"relative_rmse": 0.026452570119492928,
|
| 151 |
+
"maximum_absolute_error": 0.03459817171096802,
|
| 152 |
+
"scale_min": 0.0009809221373870969,
|
| 153 |
+
"scale_max": 0.003313336754217744
|
| 154 |
+
},
|
| 155 |
+
{
|
| 156 |
+
"tensor": "layers.3.mlp.down_proj.weight",
|
| 157 |
+
"shape": [
|
| 158 |
+
5120,
|
| 159 |
+
17408
|
| 160 |
+
],
|
| 161 |
+
"rmse": 0.0035649403766182847,
|
| 162 |
+
"relative_rmse": 0.026452033474464075,
|
| 163 |
+
"maximum_absolute_error": 0.07589280605316162,
|
| 164 |
+
"scale_min": 0.0010811942629516125,
|
| 165 |
+
"scale_max": 0.01318359375
|
| 166 |
+
},
|
| 167 |
+
{
|
| 168 |
+
"tensor": "layers.1.mlp.down_proj.weight",
|
| 169 |
+
"shape": [
|
| 170 |
+
5120,
|
| 171 |
+
17408
|
| 172 |
+
],
|
| 173 |
+
"rmse": 0.003493047765345981,
|
| 174 |
+
"relative_rmse": 0.02644884647564942,
|
| 175 |
+
"maximum_absolute_error": 0.16741085052490234,
|
| 176 |
+
"scale_min": 0.0010463169310241938,
|
| 177 |
+
"scale_max": 0.01311383955180645
|
| 178 |
+
},
|
| 179 |
+
{
|
| 180 |
+
"tensor": "layers.4.mlp.down_proj.weight",
|
| 181 |
+
"shape": [
|
| 182 |
+
5120,
|
| 183 |
+
17408
|
| 184 |
+
],
|
| 185 |
+
"rmse": 0.0035265503863780205,
|
| 186 |
+
"relative_rmse": 0.02644285322798197,
|
| 187 |
+
"maximum_absolute_error": 0.30803585052490234,
|
| 188 |
+
"scale_min": 0.0010375975398346782,
|
| 189 |
+
"scale_max": 0.0203683041036129
|
| 190 |
+
}
|
| 191 |
+
],
|
| 192 |
+
"elapsed_seconds": 8.807376893004403
|
| 193 |
+
}
|
fp8_target_conditioned_validation.json
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"status": "pass",
|
| 3 |
+
"comparison": "BF16 DFlash2 vs selective block-FP8 weights dequantized to BF16",
|
| 4 |
+
"samples": 8,
|
| 5 |
+
"draft_positions": 56,
|
| 6 |
+
"proposal_kl_mean": 0.0018929995239503794,
|
| 7 |
+
"proposal_kl_median": 0.001594925176043174,
|
| 8 |
+
"proposal_kl_p95": 0.00300999847240746,
|
| 9 |
+
"proposal_kl_max": 0.008521616478903316,
|
| 10 |
+
"proposal_top1_agreement": 0.9642857313156128,
|
| 11 |
+
"selector_path_token_agreement": 0.8571429252624512,
|
| 12 |
+
"selector_full_path_agreement": 0.75,
|
| 13 |
+
"top16_candidate_overlap": 0.9765625,
|
| 14 |
+
"draft_hidden_relative_rmse": 0.03063499420217177,
|
| 15 |
+
"draft_hidden_cosine_similarity": 0.9995341897010803,
|
| 16 |
+
"teacher_mean_forward_seconds": 0.20252476473979186,
|
| 17 |
+
"student_mean_forward_seconds": 0.5098142223869218,
|
| 18 |
+
"per_sample_selector_token_agreement": [
|
| 19 |
+
1.0,
|
| 20 |
+
1.0,
|
| 21 |
+
1.0,
|
| 22 |
+
1.0,
|
| 23 |
+
0.0,
|
| 24 |
+
1.0,
|
| 25 |
+
0.8571429252624512,
|
| 26 |
+
1.0
|
| 27 |
+
],
|
| 28 |
+
"gates": {
|
| 29 |
+
"proposal_kl_mean_max": 0.02,
|
| 30 |
+
"proposal_top1_agreement_min": 0.9,
|
| 31 |
+
"selector_path_token_agreement_min": 0.85,
|
| 32 |
+
"top16_candidate_overlap_min": 0.95
|
| 33 |
+
},
|
| 34 |
+
"limitation": "RTX 3090 dequantizes FP8 weights to BF16. This test uses real target hidden states and the exact target LM head, but it is not an end-to-end native W8A8 throughput or acceptance benchmark."
|
| 35 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ed5b3094c9053e5f2f1ad7b627a7a8a03c625a895764f207e24e3d7a251831e8
|
| 3 |
+
size 2512211456
|
sha256sums.txt
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
11ff11c17855fe892f860ae8c70826e37d9896b64be00b6d160013251ca05042 .gitattributes
|
| 2 |
+
57c78c3d388dbfa935a3616fa9753c3eda0b2a99b61b57f8994b6048643776a5 FP8_EXPERIMENT_VALIDATION.md
|
| 3 |
+
bbedc3fda3305820b977265f01b8619d87570a6739de3a5582c3464840f1e57a LICENSE
|
| 4 |
+
2ae70a182d4bf17b713cb257781b111351a6eea30c851d45743925461c2d5a2f README.md
|
| 5 |
+
1d090c2168d81d39a5e843f075c6580e35471a483beeccca0364ef90f2dfcaf6 config.json
|
| 6 |
+
26833387c027b6d912ed37c73b64f3787e9773ac5134a5707883183b6182d8f7 fp8_conversion_manifest.json
|
| 7 |
+
736e45fd77c01dd239edddb7c263b9fd49ce9e922747f95771bdb0d88a373a7a fp8_functional_validation.json
|
| 8 |
+
c9a30167cd4c7b2b339858d2f3ecd212749697ce1c4ace06c1b9439f2d4e66b8 fp8_loader_validation.json
|
| 9 |
+
8f5415ff010c0329cad78cf01b80086334314916858f1a88e63330a856c7031f fp8_profile_ab_comparison.json
|
| 10 |
+
22a7a1eb32257e44990596e073c954c216878b817721868a61e306501d581d23 fp8_structural_validation.json
|
| 11 |
+
a08735e0c8727b7ac7ed35f772cd360bf50a8da7f203491d50d2bd519730d79d fp8_target_conditioned_validation.json
|
| 12 |
+
ed5b3094c9053e5f2f1ad7b627a7a8a03c625a895764f207e24e3d7a251831e8 model.safetensors
|