fix: avoid f16 overflow in Z-Image quantized matmuls on CUDA (#2074)

Co-authored-by: leejet <leejet714@gmail.com>
This commit is contained in:
losewayyandleejet authored and GitHub committed 2026-10-06 17:19:56 +08:00
1 parent 9db0db6570
commit b6947b8bdc
2 files changed
+9 -2

No files matched your search

+5
View File
@@ -205,6 +205,11 @@ public:
force_prec_f32 = force_prec_f32_;
}
bool has_quantized_weight() const {
auto it = params.find("weight");
return it != params.end() && it->second != nullptr && ggml_is_quantized(it->second->type);
}
ggml_tensor* forward(GGMLRunnerContext* ctx, ggml_tensor* x) override {
ggml_tensor* w = params["weight"];
const float scale = ctx->linear_scale > 0.f ? ctx->linear_scale : this->scale;