fix: cast quantized biases to F32 in graph, keep biases unquantized

- diffuse-graph: ensure_f32() helper casts bias tensors before ggml_add
- quantize: classify .bias tensors as TC_NORM (always F32)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
iafiscal1212andClaude Opus 4.6 committed 2026-03-22 13:37:13 +01:00
1 parent 531ef58222
commit 7eb999b09a
2 files changed
+18 -10

No files matched your search

+2 -1
View File
@@ -29,8 +29,9 @@ enum tensor_class {
};
static tensor_class classify_tensor(const char * name, int n_layers) {
// Norms are always kept in F32
// Norms and biases are always kept in F32
if (strstr(name, "_norm") || strstr(name, "norm.")) return TC_NORM;
if (strstr(name, ".bias")) return TC_NORM;
// Token embeddings
if (strstr(name, "token_embd") || strstr(name, "embed")) return TC_EMBED;