MCPcopy Create free account
hub / github.com/Tiiny-AI/PowerInfer / has_budget

Method has_budget

examples/server/server.cpp:427–438  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

425 }
426
427 bool has_budget(gpt_params &global_params) {
428 n_remaining = -1;
429 if(params.n_predict != -1)
430 {
431 n_remaining = params.n_predict - n_decoded;
432 }
433 else if (global_params.n_predict != -1)
434 {
435 n_remaining = global_params.n_predict - n_decoded;
436 }
437 return n_remaining > 0 || n_remaining == -1; // no budget || limitless
438 }
439
440 bool available() const {
441 return state == IDLE && command == NONE;

Callers 1

process_tokenMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected