Skip to content

Stage M4 — fp16/bf16 on the Metal path *(reopens the Stage 8 reject; new)* #95

Description

@thanos

Stage M4 — fp16/bf16 on the Metal path (reopens the Stage 8 reject; new)

Goal: halve weight and KV bytes moved per token before touching
quantization.

  • fp16 (and bf16 where the device supports it usefully) weight storage
    and compute for the Qwen Metal path; f32 accumulation where numerics
    require it (teach why: softmax, RMSNorm reductions, logits).
  • KV cache in fp16 with documented tolerance impact.
  • Extend .zynfer artifact + converter for half-precision payloads
    (dev-time conversion; runtime stays Python-free).
  • Differential tests with dtype-justified tolerances — do not loosen
    tolerances to pass; explain every widened bound numerically.
  • Report bytes/token before/after and the new roofline fraction.

Gate: fp16 path matches golden tokens for greedy decoding on fixture
prompts (or the deviation is characterized and accepted explicitly);
measured decode speedup consistent with the bandwidth model.
Tutorial: docs/tutorials/18-half-precision-inference.md.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions