Gaurav Maheshwari
  • Gaurav Maheshwari
  • Research
    • Publications
    • Master Thesis
    • Resume
  • Blogs
    • Spacy IRL, 2019
    • Installing Pytorch and Transformers on IBM Power 9 architecture
    • Bias in Natural Language Processing @EMNLP 2020
  • books
    • Currently reading
    • Recently Read
Powered by GitBook
On this page
  1. Blogs

Installing Pytorch and Transformers on IBM Power 9 architecture

To install pytorch and related components on the power 9 architecture follow these steps.

PreviousSpacy IRL, 2019NextBias in Natural Language Processing @EMNLP 2020

Last updated 4 years ago

The first step is to setup conda by following .

  • Specifically, I downloaded Anaconda installer from (scroll at the bottom of the page). I am using the the 64-Bit (Power8 and Power9) Installer (276 MB), and at the time of writing has the following download .

  • You might need to restart your terminal after the above step.

source activate

After setting up conda, follow the related to IBM cloud AI to install python modules. But make sure you are using the latest channel. Alternatively, copy the below commands.

Add a new config channel.

conda config --prepend channels \
https://public.dhe.ibm.com/ibmdl/export/pub/software/server/ibm-ai/conda-early-access/linux-ppc64le/

Note that I am using the early release version rather than 1.7 stable version. I am doing so because of the sentencepiece module needed for the transformers (huggingface).

Create a new conda environment and activate it

conda create --name early_access python=3.6
conda activate early_access

Install pytorch and ipython.

conda install pytorch
conda install ipython

List of all packages available for this channel are .

Installing Huggingface .

  • Restart terminal

    • source activate

  • Download Huggingface source and follow the below instructions.

git clone https://github.com/huggingface/transformers
cd transformers
pip install .

Check if everything is working.

ipython
>> import torch
>> import transformers 

Install

curl --proto '=https' --tlsv1.2 -sSf | sh

conda docs
here
link
documentation
here
transformers
rust compiler
https://sh.rustup.rs