Skip to content
Octopus Research Institute
TR-2026-0014Technical reportPeer review: Not peer reviewedEvidence: ExperimentalStatus: Released

Granite: four scalar multipliers, and what a negative control cannot see

Ran Tao (Octoryn Research)

This is not peer-reviewed. Treat it as a working document, not a validated result.

Abstract

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.

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

FieldValue
HardwareAMD RDNA2-class consumer GPU (16 GB)
Stack / versionsROCm dense inference engine; a recent transformers release (exact version not recorded in source notes)
Oracle / baselineHugging Face transformers forward, identical token ids, same weights
ProcedureDirect HF f16 prefill-logits parity; per-position cosine + argmax over the measured token positions; plus four negative-control runs each disabling one multiplier
Precisionf16 (engine's highest-precision path)
Metric + gatePer-position cosine similarity and argmax match; pass = high cosine + full argmax match (explicit numeric gate threshold not recorded in source notes)
Stimulus / inputsA small fixed set of token positions (prompt text / count of prompts not recorded in source notes)

3. Results

MeasurementValue
f16 logit cosine vs transformers0.999997
argmax matchfull (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

ControlActionOutcomeInterpretation
Disable embedding multiplierembedding scalar offFAILload-bearing
Disable residual multiplierresidual scalar offFAILload-bearing
Disable attention multiplierattention scalar offFAILload-bearing
Disable logits multiplierfinal-logits scalar offPASS (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

ItemValue
Build / runStandard ROCm offline compilation against the HIP runtime for the target GPU architecture
Version pinsa recent transformers release; exact version not recorded in source notes
Oracle caveatValidate that the HF oracle loads the real weights with identical token ids before trusting parity
SovereigntyLinks 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.

Claim boundary

The author's explicit scope — what this work does and does not establish — carried over from the Octoryn Research publishing model.

Proves

  • 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.

Does not prove

  • 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.

Applies when

  • 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.

Does not apply when

  • Probability-calibration claims, generation or throughput claims, other model families, other quantizations, or benchmark-scale evaluation.

Authors

  • Ran Tao — Investigation, Writing

Cite this

Citation

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.}
}

Disclosures

Funding
Hardware and infrastructure provided by Octoryn / Octopus Core Pty Ltd.
Conflicts of interest
Octoryn ships commercial inference and governance tooling; findings are reported independently.