summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorGeorgi Gerganov <ggerganov@gmail.com>2023-11-03 09:41:17 +0200
committerGeorgi Gerganov <ggerganov@gmail.com>2023-11-03 09:41:56 +0200
commit8f961abdc4e134c83bf8c2ad618ab256b4cae0f9 (patch)
tree8dd4776cfc627709436fb25fabe56385f9fab35d /examples
parent05816027d649f977468fc804cdb54e99eac246d1 (diff)
speculative : change default p_accept to 0.5 + CLI args (#3919)
ggml-ci
Diffstat (limited to 'examples')
-rw-r--r--examples/speculative/speculative.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/examples/speculative/speculative.cpp b/examples/speculative/speculative.cpp
index 798684f6..3a8e2781 100644
--- a/examples/speculative/speculative.cpp
+++ b/examples/speculative/speculative.cpp
@@ -37,9 +37,11 @@ int main(int argc, char ** argv) {
// max number of parallel drafting sequences (i.e. tree branches)
const int n_seq_dft = params.n_parallel;
- // TODO: make this configurable
- const float p_accept = 0.80f;
- const float p_split = 0.10f;
+ // probability threshold for accepting a token from the draft model
+ const float p_accept = params.p_accept;
+
+ // probability threshold for splitting a draft branch (only for n_seq_dft > 1)
+ const float p_split = params.p_split;
#ifndef LOG_DISABLE_LOGS
log_set_target(log_filename_generator("speculative", "log"));