Skip to main content

repo_short_name

Function repo_short_name 

Source
pub fn repo_short_name(repo_id: &str) -> &str
Expand description

Strip a HuggingFace repo id down to its final path segment.

"unsloth/Qwen3-8B-GGUF" -> "Qwen3-8B-GGUF". A bare id with no / is returned unchanged. A trailing / yields an empty string, matching str::split('/').next_back() semantics. Does not strip a -GGUF suffix — callers that need the repository name as-is (e.g. search results) should use this directly; resolve_model_name layers strip_gguf_suffix on top.