| 2509 | model_tensors(llm_get_tensor_names(arch)) {} |
| 2510 | |
| 2511 | std::string LLM_TN_IMPL::str() const { |
| 2512 | if (LLM_TENSOR_NAMES.find(tensor) == LLM_TENSOR_NAMES.end()) { |
| 2513 | GGML_ABORT("unknown tensor name for tensor id %d", static_cast<int>(tensor)); |
| 2514 | } |
| 2515 | |
| 2516 | if (model_tensors.find(tensor) == model_tensors.end()) { |
| 2517 | return LLM_TENSOR_NAMES.at(tensor); |
| 2518 | } |
| 2519 | |
| 2520 | std::string name = ::format(LLM_TENSOR_NAMES.at(tensor), bid, xid); |
| 2521 | if (suffix != nullptr) { |
| 2522 | name += "."; |
| 2523 | name += suffix; |
| 2524 | } |
| 2525 | |
| 2526 | return name; |
| 2527 | } |
| 2528 | |
| 2529 | const char * llm_arch_name(llm_arch arch) { |
| 2530 | auto it = LLM_ARCH_NAMES.find(arch); |
no test coverage detected