LabOpen-v1 / MERGE_REPORT.md
HoomanBio's picture
Update MERGE_REPORT.md
5edf95e verified
|
Raw History Blame Contribute Delete
3.17 kB
# Merge Report — LabOpen v1 merged FP8 weights
This document records how the merged full-weight checkpoint in this repository was produced from the LoRA adapter, and how it was verified. Internal filesystem paths are omitted; digests are reproduced verbatim from the training run.
## Method
Per target module (LoRA r=4, alpha=4, scaling 1.0, 496 modules = 400 blockwise-FP8 + 96 BF16):
1. Dequantize base weight: `W = codes * scale` per 128x128 block (FP32)
2. Add LoRA delta: `W_merged = W + (B @ A) * scaling`
3. Re-quantize per 128x128 block: `scale = amax(|block|)/448`, codes clamped to +-448 (e4m3)
Non-target tensors are byte-copies of the base. Tensor layout, shard split and file format are identical to the base FP8 release.
## Provenance
- Trainable digest (checkpoint B): `96ef57e87e0d64de0340f9b917f4b9a7276356908bc6a5a7e59caa594bf68e03`
- FP8 modules merged: 400; BF16 modules merged: 96; override tensors written: 896 (400 weights + 400 scales + 96 weights)
- Total checkpoint size: 30,866,663,264 bytes
## Re-quantization error (vs exact FP32 merged weights)
- Mean relative error: 0.330%
- Max relative error: 1.00 (isolated near-zero elements; same order as the FP8 storage noise the base itself carries)
## Output-equivalence probes (greedy, 3 prompts x 48 tokens)
A. In-memory merged model vs adapter (scales in FP32):
| Prompt | Prefix-equal tokens | Token match |
|---|---|---|
| A 2 kg block slides down a frictionless ... | 41/48 | 87.5% |
| def quicksort(arr):
if len(arr) <= 1... | 48/48 | 100.0% |
| Water flows at 3 m/s through a pipe of d... | 1/48 | 4.2% |
B. **Saved-and-reloaded checkpoint (the published artifact, scales serialized BF16) vs adapter — release gate:**
| Prompt | Prefix-equal tokens | Token match |
|---|---|---|
| prompt 0 | 48/48 | 100.0% |
| prompt 1 | 48/48 | 100.0% |
| prompt 2 | 48/48 | 100.0% |
**Gate result: PASSED — 3/3 prompts, 144/144 tokens identical to the adapter trajectory.**
## Shard SHA-256
| File | SHA-256 | Bytes |
|---|---|---|
| `model-00001-of-00007.safetensors` | `3eeeab65368b86c1eec3582495f5367c9a6a6ac25f0857adbe7f8026ea322d3f` | 3,969,317,448 |
| `model-00002-of-00007.safetensors` | `7091dbd7077b8d19bb547eaf24997ec3c2b6b0acef8f2678f1a7a6a15c212a3e` | 4,939,321,704 |
| `model-00003-of-00007.safetensors` | `7ec75e6485b732125098c0080669ddbcef007be82bd6830a07e566b9a9ee3264` | 4,939,863,424 |
| `model-00004-of-00007.safetensors` | `44fef978664d99a87d6c4e5826e51486eb4e28788ca791b694b29430432a12fe` | 4,971,328,696 |
| `model-00005-of-00007.safetensors` | `f815eef9e6ed5194fdc0ac7412ad29019661ca6062bcd454fb4ce341834e29a4` | 4,955,596,064 |
| `model-00006-of-00007.safetensors` | `d2de7016e251a68f0a7ba2c49615c243c20ad87dfaacca252d6b2c0277f5fbbb` | 4,071,440,632 |
| `model-00007-of-00007.safetensors` | `1bed352a0625d22dc606de47fd3563f24fd9fa73915c4ddffe7947c4b56c28bf` | 3,019,999,168 |
## Notes
- The adapter (`adapter/`) remains the numerically exact training artifact; the merged checkpoint adds only the measured re-quantization error above.
- Probes ran on the training stack runtime (identical kernels to the serving configuration used for evaluation).