summaryrefslogtreecommitdiff
path: root/llm/job.go
diff options
context:
space:
mode:
authorJonas Knobloch <jonas.knobloch@t-online.de>2025-11-18 02:04:41 +0100
committerJonas Knobloch <jonas.knobloch@t-online.de>2025-11-18 02:09:09 +0100
commit321802e7b1f77f684a720d1052befd6d36280875 (patch)
tree7312584cc5db9b30acef5151dff242dbbd7a7379 /llm/job.go
parent7073b124c5eb31169442ef18d1627b7ed7401280 (diff)
Add perplexity evaluation
Diffstat (limited to 'llm/job.go')
-rw-r--r--llm/job.go19
1 files changed, 19 insertions, 0 deletions
diff --git a/llm/job.go b/llm/job.go
new file mode 100644
index 0000000..3e7c5c9
--- /dev/null
+++ b/llm/job.go
@@ -0,0 +1,19 @@
+package llm
+
+type job struct {
+ positions []int
+ tokens [][]int64
+ seen []int
+ results []float64
+ debug [][2]int
+}
+
+func newJob(batchSize int) *job {
+ return &job{
+ positions: make([]int, 0, batchSize),
+ tokens: make([][]int64, 0, batchSize),
+ seen: make([]int, 0, batchSize),
+ results: make([]float64, 0, batchSize),
+ debug: make([][2]int, 0),
+ }
+}