Skip to content

Commit e74a172

Browse files
committed
default number of predicted tokens (num_predict) to infinity (-1)
1 parent a1b6698 commit e74a172

File tree

9 files changed

+12
-12
lines changed

9 files changed

+12
-12
lines changed

Options.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ If the user's GPU is not supported, the LLM will fall back to the CPU
8787
## 🤗 Model Settings
8888
- `Stream` select to receive the reply from the model as it is produced (recommended!).<br>
8989
If it is not selected, the full reply from the model is received in one go
90-
- <details><summary><code>Num Predict</code> maximum number of tokens to predict (default: 256, -1 = infinity, -2 = until context filled)</summary>This is the maximum amount of tokens the model will maximum predict. When N tokens are reached the model will stop generating. This means words / sentences might not get finished if this is too low. </details>
90+
- <details><summary><code>Num Predict</code> maximum number of tokens to predict (default: 256, -1 = infinity)</summary>This is the maximum amount of tokens the model will maximum predict. When N tokens are reached the model will stop generating. This means words / sentences might not get finished if this is too low. </details>
9191

9292
- <details><summary>Advanced options</summary>
9393

Runtime/LLMCharacter.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ public class LLMCharacter : LLMCaller
2727
/// <summary> log the constructed prompt the Unity Editor. </summary>
2828
[Tooltip("log the constructed prompt the Unity Editor.")]
2929
[LLM] public bool debugPrompt = false;
30-
/// <summary> maximum number of tokens that the LLM will predict (-1 = infinity, -2 = until context filled). </summary>
31-
[Tooltip("maximum number of tokens that the LLM will predict (-1 = infinity, -2 = until context filled).")]
32-
[Model] public int numPredict = 256;
30+
/// <summary> maximum number of tokens that the LLM will predict (-1 = infinity). </summary>
31+
[Tooltip("maximum number of tokens that the LLM will predict (-1 = infinity).")]
32+
[Model] public int numPredict = -1;
3333
/// <summary> slot of the server to use for computation (affects caching) </summary>
3434
[Tooltip("slot of the server to use for computation (affects caching)")]
3535
[ModelAdvanced] public int slot = -1;

Samples~/ChatBot/Scene.unity

+1-1
Original file line numberDiff line numberDiff line change
@@ -1150,7 +1150,7 @@ MonoBehaviour:
11501150
cachePrompt: 1
11511151
slot: -1
11521152
seed: 0
1153-
numPredict: 256
1153+
numPredict: -1
11541154
temperature: 0.2
11551155
topK: 40
11561156
topP: 0.9

Samples~/FunctionCalling/Scene.unity

+1-1
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ MonoBehaviour:
484484
save:
485485
saveCache: 0
486486
debugPrompt: 0
487-
numPredict: 256
487+
numPredict: -1
488488
slot: -1
489489
grammar:
490490
cachePrompt: 1

Samples~/KnowledgeBaseGame/Scene.unity

+1-1
Original file line numberDiff line numberDiff line change
@@ -4361,7 +4361,7 @@ MonoBehaviour:
43614361
grammar:
43624362
cachePrompt: 1
43634363
seed: 0
4364-
numPredict: 256
4364+
numPredict: -1
43654365
temperature: 0.2
43664366
topK: 40
43674367
topP: 0.9

Samples~/MobileDemo/Scene.unity

+1-1
Original file line numberDiff line numberDiff line change
@@ -694,7 +694,7 @@ MonoBehaviour:
694694
save:
695695
saveCache: 0
696696
debugPrompt: 0
697-
numPredict: 256
697+
numPredict: -1
698698
slot: -1
699699
grammar:
700700
cachePrompt: 1

Samples~/MultipleCharacters/Scene.unity

+2-2
Original file line numberDiff line numberDiff line change
@@ -605,7 +605,7 @@ MonoBehaviour:
605605
cachePrompt: 1
606606
slot: -1
607607
seed: 0
608-
numPredict: 256
608+
numPredict: -1
609609
temperature: 0.2
610610
topK: 40
611611
topP: 0.9
@@ -1983,7 +1983,7 @@ MonoBehaviour:
19831983
cachePrompt: 1
19841984
slot: -1
19851985
seed: 0
1986-
numPredict: 256
1986+
numPredict: -1
19871987
temperature: 0.2
19881988
topK: 40
19891989
topP: 0.9

Samples~/RAG/RAGAndLLM_Scene.unity

+1-1
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,7 @@ MonoBehaviour:
571571
grammar:
572572
cachePrompt: 1
573573
seed: 0
574-
numPredict: 256
574+
numPredict: -1
575575
temperature: 0.2
576576
topK: 40
577577
topP: 0.9

Samples~/SimpleInteraction/Scene.unity

+1-1
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ MonoBehaviour:
493493
cachePrompt: 1
494494
slot: -1
495495
seed: 0
496-
numPredict: 256
496+
numPredict: -1
497497
temperature: 0.2
498498
topK: 40
499499
topP: 0.9

0 commit comments

Comments
 (0)