dima806's picture
Update README.md
7421071 verified
metadata
license: apache-2.0
metrics:
  - accuracy
base_model:
  - google-bert/bert-base-cased

Uses BERT model and trained it on ~2 million most common and randomly generated passwords to check the password strength.

Works well (weighted accuracy 99.4%) for passwords not exceeding 10 symbols.

Note that in hosted inference API, due to the default tokenizer, there is no difference between lower and upper case letters.

To use the model with the correct tokenizer, you need to invoke the model as follows:

# Use a pipeline as a high-level helper - need to specify cased tokenizer
from transformers import pipeline

pipe = pipeline("text-classification", model="dima806/strong-password-checker-bert", tokenizer="bert-base-cased")

See https://www.kaggle.com/code/dima806/passwords-strength-checker-bert for details.