Functions
FUNC get_adapter_for_intrinsic
repo_id: Name of Hugging Face Hub repository containing the adapters that implement the intrinsicintrinsic_name: the name of the intrinsic, like “answerability”intrinsic_adapter_types: the adapter types allowed for this intrinsic, like ALORA / LORAavailable_adapters: the available adapters to choose from; maps adapter.qualified_name to the Adapter
- an Adapter if found; else None
Classes
CLASS Adapter
An adapter that can be added to a single backend.
CLASS OpenAIAdapter
Adapter for OpenAIBackends.
Methods:
FUNC get_open_ai_path
base_model_name: the base model; typically the last part of the huggingface model id like “granite-3.3-8b-instruct”server_type: the server type (ie LOCALHOST / OPENAI); usually the backend has information on thisremote_path: optional; used only if the server_type is REMOTE_VLLM; base path at which to find the adapter
CLASS LocalHFAdapter
Adapter for LocalHFBackends.
Methods:
FUNC get_local_hf_path
base_model_name: the base model; typically the last part of the huggingface model id like “granite-3.3-8b-instruct”
CLASS GraniteCommonAdapter
Adapter for intrinsics that utilize the granite-common library.
Methods:
FUNC get_open_ai_path
base_model_name: the base model; typically the last part of the huggingface model id like “granite-3.3-8b-instruct”server_type: the server type (ie LOCALHOST / OPENAI); usually the backend has information on thisremote_path: optional; used only if the server_type is REMOTE_VLLM; base path at which to find the adapter
FUNC get_local_hf_path
base_model_name: the base model; typically the last part of the huggingface model id like “granite-3.3-8b-instruct”
FUNC download_and_get_path
base_model_name: the base model; typically the last part of the huggingface model id like “granite-3.3-8b-instruct”
- a path to the files
FUNC get_path_on_remote
CLASS AdapterMixin
Mixin class for backends capable of utilizing adapters.
Methods:
FUNC base_model_name
granite-3.3-8b-instruct for ibm-granite/granite-3.3-8b-instruct.