| 1269 | float sparse_pred_threshold = (float)atof(getenv("LLAMA_SPARSE_PRED_THRESHOLD") ? getenv("LLAMA_SPARSE_PRED_THRESHOLD") : "0.0"); |
| 1270 | |
| 1271 | bool operator!=(const llama_hparams & other) const { |
| 1272 | if (this->vocab_only != other.vocab_only) return true; |
| 1273 | if (this->n_vocab != other.n_vocab) return true; |
| 1274 | if (this->n_ctx_train != other.n_ctx_train) return true; |
| 1275 | if (this->n_embd != other.n_embd) return true; |
| 1276 | if (this->n_head != other.n_head) return true; |
| 1277 | if (this->n_head_kv != other.n_head_kv) return true; |
| 1278 | if (this->n_layer != other.n_layer) return true; |
| 1279 | if (this->n_rot != other.n_rot) return true; |
| 1280 | if (this->n_ff != other.n_ff) return true; |
| 1281 | if (this->rope_finetuned != other.rope_finetuned) return true; |
| 1282 | if (this->n_yarn_orig_ctx != other.n_yarn_orig_ctx) return true; |
| 1283 | |
| 1284 | const float EPSILON = 1e-9; |
| 1285 | |
| 1286 | if (!is_float_close(this->f_norm_eps, other.f_norm_eps, EPSILON)) return true; |
| 1287 | if (!is_float_close(this->f_norm_rms_eps, other.f_norm_rms_eps, EPSILON)) return true; |
| 1288 | if (!is_float_close(this->rope_freq_base_train, other.rope_freq_base_train, EPSILON)) return true; |
| 1289 | if (!is_float_close(this->rope_freq_scale_train, other.rope_freq_scale_train, EPSILON)) return true; |
| 1290 | |
| 1291 | return false; |
| 1292 | } |
| 1293 | |
| 1294 | uint32_t n_gqa() const { |
| 1295 | return n_head/n_head_kv; |
nothing calls this directly
no test coverage detected