Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Implement stochastic speculative sampling #5625

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

Merged
merged 17 commits into from
Mar 4, 2024
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
add srand() in speculative.cpp
  • Loading branch information
mscheong01 committed Feb 27, 2024
commit 6afc1f60e1dac858ca5b45dcd3c528ad0afae1b4
6 changes: 6 additions & 0 deletions 6 examples/speculative/speculative.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ int main(int argc, char ** argv) {
// probability threshold for splitting a draft branch (only for n_seq_dft > 1)
const float p_split = params.p_split;

if (params.seed >= 0) {
mscheong01 marked this conversation as resolved.
Show resolved Hide resolved
srand(params.seed);
} else {
srand(time(NULL));
}

#ifndef LOG_DISABLE_LOGS
log_set_target(log_filename_generator("speculative", "log"));
LOG_TEE("Log start\n");
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.