@@ -2657,7 +2657,6 @@ struct llama_context {
2657
2657
llama_context(const llama_model & model)
2658
2658
: model(model)
2659
2659
, sampling(llama_n_vocab(&model))
2660
- , grammar()
2661
2660
, t_start_us(model.t_start_us)
2662
2661
, t_load_us(model.t_load_us) {}
2663
2662
@@ -2675,7 +2674,6 @@ struct llama_context {
2675
2674
2676
2675
struct llama_cparams cparams;
2677
2676
struct llama_sampling sampling;
2678
- struct llama_grammar grammar;
2679
2677
struct llama_kv_cache kv_self;
2680
2678
struct llama_control_vector cvec;
2681
2679
@@ -14049,7 +14047,7 @@ static void llama_set_inputs(llama_context & lctx, const llama_batch & batch) {
14049
14047
f = -INFINITY;
14050
14048
} else {
14051
14049
if (hparams.use_alibi) {
14052
- f = -fabs (lctx.kv_self.cells[i].pos - pos);
14050
+ f = -std::abs (lctx.kv_self.cells[i].pos - pos);
14053
14051
} else {
14054
14052
f = 0.0f;
14055
14053
}
@@ -14103,7 +14101,7 @@ static void llama_set_inputs(llama_context & lctx, const llama_batch & batch) {
14103
14101
for (int s = 0; s < batch.n_seq_id[i]; ++s) {
14104
14102
if (batch.seq_id[i][s] == seq_id) {
14105
14103
if (hparams.use_alibi) {
14106
- f = -fabs (batch.pos[i] - batch.pos[j]);
14104
+ f = -std::abs (batch.pos[i] - batch.pos[j]);
14107
14105
} else {
14108
14106
f = 0.0f;
14109
14107
}
@@ -16835,10 +16833,6 @@ const struct llama_vocab * llama_get_vocab(const struct llama_context * ctx) {
16835
16833
return &ctx->model.vocab;
16836
16834
}
16837
16835
16838
- struct llama_grammar * llama_get_grammar(struct llama_context * ctx) {
16839
- return &ctx->grammar;
16840
- }
16841
-
16842
16836
uint32_t llama_n_ctx(const struct llama_context * ctx) {
16843
16837
return ctx->cparams.n_ctx;
16844
16838
}
0 commit comments