Skip to content

TurboQuant contract v1 -> v2: coordinated cross-backend fix #17

Description

@ehartford

Tracking issue for the coordinated fix of the TurboQuant contract defect across
backends. Contract corrected to version 2 in 613c73c.

The defect

specs/formats/turboquant.md version 1 assigned the rotated Lloyd-Max path to
values and plain uniform quantization to keys. That is inverted with respect to
TurboQuant (arXiv:2504.19874): attention
scores are inner products, so keys take the rotated path and values take uniform
quantization. Three backends implemented version 1 faithfully, which is why they
agree with each other and disagree with the algorithm.

Keys are the tensor whose quantization error biases every attention score, and
they are the ones that were getting vanilla uniform quantization. This is a
correctness defect.

Per-backend

Coordination

Stored codes change meaning, so this is a wire-format break. Caches written under
version 1 cannot be migrated in place.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions