trying to fix ggjt v3
This commit is contained in:
parent
c048bcfec4
commit
5032e0fd64
2 changed files with 10 additions and 6 deletions
|
@ -318,7 +318,11 @@ ModelLoadResult gpttype_load_model(const load_model_inputs inputs, FileFormat in
|
||||||
|
|
||||||
//determine mem per token
|
//determine mem per token
|
||||||
const std::vector<int> tmp = {1, 2, 3, 4};
|
const std::vector<int> tmp = {1, 2, 3, 4};
|
||||||
llama_eval(llama_ctx_v3, tmp.data(), tmp.size(), 0, params.n_threads);
|
auto er = llama_eval(llama_ctx_v3, tmp.data(), tmp.size(), 0, params.n_threads);
|
||||||
|
if(er!=0)
|
||||||
|
{
|
||||||
|
printf("\nLLAMA EVAL returned nonzero!\n");
|
||||||
|
}
|
||||||
return ModelLoadResult::SUCCESS;
|
return ModelLoadResult::SUCCESS;
|
||||||
}
|
}
|
||||||
else if (file_format == FileFormat::RWKV_1)
|
else if (file_format == FileFormat::RWKV_1)
|
||||||
|
|
10
llama.cpp
10
llama.cpp
|
@ -1137,11 +1137,11 @@ static bool llama_eval_internal(
|
||||||
const int n_past,
|
const int n_past,
|
||||||
const int n_threads) {
|
const int n_threads) {
|
||||||
|
|
||||||
// enforce that the first token is BOS
|
// // enforce that the first token is BOS
|
||||||
if (n_past == 0 && tokens[0] != llama_token_bos()) {
|
// if (n_past == 0 && tokens[0] != llama_token_bos()) {
|
||||||
fprintf(stderr, "%s: first token must be BOS\n", __func__);
|
// fprintf(stderr, "%s: first token must be BOS\n", __func__);
|
||||||
return false;
|
// return false;
|
||||||
}
|
// }
|
||||||
|
|
||||||
const int64_t t_start_us = ggml_time_us();
|
const int64_t t_start_us = ggml_time_us();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue