Skip to content

Commit

Permalink
Fix for the --batch-size parameter (rustformers#94)
Browse files Browse the repository at this point in the history
* Added support to cached sessions in REPL mode

* Fixed the --batch-size parameter, the default value was being used regardless of the value provided by the user.
  • Loading branch information
Metalflame12 authored Mar 31, 2023
1 parent f0e5cda commit 599a354
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion llama-rs/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1461,7 +1461,7 @@ impl InferenceSession {
return Err(InferenceError::ContextFull);
}

for batch in prompt_tokens.chunks(8) {
for batch in prompt_tokens.chunks(params.n_batch) {
model.evaluate(self, params, batch, &mut EvaluateOutputRequest::default());
for &tk in batch {
// NOTE: No string ever tokenizes to the end of sentence. So we
Expand Down

0 comments on commit 599a354

Please sign in to comment.