File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
Filter options
Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
Original file line number Diff line number Diff line change @@ -571,6 +571,10 @@ int main(int argc, char ** argv) {
571
571
model_ttc = llama_init_ttc.model .get ();
572
572
ctx_ttc = llama_init_ttc.context .get ();
573
573
574
+ if (model_ttc == nullptr || ctx_ttc == nullptr ) {
575
+ return ENOENT;
576
+ }
577
+
574
578
const llama_vocab * vocab = llama_model_get_vocab (model_ttc);
575
579
576
580
// TODO: refactor in a common struct
@@ -586,6 +590,10 @@ int main(int argc, char ** argv) {
586
590
model_cts = llama_init_cts.model .get ();
587
591
ctx_cts = llama_init_cts.context .get ();
588
592
593
+ if (model_cts == nullptr || ctx_cts == nullptr ) {
594
+ return ENOENT;
595
+ }
596
+
589
597
std::vector<common_sampler *> smpl (n_parallel);
590
598
for (int i = 0 ; i < n_parallel; ++i) {
591
599
params.sampling .no_perf = (i != 0 );
You can’t perform that action at this time.
0 commit comments