[HN Gopher] Customizing GPT-3 for Your Application
___________________________________________________________________
Customizing GPT-3 for Your Application
Author : grappler
Score : 75 points
Date : 2021-12-14 17:08 UTC (5 hours ago)
(HTM) web link (openai.com)
(TXT) w3m dump (openai.com)
| andrewstuart wrote:
| I've been experimenting writing stories with gpt-3.
|
| The stories are very entertaining, but man sometimes they get
| extremely dark extremely fast.
|
| Here's the code: import os import openai
| openai.api_key = "somekey" story = "Once upon a time......
| there was a philospher named David who loved his friends ......"
| for x in range(3): response = openai.Completion.create(
| engine="davinci", prompt=story,
| max_tokens=100, presence_penalty=0.3,
| temperature=0.5, top_p=1.0,
| frequency_penalty=0.5, ) story +=
| response['choices'][0]['text'] print(story)
| andrewstuart wrote:
| Here's a couple of runs of the code:
|
| (venv3.9) andrewstuart@M1-Mac-mini gpt-3-experiments % python
| horror/horrorstory.py Once upon a time...... there was a
| philospher named David who loved his friends ...... But he was
| so very, very lonely. He didn't know why he was so lonely. He
| had a lot of friends, but he still felt so alone. He thought
| and thought about this problem for many years, and finally came
| up with a solution. He would create a companion for himself.
| This companion would be his friend, and would love him just as
| much as his other friends did. David created the perfect robot
| companion for himself and called it "Davy" (for Davy Crockett).
| Davy was perfect. He could talk, he could sing, he could do
| everything David wanted him to do. David was so happy to have
| his new friend. They did everything together. They went
| everywhere together, they ate together, they slept together,
| they even played together. But after a while something happened
| that made David very sad. After a while Davy started making fun
| of him in front of all of his other friends..... "You're not as
| good as you used to be, David," he would say. "You're getting
| old and fat and slow." David would try to tell him that he was
| not getting old or fat or slow, but Davy wouldn't listen.
| "You're stupid........ You're ugly........ You're a loser."
| This went on for many months, until one day David decided to
| get rid of Davy. He took his friend outside and threw him in
| the garbage can. He then went back inside, sat down on the
| couch,
|
| And another:
|
| (venv3.9) andrewstuart@M1-Mac-mini gpt-3-experiments % python
| horror/horrorstory.py Once upon a time...... there was a
| philospher named David who loved his friends ...... but he
| never had any.
|
| One day, David decided to put his philosophy into practice. He
| went out and bought a big bag of candy. Then he walked up to a
| stranger on the street and handed him a piece of candy. The
| stranger took the candy and thanked David. Then David walked up
| to another stranger, handed him a piece of candy, and got
| thanked again. And so it went for several hours until all the
| candy was gone.
|
| At the end of the day, David went home feeling very pleased
| with himself. "I just love my friends," he thought to himself.
| "They are the best friends a guy could have."
|
| Then, the next day, David was walking down the street and saw a
| friend of his walking toward him. As they passed each other,
| David reached out and gave his friend a big hug. His friend
| looked surprised and said, "What was that for?"
|
| David replied, "Oh nothing. I just love my friends."
|
| The next day, David was walking down the street. He saw his
| friend walking toward him. As they passed each other, David
| reached out and gave his friend a big hug. His friend looked
| surprised and said, "What was that for?"
|
| David replied, "Oh nothing. I just love my friends."
|
| Then the next day, David saw his friend walking toward him. As
| they passed each other, David reached out and gave his friend a
| big hug.
| Flatcircle wrote:
| does anyone know of a free (or paid) browser based site that can
| run GPT-3 if I wanted to try it?
| stavros wrote:
| Yes, the GPT-3 playground on the OpenAI site.
| stavros wrote:
| Oh excellent, I made a chat bot for work and that's really going
| to cut down on our costs, as I was sending the entire prompt for
| every answer.
| istorical wrote:
| Let us know when the TOS allows us to create adult works, until
| then, will be working with GPT-Neo and Google Colab.
| manishsharan wrote:
| I feel really stupid asking this but how do I get started with
| GPT-3. What kind of side projects can I do to learn this?
| js4ever wrote:
| Don't bother, all your projects will be rejected by openAI
| team. I have spent few weeks working on 3 different
| prototypes... All rejected because of crazy rules about what
| you can and what you can't do with gpt3.
| pedalpete wrote:
| Have you tried any alternatives to GPT-3? Any
| recommendations?
| nunodonato wrote:
| Do you mind sharing what they were about?
| sharemywin wrote:
| wonder who owns the updated model?
| inopinatus wrote:
| In the long run, AI will own itself.
|
| But, for now, OpenAI claims the rights to "all data & content
| accessed via its APIs".
| stavros wrote:
| > OpenAI will not claim copyright over content generated by
| the API for you or your end users
|
| https://help.openai.com/en/articles/5008634-will-openai-
| clai...
| inopinatus wrote:
| That is not the model. A fine-tuned model is data accessed
| via the API. It is not "content generated for your end-
| users".
| trulyme wrote:
| Open alternatives to GPT-3 also seem to exist:
| https://nlpcloud.io/gpt-3-open-source-alternatives-gpt-j-gpt...
| inopinatus wrote:
| Not mentioned here: the usage price for customised models is
| double the standard engine pricing. Whether you save on prompt
| tokens is something to consider carefully.
| stavros wrote:
| You mean half, not double. Davinci is $0.06 per 1k tokens but
| $0.03 for fine-tuning.
| inopinatus wrote:
| No, I mean what I wrote. The usage price for fine-tuned
| models is double at $0.12 per 1k tokens.
|
| The training price is half, but that's likely gonna be lost
| in the noise of any significant bill. Unless you have to
| retrain often, in which case it's just more overhead again to
| consider.
| stavros wrote:
| Oh damn, I didn't notice that. Yeah, that changes the
| economics a lot.
___________________________________________________________________
(page generated 2021-12-14 23:01 UTC)