aboutsummaryrefslogtreecommitdiff
path: root/utils.h
diff options
context:
space:
mode:
authorStephan Walter <stephan@walter.name>2023-03-17 17:47:35 +0000
committerGitHub <noreply@github.com>2023-03-17 19:47:35 +0200
commit367946c668757532deed929e1d78673c6ac6bcb8 (patch)
tree55245c6c86103db1777b3dcd0831dbd72184a3c2 /utils.h
parent6b0df5ccf360fe5c015f6607f0375bfc6849005e (diff)
Don't tell users to use a bad number of threads (#243)
The readme tells people to use the command line option "-t 8", causing 8 threads to be started. On systems with fewer than 8 cores, this causes a significant slowdown. Remove the option from the example command lines and use /proc/cpuinfo on Linux to determine a sensible default.
Diffstat (limited to 'utils.h')
-rw-r--r--utils.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/utils.h b/utils.h
index 021120b..5e5b40f 100644
--- a/utils.h
+++ b/utils.h
@@ -14,7 +14,7 @@
struct gpt_params {
int32_t seed = -1; // RNG seed
- int32_t n_threads = std::min(4, (int32_t) std::thread::hardware_concurrency());
+ int32_t n_threads;
int32_t n_predict = 128; // new tokens to predict
int32_t repeat_last_n = 64; // last n tokens to penalize
int32_t n_ctx = 512; //context size