Skip to content

BUG: NaN values in GGUF→APR→GGUF roundtrip (Jidoka PMAT-187) #186

@noahgift

Description

@noahgift

Summary

The test_roundtrip_gguf_apr_gguf test is failing with NaN detection in tensor data during GGUF round-trip conversion.

Error

PMAT-187: Tensor 'blk.0.attn_k.weight' contains 322 NaN values (data corruption detected). 
Toyota Way: Stop the line - do not pass defects downstream.

Test

// tests/rosetta_dangerous.rs:470
#[test]
fn test_roundtrip_gguf_apr_gguf() {
    // Uses: qwen2.5-coder-1.5b-instruct-q4_k_m.gguf
}

Related

Investigation Needed

  1. Check Q4_K dequantization for NaN generation
  2. Check scale/zero-point handling in quantized formats
  3. Verify APR→GGUF conversion preserves quantization metadata

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions