{"record":{"id":"ffdc21f3f47fba36","repo":"tracel-ai/burn","slug":"quantization-not-supported-for-scheme-scheme","errorCode":null,"errorMessage":"Quantization not supported for scheme {scheme:?}","messagePattern":"Quantization not supported for scheme (.+?)","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/burn-ndarray/src/ops/qtensor.rs","lineNumber":169,"sourceCode":"                    store: QuantStore::Native,\n                    ..\n                },\n            ) => {\n                let global = if global_scale_dtype(scheme).is_some() {\n                    Some(global.expect(\"a two-level scheme should have a per-tensor scale\"))\n                } else {\n                    None\n                };\n                quantize_per_block(\n                    data_f.as_slice().unwrap(),\n                    shape.clone(),\n                    scheme,\n                    block_size,\n                    scales.as_slice(),\n                    global,\n                )\n            }\n            (_, scheme) => unimplemented!(\"Quantization not supported for scheme {scheme:?}\"),\n        };\n\n        let q_bytes = QuantizedBytes {\n            shape: data.shape.clone(),\n            bytes: data.into_bytes(),\n            scheme: *scheme,\n        };\n        let (values, _) = q_bytes.into_vec_i8();\n        let data = TensorData::new(values, shape);\n\n        NdArrayQTensor {\n            qtensor: NdArrayTensor::from_data(data),\n            scheme: *scheme,\n            qparams,\n            global,\n        }\n    }\n","sourceCodeStart":151,"sourceCodeEnd":187,"githubUrl":"https://github.com/tracel-ai/burn/blob/d16f7ba2ed0d41408189384044cc886fb4c8f957/crates/burn-ndarray/src/ops/qtensor.rs#L151-L187","documentation":"Panics because quantize was called with a QuantScheme that has no code path in this match arm of the per-block quantization branch. The scheme value reached the block-quantization arm (which expects block-quantized schemes with per-block scales and optionally a per-tensor global scale) but was not one of the supported block schemes, so no conversion could be performed. Fix by passing a supported block-quantization scheme (or route the tensor to the affine/per-tensor path appropriate for that scheme).","triggerScenarios":"Thrown at crates/burn-ndarray/src/ops/qtensor.rs:169 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Quantize with a supported scheme (e.g., symmetric Q8F/Q8S)","Check the scheme's QuantValue/QuantStore/QuantMode combination against ndarray's supported arms","Use a different backend for exotic quantization schemes"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"d16f7ba2ed0d41408189384044cc886fb4c8f957","analyzedAt":"2026-09-05T13:19:14.260Z","contentChangedAt":"2026-09-05T13:19:14.260Z","schemaVersion":2},"datasetVersion":"2026-09-12T17:17:11.597Z"}