Skip to content

Commit 1a6a102

Browse files
committed
fix build on ubuntu (again)
1 parent 737a50e commit 1a6a102

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/llama-model.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#include <algorithm>
1010
#include <cassert>
1111
#include <cstring>
12+
#include <cmath>
1213
#include <functional>
1314
#include <map>
1415
#include <sstream>
@@ -878,8 +879,8 @@ void llama_model::load_hparams(llama_model_loader & ml) {
878879
}
879880

880881
hparams.f_attention_scale = type == LLM_TYPE_27B
881-
? 1.0f / std::sqrt(float(hparams.n_embd / hparams.n_head(0)))
882-
: 1.0f / std::sqrt(float(hparams.n_embd_head_k));
882+
? 1.0f / std::sqrtf(float(hparams.n_embd / hparams.n_head(0)))
883+
: 1.0f / std::sqrtf(float(hparams.n_embd_head_k));
883884
} break;
884885
case LLM_ARCH_STARCODER2:
885886
{

0 commit comments

Comments
 (0)