summaryrefslogtreecommitdiff
path: root/llm/cmd/eval/perplexity.go
diff options
context:
space:
mode:
Diffstat (limited to 'llm/cmd/eval/perplexity.go')
-rw-r--r--llm/cmd/eval/perplexity.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/llm/cmd/eval/perplexity.go b/llm/cmd/eval/perplexity.go
index ba92c99..dd4dae3 100644
--- a/llm/cmd/eval/perplexity.go
+++ b/llm/cmd/eval/perplexity.go
@@ -42,7 +42,12 @@ func perplexity() {
total := float64(0)
n := 0
- if err := e.RunAndCollect("Perplexity", d, 1024, 512, func(r pplResult) error {
+ cfg := llm.TokenBufferConfig{
+ Window: 1024,
+ Stride: 512,
+ }
+
+ if err := e.RunAndCollect("Perplexity", d, cfg, func(r pplResult) error {
total += r.v
n += r.n