Fix whitespace / formatting
This commit is contained in:
parent
281e2bad8c
commit
de454b9ef5
1 changed files with 6 additions and 6 deletions
|
@ -100,11 +100,11 @@ std::string llama_sampling_print(const llama_sampling_params & params) {
|
||||||
}
|
}
|
||||||
|
|
||||||
llama_token llama_sampling_sample(
|
llama_token llama_sampling_sample(
|
||||||
struct llama_sampling_context * ctx_sampling,
|
struct llama_sampling_context * ctx_sampling,
|
||||||
struct llama_context * ctx_main,
|
struct llama_context * ctx_main,
|
||||||
struct llama_context * ctx_cfg,
|
struct llama_context * ctx_cfg,
|
||||||
const int idx,
|
const int idx,
|
||||||
bool is_resampling) { // Add a parameter to indicate if we are resampling
|
bool is_resampling) { // Add a parameter to indicate if we are resampling
|
||||||
const llama_sampling_params & params = ctx_sampling->params;
|
const llama_sampling_params & params = ctx_sampling->params;
|
||||||
|
|
||||||
const int n_vocab = llama_n_vocab(llama_get_model(ctx_main));
|
const int n_vocab = llama_n_vocab(llama_get_model(ctx_main));
|
||||||
|
@ -134,7 +134,7 @@ llama_token llama_sampling_sample(
|
||||||
|
|
||||||
// Declare original_logits at the beginning of the function scope
|
// Declare original_logits at the beginning of the function scope
|
||||||
std::vector<float> original_logits;
|
std::vector<float> original_logits;
|
||||||
|
|
||||||
if (!is_resampling) {
|
if (!is_resampling) {
|
||||||
// Only make a copy of the original logits if we are not in the resampling phase, not sure if I actually have to do this.
|
// Only make a copy of the original logits if we are not in the resampling phase, not sure if I actually have to do this.
|
||||||
original_logits = std::vector<float>(logits, logits + llama_n_vocab(llama_get_model(ctx_main)));
|
original_logits = std::vector<float>(logits, logits + llama_n_vocab(llama_get_model(ctx_main)));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue