feat: alora adapters for ollama - #1622
Open
aanokh wants to merge 1 commit into
Open
Conversation
Signed-off-by: aanokh <alexander.g.anokhin@gmail.com>
Contributor
|
I've kicked off the acceptance tests; we may need to alter our test setup scripts to download different ollama models to get them to run though. |
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.
Pull Request
Issue
No dedicated issue, requested by Gabe Goodhart in the Mellea Slack thread on Ollama aLoRA support, building on Simra Faisal's earlier prototype after the Epic #929 refactor.
Description
Adds adapter function support to OllamaModelBackend, so helpers like
core.check_certainty work against an Ollama model that bundles an aLoRA
adapter (for example gabegoodhart/granite4.1-uncertainty:3b). Ollama activates the
adapter when its trigger text appears in the prompt, and the io.yaml rewriter
already appends that trigger, so the backend just mixes in AdapterMixin and
routes Intrinsic and ALoraRequirement actions to a new
_generate_from_intrinsic (inspired by the OpenAI backend), which sends the rewritten
conversation through Ollama chat with logprobs
enabled.
Testing
Verified live on Ollama 0.33.1.
Attribution
Adding a new component, requirement, sampling strategy, or tool?
If your PR adds or modifies one of the types below, check the matching box. A checklist of type-specific review items will be posted as a comment.