Add popular Hugging Face and Ollama shortname mappings - #2796
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughAdds many new and retargeted model shortname aliases in shortnames/shortnames.conf, introduces a static repo catalog, a Make target to refresh it, implements catalog-based source-priority validation in ramalama/shortnames.py, integrates the check into the CLI, and adds unit tests for the new validation. ChangesModel shortname alias expansion
Repo catalog & validation
Sequence Diagram(s)(omitted) Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Code Review
This pull request adds several new model shortnames and their corresponding Hugging Face GGUF repository URLs to the configuration file, including models from Cogito, DeepSeek, GLM, Granite, Llama, Minimax, Mistral, Nemotron, Qwen, and others. A review comment identified a potential typo in the repository URL for the "glm-5" model, where a dot was used instead of an underscore, which could lead to a 404 error.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| "glm-4.6-vl" = "hf://ggml-org/GLM-4.6V-GGUF" | ||
| "glm-4.6v-flash" = "hf://bartowski/zai-org_GLM-4.6V-Flash-GGUF" | ||
| "glm-4.7" = "hf://bartowski/zai-org_GLM-4.7-GGUF" | ||
| "glm-5" = "hf://DevQuasar/zai-org.GLM-5-GGUF" |
There was a problem hiding this comment.
The repository name zai-org.GLM-5-GGUF seems to have a typo. Standard GGUF repository naming conventions use an underscore _ instead of a dot . to replace the slash / in the original repository name (e.g., zai-org/GLM-5 becomes zai-org_GLM-5-GGUF). Please verify if this should be zai-org_GLM-5-GGUF to avoid 404 errors when downloading.
"glm-5" = "hf://DevQuasar/zai-org_GLM-5-GGUF"
There was a problem hiding this comment.
Cursor responds.
Gemini flagged the glm-5 entry on line 85:
shortnames.conf
Lines 85-86
"glm-5" = "hf://unsloth/GLM-5-GGUF"
"glm-5.1" = "hf://bartowski/zai-org_GLM-5.1-GGUF"
It thought DevQuasar/zai-org.GLM-5-GGUF was a typo and suggested zai-org_GLM-5-GGUF instead.
Gemini’s suggested fix would be wrong — DevQuasar/zai-org.GLM-5-GGUF is a real repo (DevQuasar uses . in names), while DevQuasar/zai-org_GLM-5-GGUF does not exist. There’s also no bartowski/zai-org_GLM-5-GGUF yet (only the 5.1 quant).
What I changed: point glm-5 at unsloth/GLM-5-GGUF instead, which:
Uses normal repo naming (no confusing dot)
Matches our secondary-source preference when bartowski isn’t available
Has more downloads (~4.4k vs ~146)
Pushed as commit 00460514 on shortnames-popular-models for PR #2796. You can reply on the review that the dot wasn’t a typo, but we switched to unsloth for clearer naming and better maintenance.
| "nemotron:51b" = "hf://bartowski/Llama-3_1-Nemotron-51B-Instruct-GGUF" | ||
| "nemotron:70b" = "hf://bartowski/Llama-3.1-Nemotron-70B-Instruct-HF-GGUF" | ||
| "nemotron:120b" = "hf://lmstudio-community/NVIDIA-Nemotron-3-Super-120B-A12B-GGUF" | ||
| "nemotron-3-nano" = "hf://lmstudio-community/NVIDIA-Nemotron-3-Nano-30B-A3B-GGUF" |
There was a problem hiding this comment.
can we use the bartowski models?
89c4dd6 to
7fa12dc
Compare
There was a problem hiding this comment.
Actionable comments posted: 5
🧹 Nitpick comments (1)
test/unit/test_shortnames.py (1)
62-76: ⚡ Quick winAdd a regression test for non-whitelisted community orgs.
Current coverage only exercises
unsloth(explicitly listed). Add one case with an org not inCOMMUNITY_ORGS(for exampleTheDrummer) to lock in priority-2 behavior and catch the false-negative path.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@test/unit/test_shortnames.py` around lines 62 - 76, Update the unit test test_check_source_priority_prefers_official_over_community to also cover a non-whitelisted community org (e.g., "TheDrummer") so Shortnames.check_source_priority exercises the priority-2 fallback path; specifically, add a second conf entry or a separate assertion where the shortname points to hf://TheDrummer/ModelName and include that org in the catalog only under a community key (not in COMMUNITY_ORGS), then assert the returned violation recommends hf://ggml-org/ModelName (priority 2) instead of hf://TheDrummer/ModelName to lock in the non-whitelisted community-org behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@Makefile`:
- Around line 138-143: The install-shortnames target currently only installs
shortnames.conf but the new validation needs repo-catalog.json next to the
config; update the install-shortnames Makefile target so it installs both
shortnames.conf and shortnames/repo-catalog.json (place repo-catalog.json beside
shortnames.conf in the install destination) and ensure any checksum/packaging
steps that reference shortnames.conf also include repo-catalog.json; look for
the Makefile targets named install-shortnames and refresh-shortnames-catalog and
add the copy/install action for repo-catalog.json accordingly.
- Around line 140-143: The one-liner in the Makefile repeatedly calls fetch(org)
and uses urllib.request.urlopen without a timeout, which can hit rate limits or
hang; modify the inline Python so fetch (the lambda named fetch) is called
exactly once per unique org and each network call to urllib.request.urlopen
includes a timeout and basic exception handling; build a small dict/cache by
iterating the org list, storing results per org, then construct catalog (the
variable catalog with keys "bartowski" and "official") from those cached
responses and write to "shortnames/repo-catalog.json" as before.
In `@ramalama/shortnames.py`:
- Around line 119-122: Replace PEP 604 union syntax that breaks Python 3.9 with
typing's Optional/Union: change return and variable type annotations like "->
tuple[str, str, str] | None" to "-> Optional[Tuple[str, str, str]]" and any
"dict | None" or "X | None" to "Optional[dict]" / "Optional[X]" (and "A | B" to
"Union[A, B]") in functions such as _split_hf_target and the other occurrences
around the noted locations (~150, ~171, ~249); add the required imports from
typing (Optional, Tuple, Union) if not already present and update any tuple/list
generics to use typing forms so the module parses under Python 3.9.
- Around line 119-129: The _split_hf_target function can raise ValueError when
rest lacks a "/" (e.g., "hf://repo-only"); update _split_hf_target to
defensively validate rest before splitting (check for "/" or catch exceptions)
and return None for malformed targets so callers treat them as non-hf targets
instead of aborting; ensure this logic still handles the quant suffix path
(referencing KNOWN_QUANT_SUFFIXES, variables rest, quant, base, suffix and the
return tuple org, repo, quant).
- Around line 209-217: The priority-2 "official" fallback is only executed when
org is in COMMUNITY_ORGS or LEGACY_ORGS, missing other non-official orgs; change
the guard so the official_indexes lookup runs for any org that is not an
official org (e.g., replace "if org in COMMUNITY_ORGS or org in LEGACY_ORGS:"
with a negative membership check like "if org not in OFFICIAL_ORGS:" or
equivalent), then keep the loop over official_indexes and the
Shortnames._find_catalog_repo check to append violations as before (refer to
COMMUNITY_ORGS, LEGACY_ORGS, OFFICIAL_ORGS, official_indexes,
Shortnames._find_catalog_repo, violations, name, quant_suffix, target).
---
Nitpick comments:
In `@test/unit/test_shortnames.py`:
- Around line 62-76: Update the unit test
test_check_source_priority_prefers_official_over_community to also cover a
non-whitelisted community org (e.g., "TheDrummer") so
Shortnames.check_source_priority exercises the priority-2 fallback path;
specifically, add a second conf entry or a separate assertion where the
shortname points to hf://TheDrummer/ModelName and include that org in the
catalog only under a community key (not in COMMUNITY_ORGS), then assert the
returned violation recommends hf://ggml-org/ModelName (priority 2) instead of
hf://TheDrummer/ModelName to lock in the non-whitelisted community-org behavior.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 84b61281-9858-4893-9faa-0579aea34a7b
📒 Files selected for processing (5)
Makefileramalama/shortnames.pyshortnames/repo-catalog.jsonshortnames/shortnames.conftest/unit/test_shortnames.py
🚧 Files skipped from review as they are similar to previous changes (1)
- shortnames/shortnames.conf
ecb88df to
f462859
Compare
f462859 to
73786e7
Compare
|
@olliewalsh How does this look? Is it too much? |
The huge models are too much maybe. That's into datacenter-class hardware territory. |
|
I don't know why we should limit the size of the models the user would want to pull. If the user wants to pull a HUGE model and run it with llama.cpp, I see no reason to block it. |
We are not limiting the model size, just not sure if adding shortnames for huge models makes sense - anyone with that class of hardware needs to know what they are doing. ... but it's just a few entries so doesn't matter in the grand scheme of things :-) |
c132536 to
0467a57
Compare
0467a57 to
d6a042b
Compare
|
@olliewalsh what do you want removed, I want to get the new GLP model in, since it is in the news quite a bit. |
|
GLM not GLP, AI never looses weight. |
Who is going to be able to run it? GLM 5.2 @ Q4_K_M needs around 500GB |
|
So users will not be able to run glm-5.2 on local laptops without HUGE memory. |
dfbc153 to
01faf93
Compare
|
Ok I removed the default to GLM go point at 5.2. Any other you would want removed. |
Do we have a target user in mind? cogito-671b-v2.1-GGUF is huge too... I haven't check the other models but anything with hundreds of billions of params is likely to require datacenter hardware |
|
Sure but if a user wants to use the tool to pull a specific model via the name cogito-2.1 I don't see a reason not to pull it. I am not sure there is much value in making it more difficult for users to pull models on platforms that could not run them, especially when we don't know the heuristics of what can and can not run. Also these numbers will change over time. |
|
At least I would follow to recommendations and use a 2bit quant - https://unsloth.ai/docs/models/tutorials/cogito-v2-how-to-run-locally For novice/casual users with consumer-level hardware I think it's find to choose a sensible default. I don't see the point in adding shortnames for these datacenter class models though. |
64cfed9 to
5c139ee
Compare
| "deepseek-coder:6.7b" = "hf://TheBloke/deepseek-coder-6.7b-instruct-GGUF" | ||
| "deepseek-coder:33b" = "hf://TheBloke/deepseek-coder-33b-instruct-GGUF" | ||
| "deepseek-r1" = "hf://bartowski/DeepSeek-R1-GGUF" | ||
| "deepseek-v3" = "hf://unsloth/DeepSeek-V3-GGUF" |
There was a problem hiding this comment.
I would not remove any existing shortnames. It is potentially a breaking change for users.
| # - Datacenter-class models (typically 100B+ parameters or requiring 100GB+ RAM/VRAM) | ||
| # Examples: 671B MoE, 675B, 550B Ultra, 480B coder, 397B, 235B VL, 120B+ | ||
| # - When a trending Ollama tag maps only to a datacenter model, omit the shortname | ||
| # - Users with datacenter hardware can pull models directly via hf:// URLs |
There was a problem hiding this comment.
The hf:// isn't necessary now, can just pull <org>/<model>
There was a problem hiding this comment.
I don't think this is correct, if the user changes the default to ollama or oci, then the lack of hf:// will cause shortnames to blow up, I believe.
There was a problem hiding this comment.
Yeah, not suggest the shortnames drop the prefix
Map trending Ollama library models and recent HF GGUF releases to shortnames, including DeepSeek V3/V4, GLM 4.7/5, Ministral 3, Qwen3 variants, Llama 4, and Granite 4.1. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com> Co-authored-by: Cursor <cursoragent@cursor.com> Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
5876a59 to
67d2554
Compare
| "deepseek-v3.1" = "hf://bartowski/deepseek-ai_DeepSeek-V3.1-GGUF" | ||
| "deepseek-v3.1:671b" = "hf://bartowski/deepseek-ai_DeepSeek-V3.1-GGUF" | ||
| "deepseek-v3.2" = "hf://unsloth/DeepSeek-V3.2-GGUF" | ||
| "deepseek-v4-flash" = "hf://antirez/deepseek-v4-gguf" |
There was a problem hiding this comment.
model card says "This quants are specific for the DS4 inference engine."
| "deepseek-v3.1:671b" = "hf://bartowski/deepseek-ai_DeepSeek-V3.1-GGUF" | ||
| "deepseek-v3.2" = "hf://unsloth/DeepSeek-V3.2-GGUF" | ||
| "deepseek-v4-flash" = "hf://antirez/deepseek-v4-gguf" | ||
| "deepseek-v4-pro" = "hf://teamblobfish/DeepSeek-V4-Pro-GGUF" |
There was a problem hiding this comment.
"GGUF quantizations of deepseek-ai/DeepSeek-V4-Pro for use with the V4-aware llama.cpp fork at cchuter/llama.cpp @ feat/v4-port-cuda."
There was a problem hiding this comment.
@rhatdan I don't think delegating this to Cursor is working well
Map trending Ollama library models and recent HF GGUF releases to shortnames, including DeepSeek V3/V4, GLM 4.7/5, Ministral 3, Qwen3 variants, Llama 4, and Granite 4.1.