| llama_set_threads | R Documentation |
Set the number of threads for a context
llama_set_threads(ctx, n_threads, n_threads_batch = n_threads)
ctx |
Context handle returned by [llama_new_context] |
n_threads |
Number of threads for single-token generation |
n_threads_batch |
Number of threads for batch processing (prompt encoding).
Defaults to the same value as |
No return value, called for side effects.
## Not run:
model <- llama_load_model("model.gguf")
ctx <- llama_new_context(model)
llama_set_threads(ctx, n_threads = 8L)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.