cuBERT

(โ˜… 545)

Fast implementation of BERT inference directly on NVIDIA (CUDA, CUBLAS) and Intel MKL

  • .gitignore
  • .travis.yml
  • CMakeLists.txt
  • devel-cpu.Dockerfile
  • devel-gpu.Dockerfile
  • devel-py.Dockerfile
  • LICENSE
  • README.md
  • test_vocab.txt

# Installation Guide

1. Get the code
git clone https://github.com/zhihu/cuBERT

Downloads the entire project code from GitHub to your computer.

cd cuBERT

Moves into the project folder you just downloaded.

2. Official Install Script

Easy Recommended
Prerequisites
  • Python 3 Python is required to use pip.
pip install dist/cuBERT-xxx.whl

Installs the package published on PyPI directly โ€” no need to clone the source.

โœ… After installing, open a new terminal and run the program's version command (e.g. --version) to confirm it worked.

Pulled directly from this repo's README.

3. CMake

Medium
Prerequisites
  • Git Needed to download the project code from GitHub.
  • CMake The tool used to generate build configuration.
  • C/C++ ์ปดํŒŒ์ผ๋Ÿฌ Windows needs Visual Studio (Community edition, free), macOS needs Xcode Command Line Tools, Linux needs the gcc/g++ package.
cmake -DCMAKE_BUILD_TYPE=Release -DcuBERT_ENABLE_GPU=ON -DCUDA_ARCH_NAME=Common ..

Type this command into your terminal and run it.

cmake -DCMAKE_BUILD_TYPE=Release -DcuBERT_ENABLE_MKL_SUPPORT=ON ..

Type this command into your terminal and run it.

โœ… Check that an executable was created inside the build folder, then run it directly (e.g. ./build/app_name).

Pulled directly from this repo's README.

4. Maven (Java)

Medium
Prerequisites
  • Git Needed to download the project code from GitHub.
  • JDK (Java) Required to build and run Java projects.
  • Maven The build tool used for the mvn command.
mvn clean package # -DskipTests

Installs dependencies and builds the project using Maven.

โœ… A BUILD SUCCESS message means it worked. The output is created under target/.

Pulled directly from this repo's README.

5. Python

Easy
Prerequisites
  • Git Needed to download the project code from GitHub.
  • Python 3 On Windows, be sure to check 'Add Python to PATH' during installation.
pip install dist/cuBERT-xxx.whl

Installs the package published on PyPI directly โ€” no need to clone the source.

โœ… If it runs without errors and prints output in the terminal, it worked.

Pulled directly from this repo's README.

// repository documentation