| 2013 | // |
| 2014 | |
| 2015 | uint32_t llama_context::graph_max_nodes(uint32_t n_tokens) const { |
| 2016 | if (model.arch == LLM_ARCH_QWEN3NEXT) { |
| 2017 | return std::max<uint32_t>(n_tokens * 40, 32u * model.n_tensors()); |
| 2018 | } |
| 2019 | uint32_t res = std::max<uint32_t>(1024u, 8u*model.n_tensors()); |
| 2020 | for (const auto & lora : model.loras) { |
| 2021 | res += lora->get_n_nodes(); |
| 2022 | } |
| 2023 | return res; |
| 2024 | } |
| 2025 | |
| 2026 | llm_graph_result * llama_context::get_gf_res_reserve() const { |
| 2027 | return static_cast<llm_graph_result *>(gf_res_reserve.get()); |
no test coverage detected