chore: Add Ollama model name mappings for Granite 4.1 to intrinsics adapter resolution#1085
Open
kndtran wants to merge 1 commit into
Open
chore: Add Ollama model name mappings for Granite 4.1 to intrinsics adapter resolution#1085kndtran wants to merge 1 commit into
kndtran wants to merge 1 commit into
Conversation
…resolution The intrinsics adapter resolver uses BASE_MODEL_TO_CANONICAL_NAME to normalize base model names before looking up LoRA/aLoRA adapter paths. When serving via Ollama, the base model name is the Ollama identifier (e.g. granite4.1:3b) which needs to map to the GGUF adapter directory (e.g. granite4.1_3b). The mapping for granite4:micro already exists but the Granite 4.1 equivalents were missing, causing ValueError on adapter resolution. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
|
A PR checklist has been appended to your description. Please complete it — your original text above the Next time, you can pick a template directly from the PR description box to skip this step. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
cc: @frreiss
Misc PR
Type of PR
Description
Link to Issue: Fixes Add Ollama model name mappings for Granite 4.1 to intrinsics adapter resolution #1084
Add
granite4.1:3b,granite4.1:8b, andgranite4.1:30btoBASE_MODEL_TO_CANONICAL_NAMEinmellea/formatters/granite/intrinsics/constants.pyThese map Ollama model identifiers to their corresponding GGUF adapter directory names (e.g.
granite4.1:3b→granite4.1_3b)Follows the existing pattern for
granite4:micro→granite4_microContext
download_intrinsic_adapter()usesBASE_MODEL_TO_CANONICAL_NAMEto normalize base model names before resolving LoRA/aLoRA adapter paths in the Granite Intrinsics Library.When serving intrinsics adapters via Ollama, the base model name is the Ollama identifier (e.g.
granite4.1:3b), not the HF model ID (ibm-granite/granite-4.1-3b). Without the mapping, the resolver searches for the literal pathanswerability/granite4.1:3b/lora/io.yamlinstead ofanswerability/granite4.1_3b/lora/io.yaml, resulting in:Testing
Attribution