Ai Dreams Forum

Member's Experiments & Projects => General Project Discussion => Topic started by: CompSciSarah on April 29, 2020, 05:26:46 pm

Title: Trying to get GPT-2 Working on Linux?
Post by: CompSciSarah on April 29, 2020, 05:26:46 pm
I'm interested in installing the GPT-2 model for a book on futurism I'm writing (so that "a voice of the future" so to speak can have its own entry).

I'm having issues installing it though. The older tutorials for how to do so are broken, and I can't figure out how to install the most recent version from github. Cloning the git directory doesn't help much. I'm running Kubuntu 18.04LTS BTW

Thanks!
Title: Re: Trying to get GPT-2 Working on Linux?
Post by: ivan.moony on April 29, 2020, 07:12:35 pm
Hi O'Connor :)

Can you find an older GPT-2 version, the one that matches the tutorials you have access to?

I think Locksuit, a member around here, managed to install Windows version, if you are up to install Win OS just for that occasion.

As far as my experience goes, there are live online html-js interfaces to GPT-2 scattered over the web (https://www.google.com/search?client=ubuntu&hs=ncF&channel=fs&sxsrf=ALeKk012QT35CmL95vdAvCfKMPIclV3sjA%3A1588185474298&ei=gsmpXoLkEeKUmwXQiJe4Bw&q=gpt2+online&oq=gpt-2+&gs_lcp=CgZwc3ktYWIQAxgBMgQIIxAnMgQIABAKMgIIADIECAAQQzICCAAyBAgAEAoyAggAMgQIABAKMgQIABAKMgIIADoECAAQRzoGCAAQChBDUMr2IFi0kyFg1aghaABwA3gAgAGYAogBmAiSAQUwLjUuMZgBAKABAaoBB2d3cy13aXo&sclient=psy-ab). This version (https://transformer.huggingface.co/doc/distil-gpt2) seems pretty decent, considering your requirements. You can add on a new content after choosing between offered continuation segments, triggered repeatedly with <tab> key.
Title: Re: Trying to get GPT-2 Working on Linux?
Post by: LOCKSUIT on April 29, 2020, 10:44:29 pm
the fullest version of gpt2 needs like over 6GB on GPU, and the smaller model of gpt2 i.e. the 3rd or 2nd sizes are just as good at talking, possibly better though I can't tell. The smallest model size lacked just a bit.

openAI's github explains how to install it
make sure to use top-K = 40 parameter in the code