Trainer¶
- class linear_relational.Trainer(model, tokenizer, layer_matcher=None, prompt_validator=None)[source]¶
Train LREs and concepts from prompts
- layer_matcher¶
- model¶
- prompt_validator¶
- tokenizer¶
- train_lre(relation, subject_layer, object_layer, prompts, max_lre_training_samples=None, object_aggregation='mean', validate_prompts=True, validate_prompts_batch_size=4, move_to_cpu=False, verbose=True, seed=42)[source]¶