Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

speculative : add tree-based sampling example #3624

Merged
merged 18 commits into from
Oct 18, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
batched : fix n_seq_id
  • Loading branch information
ggerganov committed Oct 15, 2023
commit 0d96efabb540ed8dea0e1f29130c2c7312265472
9 changes: 5 additions & 4 deletions examples/batched/batched.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,11 @@ int main(int argc, char ** argv) {
batch.n_tokens = tokens_list.size();

for (int32_t i = 0; i < batch.n_tokens; i++) {
batch.token[i] = tokens_list[i];
batch.pos[i] = i;
batch.seq_id[i] = 0;
batch.logits[i] = false;
batch.token[i] = tokens_list[i];
batch.pos[i] = i;
batch.n_seq_id[i] = 1;
batch.seq_id[i][0] = 0;
batch.logits[i] = false;
}

// llama_decode will output logits only for the last token of the prompt
Expand Down