pub fn generation_config_candidates(
repo_id: &str,
tags: &[String],
) -> Vec<String>Expand description
Where to look for a generation_config.json, best candidate first.
The file lives in the base repo — Qwen/Qwen3-4B — while the GGUF a
person downloads almost always comes from a quant repo such as
unsloth/Qwen3-4B-GGUF, which carries the weights and little else. Asking
only the repo gglib downloaded from would find nothing on the overwhelming
majority of imports.
Three sources, in descending order of how much they are actually knowledge:
base_model:tags.HuggingFacegenerates these on a quant repo from its model card, in the formsbase_model:Qwen/Qwen3-4Bandbase_model:quantized:Qwen/Qwen3-4B. This is the publisher stating the relationship, so it goes first.- The download repo itself. Some publishers do ship the file beside the GGUFs, and a repo that is not a quant repo is its own base.
- The name with a quant suffix stripped, under the same owner. A
guess, and last for that reason —
unsloth/Qwen3-4B-GGUFimpliesunsloth/Qwen3-4B, which frequently does not exist. Harmless because a miss is a 404 the caller already has to handle.
Deduplicated, order-preserving, so a repo that is its own base is not asked twice.