Installation and usage of gatorTron model without GPU

I am trying to use gatorTron LM for AI conversation. After all installations and setups, as per the documentation when i run the command —>>>> python tools/preprocess_data.py --input my-corpus.json --output-prefix my-bert --vocab-file …python_experiment\my_local_vocab_files\bert-vocab.txt --tokenizer-type BertWordPieceLowerCase --split-sentences

getting error as warnings.warn(“Can’t initialize NVML”)
No CUDA runtime is found, using CUDA_HOME=‘/usr’
Traceback (most recent call last):
File “/home/shehbaz/Desktop/gatorTron/Megatron-LM-main/tools/preprocess_data.py”, line 23, in
from megatron.training.tokenizer import build_tokenizer
File “/home/shehbaz/Desktop/gatorTron/Megatron-LM-main/megatron/training/init.py”, line 16, in
from .initialize import initialize_megatron
File “/home/shehbaz/Desktop/gatorTron/Megatron-LM-main/megatron/training/initialize.py”, line 18, in
from megatron.training.arguments import parse_args, validate_args
File “/home/shehbaz/Desktop/gatorTron/Megatron-LM-main/megatron/training/arguments.py”, line 13, in
from megatron.core.models.retro.utils import (
File “/home/shehbaz/Desktop/gatorTron/Megatron-LM-main/megatron/core/models/retro/init.py”, line 12, in
from .decoder_spec import get_retro_decoder_block_spec
File “/home/shehbaz/Desktop/gatorTron/Megatron-LM-main/megatron/core/models/retro/decoder_spec.py”, line 9, in
from megatron.core.models.gpt.gpt_layer_specs import (
File “/home/shehbaz/Desktop/gatorTron/Megatron-LM-main/megatron/core/models/gpt/init.py”, line 1, in
from .gpt_model import GPTModel
File “/home/shehbaz/Desktop/gatorTron/Megatron-LM-main/megatron/core/models/gpt/gpt_model.py”, line 17, in
from megatron.core.transformer.transformer_block import TransformerBlock
File “/home/shehbaz/Desktop/gatorTron/Megatron-LM-main/megatron/core/transformer/transformer_block.py”, line 16, in
from megatron.core.transformer.custom_layers.transformer_engine import (
File “/home/shehbaz/Desktop/gatorTron/Megatron-LM-main/megatron/core/transformer/custom_layers/transformer_engine.py”, line 9, in
import transformer_engine as te
ModuleNotFoundError: No module named ‘transformer_engine’.

Help me out in this.

Hi @shehbaz.shaikh and welcome to the NVIDIA developer forums.

I really do not know what you are trying to achieve. It would help if you would share which documentation you are referring to.

If you are trying to use for example NeMo with Megatron weights, you will likely need a GPU. The project that you are setting up, whatever it might be, probably has implicit usage of CUDA, which you do not seem to have installed.

Without more information I am afraid we will not be able to help here.

Thanks.

Basically, we are trying to use gatorTron model for AI conversations without using GPU and we followed Megatron-LM/README.md at main · NVIDIA/Megatron-LM · GitHub.

Hi again.

I wasn’t sure I had read correctly.

Megatron does not work without GPU. It even states the same in the title.

GPU optimized techniques for training transformer models at-scale

This is designed to run on HPC clusters like DGX nodes or similar.

hi,
can you help us out how to achieve this without GPU. is there any other way ?