Editor
the base class for Knowledge Editing
BaseEditor
from_hparams() -> BaseEditor
def from_hparams(cls, hparams: HyperParams):
return cls(hparams)edit()-> List[Dict]
def edit(self,
prompts: Union[str, List[str]],
target_new: Union[str, List[str]],
ground_truth: Optional[Union[str, List[str]]],
rephrase_prompts: Optional[Union[str, List[str]]] = None,
locality_inputs: Optional[Dict] = None,
portability_inputs: Optional[Dict] = None,
keep_original_weight=False,
verbose=True,
**kwargs
)batch_edit()->List[Dict]
Example
Last updated