Skip to content

Commit 4d1a4bb

Browse files
committed
Fix a spelling mistake (#9001)
Author : Liu Jia
1 parent ededeb0 commit 4d1a4bb

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
@@ -87,14 +87,14 @@ void llama_sample_top_k_impl(struct llama_sampling * smpl, llama_token_data_arra
8787
constexpr float bucket_low = -10.0f;
8888
constexpr float bucket_high = 10.0f;
8989
constexpr float bucket_scale = nbuckets/(bucket_high - bucket_low);
90-
constexpr float bucker_inter = -bucket_low * bucket_scale;
90+
constexpr float bucket_inter = -bucket_low * bucket_scale;
9191

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

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

0 commit comments

Comments
 (0)