pandora_llm.features.base.LLMHandler

Module Contents

class pandora_llm.features.base.LLMHandler.LLMHandler(model_name, model_revision=None, model_cache_dir=None)[source]

Base class for handling the loading/unloading of large language models.

Parameters:
  • model_name (str)

  • model_revision (str)

  • model_cache_dir (str)

model[source]

the model to be attacked

Type:

AutoModelForCausalLM

model_name[source]

path to the model to be attacked

Type:

str

model_revision[source]

revision of the model to be attacked

Type:

str

cache_dir

directory to cache the model

Type:

str

model = None[source]
model_name[source]
model_revision = None[source]
model_cache_dir = None[source]
load_model()[source]

Loads model into memory

Return type:

None

unload_model()[source]

Unloads model from memory

Return type:

None