MCPcopy Create free account
hub / github.com/DevTechJr/turboquant_cutile / test_edge_case_zero_vector

Function test_edge_case_zero_vector

tests/test_compress.py:121–126  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

119
120
121def test_edge_case_zero_vector():
122 engine = TurboQuantEngine(head_dim=128, total_bits=3, device="cpu")
123 K = torch.zeros(1, 128).half()
124 compressed = engine.compress_keys_pytorch(K)
125 assert not torch.isnan(compressed["k_mse"]).any()
126 assert not torch.isinf(compressed["k_mse"]).any()
127
128
129def test_edge_case_large_values():

Callers

nothing calls this directly

Calls 2

compress_keys_pytorchMethod · 0.95
TurboQuantEngineClass · 0.90

Tested by

no test coverage detected