refactor: rename *_is_hybrid -> *_is_hybrid_recurrent

The implementation of the hybrid cache intentionally does not specify the
types of the child caches, so there was a naming mismatch with these
predicate functions that used "hybrid" to imply "hybrid recurrent."

Branch: HybridCache

Signed-off-by: Gabe Goodhart <ghart@us.ibm.com>
This commit is contained in:
Gabe Goodhart
2025-05-28 06:48:53 -06:00
parent fc9e0b576e
commit fb26e95ae7
4 changed files with 5 additions and 5 deletions

View File

@@ -573,7 +573,7 @@ extern "C" {
LLAMA_API bool llama_model_is_recurrent(const struct llama_model * model); LLAMA_API bool llama_model_is_recurrent(const struct llama_model * model);
// Returns true if the model is hybrid-recurrent (like Jamba, Bamba, etc.) // Returns true if the model is hybrid-recurrent (like Jamba, Bamba, etc.)
LLAMA_API bool llama_model_is_hybrid(const struct llama_model * model); LLAMA_API bool llama_model_is_hybrid_recurrent(const struct llama_model * model);
// Returns 0 on success // Returns 0 on success
LLAMA_API uint32_t llama_model_quantize( LLAMA_API uint32_t llama_model_quantize(

View File

@@ -1831,7 +1831,7 @@ bool llm_arch_is_recurrent(const llm_arch & arch) {
} }
} }
bool llm_arch_is_hybrid(const llm_arch & arch) { bool llm_arch_is_hybrid_recurrent(const llm_arch & arch) {
// TODO: There are currently no hybrid models! Once there are, this will be // TODO: There are currently no hybrid models! Once there are, this will be
// the place to identify them // the place to identify them
switch (arch) { switch (arch) {

View File

@@ -442,4 +442,4 @@ llm_arch llm_arch_from_string(const std::string & name);
const llm_tensor_info & llm_tensor_info_for(llm_tensor tensor); const llm_tensor_info & llm_tensor_info_for(llm_tensor tensor);
bool llm_arch_is_recurrent(const llm_arch& arch); bool llm_arch_is_recurrent(const llm_arch& arch);
bool llm_arch_is_hybrid(const llm_arch& arch); bool llm_arch_is_hybrid_recurrent(const llm_arch& arch);

View File

@@ -14384,8 +14384,8 @@ bool llama_model_is_recurrent(const llama_model * model) {
return llm_arch_is_recurrent(model->arch); return llm_arch_is_recurrent(model->arch);
} }
bool llama_model_is_hybrid(const llama_model * model) { bool llama_model_is_hybrid_recurrent(const llama_model * model) {
return llm_arch_is_hybrid(model->arch); return llm_arch_is_hybrid_recurrent(model->arch);
} }
const std::vector<std::pair<std::string, ggml_tensor *>> & llama_internal_get_tensor_map(const llama_model * model) { const std::vector<std::pair<std::string, ggml_tensor *>> & llama_internal_get_tensor_map(const llama_model * model) {