loretoparisi / fasttext.js

FastText for Node.js
MIT License
192 stars 28 forks source link

Question : usage of pretrainedVectors? #24

Closed devajith closed 3 years ago

devajith commented 3 years ago

when i'm trying to train a text classifier using pretrainedVectors: ./wiki.da.vec' resulting in model having size 2.79 GB and taking more time than usual.

var fastText = new FastText({
        serializeTo: './output_model',
        trainFile: './input.txt',
        debug: true,
        train: {
            dim: 300,
            pretrainedVectors: './wiki.da.vec'
        }
    });

Did the same with fasttext python library model = fasttext.train_supervised('input.txt', dim=300, pretrainedVectors='wiki.da.vec',verbose=4)

And getting model with size 300+ MB and giving proper classification.

Did i miss anything while using fasttext.js ?

devajith commented 3 years ago

Ok. i got it. used option from here : https://fasttext.cc/docs/en/options.html