Neural network based Language Model implemented with PyTorch. See documentation for more details.
We use Python with version
3.8+
. You can install Python withapt install python3.8 python3.8-dev
We use PyTorch with version
1.10+
and CUDA with version11.2+
. This only work if you have Nvidia GPUs. You can install CUDA library withapt install nvidia-driver-460
Note
You might need to use
sudo
to perform installation.We use pipenv to install Python dependencies. You can install
pipenv
withpip install pipenv
Warning
Do not use
apt
to intall pipenv.
Clone the project from GitHub.
git clone https://github.com/ProFatXuanAll/language-model-playground.git
Change current directory to
language-model-playground
.cd language-model-playground
Use pipenv to create Python virtual environment and install dependencies in Python virtual environment.
pipenv install
Launch Python virtual environment created by pipenv.
pipenv shell
Now you can run any scripts provided by this project! For example, you can take a look at chinese poem dataset by running :py:mod:`lmp.script.sample_dset`
python -m lmp.script.sample_dset chinese-poem
Beerware license. Anyone used this project must buy ProFatXuanAll a beer if you met him.