mirror of
https://github.com/nomic-ai/gpt4all
synced 2024-11-10 01:10:35 +00:00
Signed-off-by: Jared Van Bortel <jared@nomic.ai>
This commit is contained in:
parent
f047f383d0
commit
e94177ee9a
@ -386,7 +386,8 @@ bool LLamaModel::loadModel(const std::string &modelPath, int n_ctx, int ngl)
|
|||||||
bool isEmbedding = is_embedding_arch(llama_model_arch(d_ptr->model));
|
bool isEmbedding = is_embedding_arch(llama_model_arch(d_ptr->model));
|
||||||
const int n_ctx_train = llama_n_ctx_train(d_ptr->model);
|
const int n_ctx_train = llama_n_ctx_train(d_ptr->model);
|
||||||
if (isEmbedding) {
|
if (isEmbedding) {
|
||||||
d_ptr->ctx_params.n_batch = n_ctx;
|
d_ptr->ctx_params.n_batch = n_ctx;
|
||||||
|
d_ptr->ctx_params.n_ubatch = n_ctx;
|
||||||
} else {
|
} else {
|
||||||
if (n_ctx > n_ctx_train) {
|
if (n_ctx > n_ctx_train) {
|
||||||
std::cerr << "warning: model was trained on only " << n_ctx_train << " context tokens ("
|
std::cerr << "warning: model was trained on only " << n_ctx_train << " context tokens ("
|
||||||
|
Loading…
Reference in New Issue
Block a user