add n_batch support for llama.cpp (#1115)

This commit is contained in:
eiery 2023-04-24 02:46:18 -04:00 committed by GitHub
parent 2f6e2ddeac
commit 78d1977ebf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 1 deletions

View file

@ -24,7 +24,8 @@ class LlamaCppModel:
'model_path': str(path),
'n_ctx': 2048,
'seed': 0,
'n_threads': shared.args.threads or None
'n_threads': shared.args.threads or None,
'n_batch': shared.args.n_batch
}
self.model = Llama(**params)
self.model.set_cache(LlamaCache)