I'd like https://bitwarden.com/password-generator/ to be downloadable and work offline

Don’t rely on password strength testers. In this case, it is more accurate (and easier) to compute the entropy by knowing that the word list used by the Little Password Helper contains 11,501 words. Thus, in a random passphrase generated by this tool, each word contributes 13.5 bits of entropy. A four-word passphrase would have 54 bits of entropy, which is sufficient for the master password of a Bitwarden vault.

If you need a random passphrase with higher entropy (for example, if it will be used as the basis for cryptographic key generation using a fast key derivation function such as MD5 or NTLM), then you need additional words. To surpass 128 bits of entropy, you would need 10 words.