gpt-j icon indicating copy to clipboard operation
gpt-j copied to clipboard

how do i install it?

Open oogxdd opened this issue 3 years ago • 14 comments

i'm new to python. can i use some help?

oogxdd avatar Jul 05 '21 21:07 oogxdd

That's quite alright I'm pretty new at python myself. I've been using it for 2 years 🙂. This isn't exactly a python package yet but to use download the latest release, in the example.py file copy, what I have in the "Usage" section that can be found in https://github.com/TheProtaganist/gpt-j. Then if you are using an ide or idle use "find-replace" and where it says bot replace that with the person or character you wish to talk create. Where it says user you can put in any name. In a python, editor go to where it says edit, scroll down till you see replace and replace bot and user one by one. Then in the sample dialog just replace the current text with any conversation you want (the bot or whatever you replaced bot with being the one who will respond). I suggest you only replace the bot and user values changing the other values might cause problems. One last piece of advice. Keep numbers (temperature 0.3 and top_p 0.6) as low as possible. somewhere between 1 and zero will work. If you have any more questions feel free to ask.

TheProtaganist avatar Jul 06 '21 01:07 TheProtaganist

yeah i mean more like how to install GPTJ dependency? i tried to do it with pip but no success

i'm trying to run example.py file but it says it can't resolve GPTJ dependency

oogxdd avatar Jul 06 '21 10:07 oogxdd

sorry for the inconvenience. It seems I forgot to add a requirements text in my program. Try installing requests library and see if it works. In the meantime, I'll add requirements.txt to the repository.

TheProtaganist avatar Jul 06 '21 14:07 TheProtaganist

It would appear the site is down again. It might be up in a few. Sorry for this. I'll let you know when it is fixed...

TheProtaganist avatar Jul 06 '21 15:07 TheProtaganist

KK can't wait to try the api

oogxdd avatar Jul 06 '21 16:07 oogxdd

I'm working on a lot of things right now and I should have a new release ready in no time. Good news the site is back online!!! I'll have it ready soon.

TheProtaganist avatar Jul 06 '21 18:07 TheProtaganist

Working on a few bugs I'll have it ready by tomorrow...

TheProtaganist avatar Jul 08 '21 03:07 TheProtaganist

It would appear I accidentally deleted the files of the project by trying to upload my first package. I'm very sorry for the delay. I'll have it ready no later than tomorrow. I just need to recover some files.

TheProtaganist avatar Jul 08 '21 22:07 TheProtaganist

no worries. i seem to got it working with a node server

although i like where you're going. i want to build a tl;dr summarizer with gpt-j but found that it doesn't treat "tl;dr:" keyword same way gpt-3 does and produces you generation instead of summarisation

but now i see in your repo how i can train the model by providing it example and hope that would work (if i feed it a couple of tldr's)

i'm using an endpoint provided by https://github.com/vicgalle/gpt-j-api. do you know if i can use advance features with this endpoint?

i'm also curious in using python more so will be looking for your lib to be ready as well 😇

oogxdd avatar Jul 09 '21 08:07 oogxdd

All done! do pip install gptj and import GPTJ.Basic_api and GPTJ.gptj_api or after you have installed it just download the files I provided here and change the prompts to something that fits your needs. I published the gptj package on PyPI yesterday. I was gonna inform you but I was too tried after working on the project all day. It was like 12:00AM. Thank you for your interest in this project if you have any more questions feel free to ask 🤗

TheProtaganist avatar Jul 09 '21 13:07 TheProtaganist

I am planning to add an examples folder with a list of prompts you can give. Bad words are censored and it will return an error if anyone is using the API for spam. But the examples you can give are literally endless as long as it doesn't contain offensive content. I am kinda tired after working on projects all day but I'll have an examples folder ready soon.

TheProtaganist avatar Jul 09 '21 14:07 TheProtaganist

new version 2.2.2 added install to get rid of single-line responses from the previous version 2.2.0

TheProtaganist avatar Jul 09 '21 15:07 TheProtaganist

any suggestions on how i can implement content filter? (to exclude an offensive content)

oogxdd avatar Jul 09 '21 16:07 oogxdd

I already did that. I used an algorithm to make sure that if someone is using it for spam it will give a message that they can't use spam. But for the bot response, I would suggest you set the examples to words that don't contain bad words (Although it wouldn't be possible to give bad words because they blocked). I suggest from GPTJ.security import check_for_insults (if check_for_insults(response) != "" (contains insults): do (your code))

TheProtaganist avatar Jul 09 '21 16:07 TheProtaganist