summaryrefslogtreecommitdiff
path: root/llm/job.go
diff options
context:
space:
mode:
authorJonas Knobloch <jonas.knobloch@t-online.de>2026-03-09 19:14:50 +0100
committerJonas Knobloch <jonas.knobloch@t-online.de>2026-03-09 19:22:08 +0100
commite5d7c530ffd7ab88131988a05f66109ec880b809 (patch)
tree91303f2e7729400048ce7cd533f349217ed35c27 /llm/job.go
parent591c4e3ae32aef6a63bdbf72c1903df72131389b (diff)
Fix perplexity calculation
* Track total evaluated tokens * Use first token as context
Diffstat (limited to 'llm/job.go')
-rw-r--r--llm/job.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/llm/job.go b/llm/job.go
index 3e7c5c9..204d324 100644
--- a/llm/job.go
+++ b/llm/job.go
@@ -4,7 +4,7 @@ type job struct {
positions []int
tokens [][]int64
seen []int
- results []float64
+ results []result
debug [][2]int
}
@@ -13,7 +13,7 @@ func newJob(batchSize int) *job {
positions: make([]int, 0, batchSize),
tokens: make([][]int64, 0, batchSize),
seen: make([]int, 0, batchSize),
- results: make([]float64, 0, batchSize),
+ results: make([]result, 0, batchSize),
debug: make([][2]int, 0),
}
}