Skip to content

Commit 4f54609

Browse files
committed
Default to 4 threads (abetlen#243)
1 parent e81b9c8 commit 4f54609

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

utils.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@
1414

1515
struct gpt_params {
1616
int32_t seed = -1; // RNG seed
17-
int32_t n_threads;
17+
int32_t n_threads = std::min(4, (int32_t) std::thread::hardware_concurrency());
1818
int32_t n_predict = 128; // new tokens to predict
1919
int32_t repeat_last_n = 64; // last n tokens to penalize
2020
int32_t n_ctx = 512; //context size
21-
21+
2222
// sampling parameters
2323
int32_t top_k = 40;
2424
float top_p = 0.95f;

0 commit comments

Comments
 (0)