Skip to content

Commit 67db281

Browse files
author
Chris Warren-Smith
committed
LLM: plugin module - fix iteration issues
1 parent fad622e commit 67db281

File tree

8 files changed

+397
-77
lines changed

8 files changed

+397
-77
lines changed

llama/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
cmake_minimum_required(VERSION 3.15)
22
project(llm C CXX)
33

4-
set(CMAKE_CXX_STANDARD 17)
4+
# clang-check ../*.cpp
5+
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
6+
set(CMAKE_CXX_STANDARD 20)
57
set(CMAKE_C_STANDARD 11)
68

79
# -----------------------------

llama/README.md

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
# Generator settings
2+
3+
## factual answers, tools, summaries
4+
5+
```
6+
llama.set_max_tokens(150)
7+
llama.set_temperature(0.0)
8+
llama.set_top_k(1)
9+
llama.set_top_p(0.0)
10+
llama.set_min_p(0.0)
11+
```
12+
13+
## assistant, Q+A, explanations, chat
14+
15+
```
16+
llama.set_max_tokens(150)
17+
llama.set_temperature(0.8)
18+
llama.set_top_k(40)
19+
llama.set_top_p(0.0)
20+
llama.set_min_p(0.05)
21+
```
22+
23+
## creative, storytelling
24+
25+
```
26+
llama.set_max_tokens(20)
27+
llama.set_temperature(1.0)
28+
llama.set_top_k(80)
29+
llama.set_top_p(0.0)
30+
llama.set_min_p(0.1)
31+
```
32+
33+
## surprises
34+
35+
```
36+
llama.set_max_tokens(200)
37+
llama.set_temperature(1.2)
38+
llama.set_top_k(120)
39+
llama.set_top_p(0.0)
40+
llama.set_min_p(0.15)
41+
```
42+
43+
## technical, conservative
44+
45+
```
46+
llama.set_max_tokens(150)
47+
llama.set_temperature(0.6)
48+
llama.set_top_k(30)
49+
llama.set_top_p(0.0)
50+
llama.set_min_p(0.02)
51+
```
52+
53+
## speed optimised on CPU
54+
55+
```
56+
' llama.set_max_tokens(10)
57+
' llama.set_temperature(0.7)
58+
' llama.set_top_k(20)
59+
' llama.set_top_p(0.0)
60+
' llama.set_min_p(0.05)
61+
```
62+
63+
# Avoiding repetition
64+
65+
## Conservative - minimal repetition control
66+
67+
```
68+
llama.set_penalty_last_n(64)
69+
llama.set_penalty_repeat(1.05)
70+
```
71+
72+
## Balanced - good default
73+
74+
```
75+
set_penalty_last_n(64)
76+
set_penalty_repeat(1.1)
77+
```
78+
79+
## Aggressive - strong anti-repetition
80+
81+
```
82+
set_penalty_last_n(128)
83+
set_penalty_repeat(1.2)
84+
```
85+
86+
## Disabled
87+
88+
```
89+
llama.set_penalty_last_n(0)
90+
llama.set_penalty_repeat(1.0)
91+
```

0 commit comments

Comments
 (0)