common : refactor common_sampler + grammar logic changes (#17937)
* common : refactor common_sampler + grammar logic changes * tests : increase max_tokens to get needed response * batched : fix uninitialized samplers
This commit is contained in:
+6
-6
@@ -568,10 +568,10 @@ int main(int argc, char ** argv) {
|
||||
llama_context * ctx_ttc = NULL;
|
||||
llama_context * ctx_cts = NULL;
|
||||
|
||||
common_init_result llama_init_ttc = common_init_from_params(params);
|
||||
auto llama_init_ttc = common_init_from_params(params);
|
||||
|
||||
model_ttc = llama_init_ttc.model.get();
|
||||
ctx_ttc = llama_init_ttc.context.get();
|
||||
model_ttc = llama_init_ttc->model();
|
||||
ctx_ttc = llama_init_ttc->context();
|
||||
|
||||
if (model_ttc == nullptr || ctx_ttc == nullptr) {
|
||||
return ENOENT;
|
||||
@@ -583,10 +583,10 @@ int main(int argc, char ** argv) {
|
||||
params.embedding = true;
|
||||
params.n_ubatch = params.n_batch;
|
||||
|
||||
common_init_result llama_init_cts = common_init_from_params(params);
|
||||
auto llama_init_cts = common_init_from_params(params);
|
||||
|
||||
model_cts = llama_init_cts.model.get();
|
||||
ctx_cts = llama_init_cts.context.get();
|
||||
model_cts = llama_init_cts->model();
|
||||
ctx_cts = llama_init_cts->context();
|
||||
|
||||
if (model_cts == nullptr || ctx_cts == nullptr) {
|
||||
return ENOENT;
|
||||
|
||||
Reference in New Issue
Block a user