diff options
author | stduhpf <stephduh@live.fr> | 2024-01-16 12:04:32 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-16 13:04:32 +0200 |
commit | e0324285a569d0583cf2f4a07a2402221ee25f58 (patch) | |
tree | 8372c01c23d94190463f02c5e643142995aa7f84 /examples | |
parent | 3e5ca7931c68152e4ec18d126e9c832dd84914c8 (diff) |
speculative : threading options (#4959)
* speculative: expose draft threading
* fix usage format
* accept -td and -tbd args
* speculative: revert default behavior when -td is unspecified
* fix trailing whitespace
Diffstat (limited to 'examples')
-rw-r--r-- | examples/speculative/speculative.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/examples/speculative/speculative.cpp b/examples/speculative/speculative.cpp index 20f1fb5b..7b3af01f 100644 --- a/examples/speculative/speculative.cpp +++ b/examples/speculative/speculative.cpp @@ -65,6 +65,10 @@ int main(int argc, char ** argv) { // load the draft model params.model = params.model_draft; params.n_gpu_layers = params.n_gpu_layers_draft; + if (params.n_threads_draft > 0) { + params.n_threads = params.n_threads_draft; + } + params.n_threads_batch = params.n_threads_batch_draft; std::tie(model_dft, ctx_dft) = llama_init_from_gpt_params(params); { |