Refactor estimate_lambda()

This commit is contained in:
Ed Addario 2025-09-21 16:19:49 +01:00
parent 17be7615ce
commit b09662f86a
No known key found for this signature in database
GPG Key ID: E7875815A3230993
1 changed files with 3 additions and 3 deletions

View File

@ -982,8 +982,8 @@ static std::unordered_map<std::string, ggml_type> target_bpw_type(
double s2 = 0.0;
for (int64_t j = 0; j < n_per_row; ++j) {
const double w = v ? std::max(0.0f, v[j]) : 1.0;
const double aw2 = std::sqrt(w) * a[j];
const double z = aw2 * aw2;
const double aw = std::sqrt(w) * a[j];
const double z = aw * aw;
s1 += z;
s2 += z * z;
}