Granite: four scalar multipliers, and what a negative control cannot see
Ran Tao (Octoryn Research)
摘要
Sovereign port (no vendor dense-matmul library) of IBM Granite-3.1-2B to a ROCm dense engine, validated for f16 prefill-logits parity vs a Hugging Face transformers oracle: cosine 0.999997 with full argmax match on a consumer RDNA2-class GPU. The forward is a standard Llama-style stack plus four scalar multipliers (embedding, residual, attention, logits). Negative controls show embedding, residual, and attention multipliers are load-bearing; disabling the global logits multiplier still passes — invariance of cosine/argmax, not proof of irrelevance. A small-sample correctness smoke test only.
本 Research Object 以其原始语言(英文)发表。
1. Contribution
Claimed. A sovereign (no vendor dense-matmul library) port of IBM Granite-3.1-2B to a ROCm dense inference engine reproduces Hugging Face f16 prefill logits at cosine 0.999997, argmax matching on every measured token position on an AMD RDNA2-class consumer GPU. The architectural feature isolated and validated is a set of four scalar multipliers woven through an otherwise standard Llama-style forward (dense, GQA, RMSNorm, RoPE, tied embeddings): one applied after the token embedding, one on each residual add, one replacing the conventional attention scaling, and one applied to the final logits, all reusing a single in-place f16 scaling path. Negative controls demonstrate that the embedding, residual, and attention multipliers are load-bearing.
NOT claimed. This is a correctness-validation result, not a novel algorithm and not a generation-quality, throughput, or benchmark-scale evaluation. Parity of logits is not parity of generated text quality. The note makes no probability-calibration claim; indeed it documents that the logits multiplier is invisible to the parity metrics used (see Ablations). Results are bounded to Granite-3.1-2B at f16 on the tested RDNA2 GPU class and do not extend to larger Granite variants, the MoE Granite line, other quantizations, or other families. The altitude is honest: an engineering port verified against an oracle on a small correctness smoke test.
2. Methods
| Field | Value |
|---|---|
| Hardware | AMD RDNA2-class consumer GPU (16 GB) |
| Stack / versions | ROCm dense inference engine; a recent transformers release (exact version not recorded in source notes) |
| Oracle / baseline | Hugging Face transformers forward, identical token ids, same weights |
| Procedure | Direct HF f16 prefill-logits parity; per-position cosine + argmax over the measured token positions; plus four negative-control runs each disabling one multiplier |
| Precision | f16 (engine's highest-precision path) |
| Metric + gate | Per-position cosine similarity and argmax match; pass = high cosine + full argmax match (explicit numeric gate threshold not recorded in source notes) |
| Stimulus / inputs | A small fixed set of token positions (prompt text / count of prompts not recorded in source notes) |
3. Results
| Measurement | Value |
|---|---|
| f16 logit cosine vs transformers | 0.999997 |
| argmax match | full (every measured position) |
The forward pass carries four scalar multipliers applied, respectively, after the token embedding, on each residual add, in place of the conventional attention scaling, and on the final logits before the LM head. The specific constants are part of the proprietary port and are abstracted out here; their roles, not their values, are what the ablations characterize.
4. Ablations / Negative controls
| Control | Action | Outcome | Interpretation |
|---|---|---|---|
| Disable embedding multiplier | embedding scalar off | FAIL | load-bearing |
| Disable residual multiplier | residual scalar off | FAIL | load-bearing |
| Disable attention multiplier | attention scalar off | FAIL | load-bearing |
| Disable logits multiplier | final-logits scalar off | PASS (honest) | metric is invariant to it |
The passing logits-multiplier control is the methodological core of this note. A global scalar applied to the final logits scales every logit equally; it changes neither the direction of the logit vector (cosine) nor the position of the maximum (argmax). The multiplier is real and affects absolute logit magnitudes and calibrated probabilities, but the parity metrics literally cannot see it. A passing negative control does not always prove a component irrelevant — it can mean the metric is invariant to it.
5. Threats to validity / Limitations
- Sample size. A small fixed set of token positions on an unrecorded number of prompts is a correctness smoke test, not a benchmark-scale evaluation. The exact prompt(s) and prompt count are not recorded in the source notes.
- Parity != quality. Logit cosine/argmax parity says nothing about generation quality, coherence over long contexts, or downstream task accuracy.
- Metric blind spot, named explicitly. The chosen metrics (cosine, argmax) are invariant to a global logit scalar, so the passing logits-multiplier control cannot verify that multiplier. This is a property of the evaluation, not evidence the multiplier is unnecessary.
- Precision ceiling. f16 is the engine's highest-precision path; there is no f32 reference forward inside the engine, so residual sub-f16-ULP disagreements are irreducible here. cosine 0.999997 (not 1.0) is consistent with f16 rounding.
- Single-run / no variance. Parity is reported as point values with no repetition or variance characterization.
- Scope / quantization bounds. Validated only for Granite-3.1-2B at f16 on the tested RDNA2 GPU class. No claim for larger Granite, MoE Granite, other quantizations, or other hardware.
- Gate threshold not recorded. The exact numeric pass gate for cosine is not recorded in the source notes; "PASS/FAIL" outcomes are carried from the source's reported verdicts.
- evidenceLevel. Retained as "experimental"; the limitations above (small sample, single-run) are the honest qualifiers and are not silently upgraded.
6. Reproducibility / Provenance
| Item | Value |
|---|---|
| Build / run | Standard ROCm offline compilation against the HIP runtime for the target GPU architecture |
| Version pins | a recent transformers release; exact version not recorded in source notes |
| Oracle caveat | Validate that the HF oracle loads the real weights with identical token ids before trusting parity |
| Sovereignty | Links against the HIP runtime and system libraries only (no vendor BLAS / dense-matmul / DNN / MKL libraries) |
Procedure to reproduce in spirit: load Granite-3.1-2B at f16 in both the engine and transformers with identical token ids, dump per-position logits, compute cosine + argmax over the measured positions, then re-run with each of the four multipliers disabled in turn to reproduce the three load-bearing failures and the honest pass of the logits-multiplier control.
声明边界
作者对范围的明确界定——本工作证明了什么、未证明什么——沿用自 Octoryn Research 的发表模型。
证明
- A sovereign port of Granite-3.1-2B with four scalar multipliers reproduces Hugging Face f16 prefill logits at cosine 0.999997 with full argmax match on a consumer RDNA2-class GPU.
- The embedding, residual, and attention multipliers are load-bearing: disabling each as a negative control fails parity.
- A global logits multiplier is invisible to cosine/argmax — an honest invariance of the metric, not evidence the component is irrelevant.
未证明
- That the logits multiplier is unnecessary; it affects absolute magnitudes and calibrated probabilities, just not cosine/argmax.
- Generation quality, coherence, or throughput.
- Larger Granite variants, the MoE Granite line, other quantizations, or other hardware.
- Anything beyond a small-sample correctness smoke test over a handful of token positions on an unrecorded number of prompts.
适用于
- f16 prefill-logits parity for Granite-3.1-2B on a consumer RDNA2-class GPU versus a Hugging Face transformers oracle fed identical token ids.
不适用于
- Probability-calibration claims, generation or throughput claims, other model families, other quantizations, or benchmark-scale evaluation.
作者
- Ran Tao — 调查研究, 写作
引用本文
引用格式
Tao, R., Octoryn Research. (2026). Granite: four scalar multipliers, and what a negative control cannot see (TR-2026-0014). Octopus Research Institute.
BibTeX
@techreport{oritr20260014,
title = {Granite: four scalar multipliers, and what a negative control cannot see},
author = {Tao, Ran and {Octoryn Research}},
institution = {Octopus Research Institute},
year = {2026},
note = {Permanent ID TR-2026-0014. Not peer reviewed.}
}披露
- 资助
- 硬件与基础设施由 Octoryn / Octopus Core Pty Ltd 提供。
- 利益冲突
- Octoryn 提供商业推理与治理工具;相关发现独立报告。
