Skip to content

Commit 2589292

Browse files
authored
Fix a spelling mistake (#9001)
1 parent d3ae0ee commit 2589292

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/llama-sampling.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,14 +85,14 @@ void llama_sample_top_k_impl(struct llama_sampling * smpl, llama_token_data_arra
8585
constexpr float bucket_low = -10.0f;
8686
constexpr float bucket_high = 10.0f;
8787
constexpr float bucket_scale = nbuckets/(bucket_high - bucket_low);
88-
constexpr float bucker_inter = -bucket_low * bucket_scale;
88+
constexpr float bucket_inter = -bucket_low * bucket_scale;
8989

9090
std::vector<int> bucket_idx(candidates->size);
9191
std::vector<int> histo(nbuckets, 0);
9292

9393
for (int i = 0; i < (int)candidates->size; ++i) {
9494
const float val = candidates->data[i].logit;
95-
int ib = int(bucket_scale * val + bucker_inter); //nbuckets * (val - bucket_low) / (bucket_high - bucket_low);
95+
int ib = int(bucket_scale * val + bucket_inter); //nbuckets * (val - bucket_low) / (bucket_high - bucket_low);
9696
ib = std::max(0, std::min(nbuckets-1, ib));
9797
bucket_idx[i] = ib;
9898
++histo[ib];

0 commit comments

Comments
 (0)