Skip to main content

mellea.backends.aloras.openai.granite_aloras

OpenAI implementations for IBM’s “starter pack” of Activated LoRAs.

Functions

processing

processing(mot: ModelOutputThunk, chunk: Completion)
Called to process the incoming chunks.

post_processing

post_processing(backend: OpenAIBackend, mot: ModelOutputThunk)
Called after all data has been received.

add_granite_aloras

add_granite_aloras(backend: OpenAIBackend)
Adds the IBM Granite “starter pack” ALoras to a backend.

Classes

OpenAIConstraintAlora

The Requirement Checking ALora for Granite 3.2 8B checks if the specified requirement was satisfied by the most recent model generation. Only one requirement is checked at a time. Methods:

generate_using_strings

generate_using_strings(self, input: str, response: str, constraint: str, force_yn: bool = True, stream: bool = False) -> ModelOutputThunk
Generates a constraint response from the ALora. Must be run in a running event loop.
I