Add space around * pointers and & references.
This commit is contained in:
parent
abe0829984
commit
9bedaf4c71
4 changed files with 34 additions and 35 deletions
|
@ -1233,7 +1233,6 @@ void beam_search_callback(void* callback_data, llama_beams_state beams_state) {
|
|||
llama.generated_token_probs.resize(llama.generated_token_probs.size() + n);
|
||||
assert(0u < beams_state.n_beams);
|
||||
llama_token const * tokens = beams_state.beam_views[0].tokens;
|
||||
//std::copy(tokens, tokens + n, llama->generated_token_probs.end() - n);
|
||||
auto const map = [](llama_token tok) { return completion_token_output{{},tok}; };
|
||||
std::transform(tokens, tokens + n, llama.generated_token_probs.end() - n, map);
|
||||
printf("%lu", n);
|
||||
|
|
2
llama.h
2
llama.h
|
@ -470,7 +470,7 @@ extern "C" {
|
|||
//
|
||||
|
||||
struct llama_beam_view {
|
||||
llama_token const* tokens;
|
||||
const llama_token * tokens;
|
||||
size_t n_tokens;
|
||||
float p; // Cumulative beam probability (renormalized relative to all beams)
|
||||
bool eos; // Callback should set this to true when a beam is at end-of-sentence.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue