Git Product home page Git Product logo

Hello, Dr. Vu ! Can you teach me how to use this tool transformer-lm? What command parameters should I use to use this tool? Can you tell me the relevant tutorials? Sorry to bother you. about transformer-dynet HOT 2 CLOSED

duyvuleo avatar duyvuleo commented on June 11, 2024
Hello, Dr. Vu ! Can you teach me how to use this tool transformer-lm? What command parameters should I use to use this tool? Can you tell me the relevant tutorials? Sorry to bother you.

from transformer-dynet.

Comments (2)

Sawndip avatar Sawndip commented on June 11, 2024

And when I called the function initialise_params_from_file( ) of this code line , it is found that the function called is problematic and can not load the model.

from transformer-dynet.

duyvuleo avatar duyvuleo commented on June 11, 2024

Hi @Sawndip : you have to train the model first before being able to use it for sampling.

You may use the following command line:

mkdir  <your_folder>/model
nice ./build_gpu/transformer-lm --max-seq-len 100 --minibatch-size 1024 --treport 512 --dreport 20000 --vocab <vocab_file> -t <training_data_file> -d <dev_data_file> -p <your_folder>/model -e 100 --lr-eta 0.1 --lr-patience 10 --patience 20 --lr-eta-decay 2 --emb-dropout-p 0.1 --sublayer-dropout-p 0.1 --attention-dropout-p 0.1 --ff-dropout-p 0.1 --ff-activation-type 1 --nlayers 4 --num-units 512 --num-heads 4 --use-label-smoothing --label-smoothing-weight 0.1 --position-encoding 2 --reset-if-stuck --use-smaller-minibatch --num-resets 5 &><your_folder>/model/train.log &

Note that: <training_data_file> and <dev_data_file> have to be created by ./scripts/wrap-data.py as follows:

./scripts/wrap-data.py <train_file> <dev_file> <test_file> [<vocab_file>|<word_cutoff_freq>]

--vocab <vocab_file> can be used if you already have the existing vocabulary file, otherwise ignore it.

from transformer-dynet.

Related Issues (4)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.