diff --git a/src/model/ModelTensorTypes.ts b/src/model/ModelTensorTypes.ts index 67ebb642d2..d1671f34ef 100644 --- a/src/model/ModelTensorTypes.ts +++ b/src/model/ModelTensorTypes.ts @@ -24,7 +24,7 @@ const ambiguousGgmlType = (id: number, candidates: string): GgmlType => [ }, ]; -/** Modern names/sizes: ggml da8e2a54 enum and block sizeof assertions. +/** Modern names/sizes: ggml 57e2c2ca (v0.29.0) enum and block sizeof assertions. * Historical collisions: llama.cpp b1500/b1803/b1871/b2100/b2172/b2221/ * b2253/b2275/b2300. Their GGUF v3 / quantization v2 do not select a layout. * A common row multiple is necessary, but need not be a known storage block. @@ -77,6 +77,7 @@ const GGML_TYPES: Readonly> = { 40: ["NVFP4", 64, 36], 41: ["Q1_0", 128, 18], 42: ["Q2_0", 64, 18], + 43: ["F8_E4M3", 1, 1], }; export const ggmlType = (id: number): GgmlType | undefined => GGML_TYPES[id]; diff --git a/tests/boundary/model/modelArtifact.test.ts b/tests/boundary/model/modelArtifact.test.ts index 69a78e46db..f30f744001 100644 --- a/tests/boundary/model/modelArtifact.test.ts +++ b/tests/boundary/model/modelArtifact.test.ts @@ -723,6 +723,7 @@ it("retains established storage for stable GGUF types and zero-byte K declaratio { name: "integer", type: 26, shape: [3n], offset: 0n, bytes: 12 }, { name: "empty-k", type: 10, shape: [64n, 0n], offset: 32n, bytes: 0 }, { name: "quant", type: 2, shape: [32n], offset: 32n, bytes: 18 }, + { name: "fp8", type: 43, shape: [3n], offset: 64n, bytes: 3 }, ], }); const { provider, path } = await providerAt(fixture.bytes); @@ -732,8 +733,9 @@ it("retains established storage for stable GGUF types and zero-byte K declaratio { type: "I32", byte_length: 12, storage_validation: "consistent" }, { type: "Q2_K", byte_length: 0, storage_validation: "consistent" }, { type: "Q4_0", byte_length: 18, storage_validation: "consistent" }, + { type: "F8_E4M3", byte_length: 3, storage_validation: "consistent" }, ]); - expect(result.value.totals.tensor_bytes).toBe(30); + expect(result.value.totals.tensor_bytes).toBe(33); expect(result.value.coverage).toMatchObject({ tensor_ranges: "complete", storage_sizes: "complete",