Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sentencepiece options vs Vocab size #934

Open
alvations opened this issue May 27, 2022 · 1 comment
Open

Sentencepiece options vs Vocab size #934

alvations opened this issue May 27, 2022 · 1 comment
Labels

Comments

@alvations
Copy link
Collaborator

Bug description

Possibly this is a feature and not a bug.

Sometimes there's a conflict in

  • --dim-vocabs and
  • --sentencepiece-options "--character_coverage=1.0"

When the sentencepiece enforces 1.0 character_coverage, the vocab size when larger than dim-vocabs set, it throws an error of different dimensions.

How to reproduce

Try finding a dataset with --sentencepiece-options "--character_coverage=1.0" creating more no. of tokens than --dim-vocabs:

~/: $HOME/marian/build/marian --model $MODELDIR/model.npz --type transformer \
--train-sets train.en train.ja \
--vocabs vocab.src.spm vocab.trg.spm \
--dim-vocabs 8000 8000 \
--sentencepiece-options "--character_coverage=1.0" 

Context

$ ~/marian/build/marian --version
v1.11.0 f00d0621 2022-02-08 08:39:24 -0800
@alvations alvations added the bug label May 27, 2022
@alvations
Copy link
Collaborator Author

For marian devs,

Not sure what's the resolution in code though, throw a warning to user?
Updating the dim-vocabs to max(sp_vocab_size, 8000)?


For marian users, to avoid this feature/bug

Set dim-vocabs to a larger value than vocab size created by sentencepiece.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant