Skip to content

Latest commit

 

History

History
89 lines (54 loc) · 2.51 KB

README.rst

File metadata and controls

89 lines (54 loc) · 2.51 KB

Language Model Playground

Neural network based Language Model implemented with PyTorch. See documentation for more details.

Environment Prerequest

  1. We use Python with version 3.8+. You can install Python with

    apt install python3.8 python3.8-dev

    Note

    Currently the latest version of Python supported by PyTorch is 3.8. That's why we install python3.8 instead of python3.10. You might need to use sudo to perform installation.

  2. We use PyTorch with version 1.10+ and CUDA with version 11.2+. This only work if you have Nvidia GPUs. You can install CUDA library with

    apt install nvidia-driver-460

    Note

    You might need to use sudo to perform installation.

  3. We use pipenv to install Python dependencies. You can install pipenv with

    pip install pipenv

    Warning

    Do not use apt to intall pipenv.

    Note

    You might want to set environment variable PIPENV_VENV_IN_PROJECT=1 to make virtual environment folders always located in your Python projects. See pipenv document for details.

Installation

  1. Clone the project from GitHub.

    git clone https://github.com/ProFatXuanAll/language-model-playground.git
  2. Change current directory to language-model-playground.

    cd language-model-playground
  3. Use pipenv to create Python virtual environment and install dependencies in Python virtual environment.

    pipenv install
  4. Launch Python virtual environment created by pipenv.

    pipenv shell
  5. 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

LICENSE

Beerware license. Anyone used this project must buy ProFatXuanAll a beer if you met him.