mirror of
https://github.com/iafiscal1212/diffuse-cpp.git
synced 2026-12-04 08:38:08 +00:00
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:
1 parent
531ef58222
commit
7eb999b09a
2 files changed
+18
-10
No files matched your search
+2
-1
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user