nicknochnack / GPTNeo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Killed "Bug"

adnan-fakahr-pk-90 opened this issue · comments

When I run this command
generator = pipeline('text-generation', model='EleutherAI/gpt-neo-2.7B')
or even download the model in a folder like this
generator = pipeline('text-generation', model=neo-models/')

It is not loading and produce the result as "Killed" text.
which usually means "out of memory"

even though I have nothing loaded except pycharm GUI

I have tested this on Ubuntu and Centos Server. Same result

below is the whole code:

import gc
import os
from transformers import pipeline
import torch

gc.collect()
print("================1")
generator = pipeline('text-generation', model='EleutherAI/gpt-neo-2.7B') ====> here comes the KILLED
#generator = pipeline('text-generation', model='neo-models/'')
print("================2")
prompt = "what is the meaning of life"
res = generator(prompt, max_length=50, do_sample=True, Temperature=0.9)
print("================")
print(res)