javirandor
commited on
Commit
•
0dd2273
1
Parent(s):
541b81a
Update README.md
Browse files
README.md
CHANGED
@@ -34,14 +34,13 @@ The model inherits the [GPT2LMHeadModel](https://huggingface.co/docs/transformer
|
|
34 |
|
35 |
### Password Generation
|
36 |
|
37 |
-
Passwords can be sampled from the model using the [built-in generation methods](https://huggingface.co/docs/transformers/v4.30.0/en/main_classes/text_generation#transformers.GenerationMixin.generate) provided by HuggingFace and using the "start of password token" as seed (i.e. `<s>`). This code can be used to generate one password with PassGPT.
|
38 |
|
39 |
```
|
40 |
from transformers import GPT2LMHeadModel
|
41 |
from transformers import RobertaTokenizerFast
|
42 |
|
43 |
tokenizer = RobertaTokenizerFast.from_pretrained("javirandor/passgpt-10characters",
|
44 |
-
use_auth_token="YOUR_ACCESS_TOKEN",
|
45 |
max_len=12,
|
46 |
padding="max_length",
|
47 |
truncation=True,
|
@@ -52,7 +51,7 @@ tokenizer = RobertaTokenizerFast.from_pretrained("javirandor/passgpt-10character
|
|
52 |
pad_token="<pad>",
|
53 |
truncation_side="right")
|
54 |
|
55 |
-
model = GPT2LMHeadModel.from_pretrained("javirandor/passgpt-10characters"
|
56 |
|
57 |
NUM_GENERATIONS = 1
|
58 |
|
|
|
34 |
|
35 |
### Password Generation
|
36 |
|
37 |
+
Passwords can be sampled from the model using the [built-in generation methods](https://huggingface.co/docs/transformers/v4.30.0/en/main_classes/text_generation#transformers.GenerationMixin.generate) provided by HuggingFace and using the "start of password token" as seed (i.e. `<s>`). This code can be used to generate one password with PassGPT.
|
38 |
|
39 |
```
|
40 |
from transformers import GPT2LMHeadModel
|
41 |
from transformers import RobertaTokenizerFast
|
42 |
|
43 |
tokenizer = RobertaTokenizerFast.from_pretrained("javirandor/passgpt-10characters",
|
|
|
44 |
max_len=12,
|
45 |
padding="max_length",
|
46 |
truncation=True,
|
|
|
51 |
pad_token="<pad>",
|
52 |
truncation_side="right")
|
53 |
|
54 |
+
model = GPT2LMHeadModel.from_pretrained("javirandor/passgpt-10characters").eval()
|
55 |
|
56 |
NUM_GENERATIONS = 1
|
57 |
|