Skip to content

Commit

Permalink
fix for #114 -- incorrect shape used in preload (#115)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidkoski authored Aug 30, 2024
1 parent ab94ffc commit 9266a62
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Libraries/LLM/Evaluate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ public struct TokenIterator: Sequence, IteratorProtocol {
// prepare the prompt in chunks if larger than the prefill size
while y.size > parameters.prefillStepSize {
_ = model(
y[..<parameters.prefillStepSize, .newAxis], cache: cache.isEmpty ? nil : cache)
y[.newAxis, ..<parameters.prefillStepSize], cache: cache.isEmpty ? nil : cache)
eval(cache)
y = y[parameters.prefillStepSize...]
}
Expand Down

0 comments on commit 9266a62

Please sign in to comment.