Skip to content

Commit 98a1bca

Browse files
committed
fix readme
1 parent e7ac291 commit 98a1bca

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,13 @@ wrapped_to_values = Rank1EditModule(
4141
num_finetune_prompts = 32
4242
)
4343

44-
prompt_ids = torch.arange(4).long()
45-
text_enc = torch.randn(4, 256, 512)
44+
text_enc = torch.randn(4, 256, 512) # regular input
45+
text_enc_with_superclass = torch.randn(4, 256, 512) # init_input in algorithm 1, for key-locking
4646
concept_ids = torch.randint(0, 256, (4,))
4747

48-
keys = wrapped_to_keys(prompt_ids, text_enc, concept_ids)
49-
values = wrapped_to_values(prompt_ids, text_enc, concept_ids)
48+
49+
keys = wrapped_to_keys(text_enc, text_enc_with_superclass, concept_ids)
50+
values = wrapped_to_values(text_enc, text_enc_with_superclass, concept_ids)
5051
```
5152

5253
## Todo

0 commit comments

Comments
 (0)