# Smoke-test fixtures

## Status: EXTRACTED and verified

| File | Source | Format | Actual size | Vendored in repo? |
|---|---|---|---:|---|
| `TinyLlama_layer3_q_proj.bin` | `model.layers.3.self_attn.q_proj.weight` from TinyLlama-1.1B-Chat-v1.0 (rev `fe8a4eaa`) | bf16 raw byte stream | 8,388,608 B (8 MiB) | yes |
| `Llama32_3B_layer14_gate.q4k.bin` | `blk.14.ffn_gate.weight` from `bartowski/Llama-3.2-3B-Instruct-GGUF` | Q4_K packed-block stream (98,304 blocks × 144 B) | 14,155,776 B (13.5 MiB) | yes |
| `Qwen2.5-0.5B-Q4_K_M.gguf` | full file from `bartowski/Qwen2.5-0.5B-Instruct-GGUF` | GGUF Q4_K_M | 397,808,192 B (379 MiB) | **no** — too big for GitHub (100 MB limit); served at `https://knowva.ai/CompressionV4/fixtures/Qwen2.5-0.5B-Q4_K_M.gguf`. The smoke-test script auto-fetches from the mirror if missing. |

Spec Appendix A.4 listed approximate sizes (4 MB / 5 MB / 396 MB) for the three fixtures; the actual extracted sizes are 8 MiB / 13.5 MiB / 379 MiB. The bigger bf16 / Q4_K fixtures reflect the source tensor shapes: TinyLlama q_proj layer 3 is 2048×2048 elements (= 8 MiB at bf16), and Llama-3.2-3B ffn_gate layer 14 is 25,165,824 packed Q4_K elements (= 14 MiB at Q4_K's 4.5 bits/elem). The Qwen GGUF is 379 MiB (= 397.8 MB), close to the 396 MB approximation in the spec.

## Roundtrip-verified checksums

See `../manifest/expected-checksums.json` for the three sha256[:16] prefixes that
`../reproducibility_smoke_test.sh` checks against. All three method runs are
byte-exact roundtrip-verified before the hash is taken.

## Re-extraction recipe

```python
# 1. TinyLlama bf16 q_proj — from safetensors
from safetensors.torch import load_file
import torch
state = load_file("path/to/TinyLlama_model.safetensors")
t = state["model.layers.3.self_attn.q_proj.weight"].to(torch.bfloat16).contiguous()
bf16_bytes = t.view(torch.uint8).cpu().numpy().tobytes()
open("TinyLlama_layer3_q_proj.bin", "wb").write(bf16_bytes)

# 2. Llama-3.2-3B Q4_K layer 14 ffn_gate — from GGUF
import gguf
reader = gguf.GGUFReader("path/to/Llama-3.2-3B-Instruct-Q4_K_M.gguf")
for t in reader.tensors:
    if t.name == "blk.14.ffn_gate.weight":
        open("Llama32_3B_layer14_gate.q4k.bin", "wb").write(t.data.tobytes())
        break

# 3. Qwen2.5-0.5B GGUF — direct copy
import shutil
shutil.copy("path/to/Qwen2.5-0.5B-Instruct-Q4_K_M.gguf", "Qwen2.5-0.5B-Q4_K_M.gguf")
```
