Comments (5)
This error happens when the input training data is too small. Could you try spm_train with larger data?
spm_train first generates the minimum vocabulary set with
- (almost) all unique characters in the training data.
- Substrings that have no less than two times occurrences in the corpus. These substrings will not cross word boundary (whitespaces)
For example, if the input corpus is "a b c d a b c", the minimum vocabulary set is 3. (a b and c)
spm train fails when the size of minimum vocabulary set is smaller than --vocab_size.
I will make the error message more easy-to-understand.
from sentencepiece.
I've added --hard_vocab_limit flag.
The vocab size is considered as "soft limit" when running ./spm_train --hard_vocab_limit=false.
Thank you.
from sentencepiece.
A similar thing happened to me on a 256 GB Debian 8 x64 machine with --vocab_size=16000, unigram.
from sentencepiece.
I got the same error, and fixed it by decreasing the vocab size. I think too big of a vocabulary can also generate issues when trying to save the final results.
from sentencepiece.
I feel like it would be useful to have an option which would treat vocab_size
as an upper bound rather than a hard value. That is, if this option were enabled and vocab_size
turns out to be too large, spm_train would fall back to the minimum vocabulary rather than aborting.
from sentencepiece.
Related Issues (20)
- Segmentation fault (core dumped) HOT 2
- How to safely extend vocabulary? HOT 3
- Extract & modify the merge rules from the .model file of a SentencePiece BPE model HOT 1
- Same oov count while using different vocab size HOT 2
- Evaluate Profile-Guided Optimization (PGO)
- Official support for Android compilation in Release/Assets HOT 1
- Merging tokenizers issue HOT 4
- RuntimeError HOT 1
- coredump when build with CXXFLAG `-Wp,-D_GLIBCXX_ASSERTIONS` HOT 4
- High frequency token segmented into letter sequence when input is a tsv file HOT 3
- Error while installing the library "sentence-transformers" which has dependency on "sentencepiece" HOT 11
- Getting requirements to build wheel did not run successfully. HOT 5
- Not found google.protobuf packages HOT 1
- error while installing sentencepiece python 3.12.2 HOT 2
- Many tests fail HOT 2
- entry points return non-zero exit code (at least for `--help`) HOT 2
- HELP NEEDED Mask Token in SentencePiece tokenizer HELP NEEDED HOT 1
- Sequence of byte '<0x09>' as token HOT 1
- TSV for NFC normalization HOT 1
- Allow whitespace-only pieces
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sentencepiece.