vmlinux's picture
Document DFlash conversion and ROCm benchmarks
9796a93 verified
|
Raw
History Blame Contribute Delete
4.02 kB
# Muse-Glimmer-30B ROCmFPX build
## Pinned inputs
- Hugging Face model: `meta-models/Muse-Glimmer-30B`
- Model revision: `f84ecc3a0ea984a4c04542a84269e3d065350a6e`
- Hugging Face drafter: `meta-models/Muse-Glimmer-30B-assistant`
- Drafter revision: `2c86316d689027b91123638739743fef1d425233`
- ROCmFPX base: `00d54526e24e3aba4c76474e3147cbf9c7cc034c`
- Upstream Muse support: `62bf73d25c53b8161f8a22894d4f90c4aebbd7d0`
- Upstream converter worktree: `d2f83055dca6dd009d8a52bdff792fbb286f4444`
- Converter environment: Python venv with `transformers==5.15.0`
- Target GPU: AMD Strix Halo, `gfx1151`
The toolchain directory is an uncommitted worktree based on ROCmFPX with the
upstream Muse support adapted to the older ROCmFPX APIs. It does not alter the
canonical `/home/vmlinux/models/llama.cpp` checkout or build.
## Deliverables
| Artifact label | Quantizer preset | Intent |
| --- | --- | --- |
| ROCmFP4 | `Q4_0_ROCMFP4_STRIX` | Strix Halo speed/quality recipe; dual-scale FP4 attention K/V and Q6_K token embeddings |
| ROCmFP8 | `Q8_0_ROCMFPX` | High-fidelity 8.25-bpw reference layout |
| ROCmFP4-Q6-QUALITY | `Q4_0_ROCMFP4_COHERENT` | Dual-scale FP4 body with Q6_K token embeddings for the coherence-biased quality build |
| DFlash ROCmFP4 | `Q4_0_ROCMFP4_STRIX` | Small, speed-oriented official DFlash companion; recommended on Strix Halo |
| DFlash ROCmFP8 | `Q8_0_ROCMFPX` | Higher-precision DFlash reference for acceptance and hardware tuning |
The two FP4 builds use a 500-chunk importance matrix generated from the local
`narrative-general-imatrix-sample.txt` corpus. This supplies varied prose,
reasoning, and general-language activations; the coherence preset itself
provides the agent/tool-oriented tensor routing. The FP8 reference does not
need an importance matrix because its preset does not consume importance
weights.
The DFlash drafters do not use the main-model iMatrix. They are quantized from
the official assistant checkpoint, and the FP4 conversion keeps the feature
fusion `fc.weight` at Q8_0 as a precision floor.
## Paths
- Source snapshot: `source/Muse-Glimmer-30B/`
- DFlash source snapshot: `source/Muse-Glimmer-30B-assistant/`
- BF16 text model and projector: `intermediate/`
- Importance matrix: `calibration/`
- Final models: `artifacts/`
- Logs and checksums: `logs/` and `manifests/`
## Conversion and quantization outline
```bash
.venv/bin/python converter-upstream/convert_hf_to_gguf.py source/Muse-Glimmer-30B \
--outtype bf16 --outfile intermediate/Muse-Glimmer-30B-BF16.gguf
.venv/bin/python converter-upstream/convert_hf_to_gguf.py source/Muse-Glimmer-30B \
--mmproj --outtype bf16 \
--outfile intermediate/mmproj-Muse-Glimmer-30B-BF16.gguf
toolchain/build-muse-rocmfpx/bin/llama-quantize \
--imatrix calibration/Muse-Glimmer-30B-narrative-general.imatrix \
intermediate/Muse-Glimmer-30B-BF16.gguf \
artifacts/Muse-Glimmer-30B-ROCmFP4.gguf Q4_0_ROCMFP4_STRIX
toolchain/build-muse-rocmfpx/bin/llama-quantize \
intermediate/Muse-Glimmer-30B-BF16.gguf \
artifacts/Muse-Glimmer-30B-ROCmFP8.gguf Q8_0_ROCMFPX
toolchain/build-muse-rocmfpx/bin/llama-quantize \
--imatrix calibration/Muse-Glimmer-30B-narrative-general.imatrix \
intermediate/Muse-Glimmer-30B-BF16.gguf \
artifacts/Muse-Glimmer-30B-ROCmFP4-Q6-QUALITY.gguf \
Q4_0_ROCMFP4_COHERENT
.venv/bin/python toolchain/scripts/convert_hf_to_gguf_modular.py \
source/Muse-Glimmer-30B-assistant \
--target-model-dir source/Muse-Glimmer-30B \
--outtype bf16 \
--outfile intermediate/Muse-Glimmer-30B-DFlash-BF16.gguf
toolchain/build-muse-rocmfpx/bin/llama-quantize \
intermediate/Muse-Glimmer-30B-DFlash-BF16.gguf \
artifacts/Muse-Glimmer-30B-DFlash-ROCmFP4.gguf \
Q4_0_ROCMFP4_STRIX
toolchain/build-muse-rocmfpx/bin/llama-quantize \
intermediate/Muse-Glimmer-30B-DFlash-BF16.gguf \
artifacts/Muse-Glimmer-30B-DFlash-ROCmFP8.gguf \
Q8_0_ROCMFPX
```
Exact tensor inventories, sizes, checksums, and smoke-test results are in
`BUILD_RESULTS.md` and `manifests/SHA256SUMS`.