AI Text and Code Generation with GPT Neo and Python | GPT3 Clone

Поделиться
HTML-код
  • Опубликовано: 23 янв 2025

Комментарии • 316

  • @sirrr.9961
    @sirrr.9961 Год назад +4

    Best tutorial as a beginner for me. Please also teach us to train GPTneo on our own data. Just like this.

  • @ruiguirrugo1869
    @ruiguirrugo1869 3 года назад +15

    This guy is going to go far I hope to be here to see it

    • @NicholasRenotte
      @NicholasRenotte  3 года назад +1

      Ayyyye, thanks so much @Rui Guirrugo, I hope so :)

  • @90dayfianceaddict35
    @90dayfianceaddict35 3 года назад +5

    the quality ,everything is sheeesh , love the video.

  • @diegocaumont5677
    @diegocaumont5677 3 года назад +4

    Love you my guy. Your channel has been growing jesus.

    • @NicholasRenotte
      @NicholasRenotte  3 года назад +1

      Ayyyyee @Diego, my man you been here from day dot bruv! We're getting there man!!!

  • @armandstricker918
    @armandstricker918 3 года назад +9

    Would love to see how to fine-tune the model !! Thx great video :)

  • @ArshaansEdits
    @ArshaansEdits 2 года назад +1

    Can You tell me where is the gpt neo model saved?

  • @sabiduen
    @sabiduen 2 года назад

    Nicholas Renotte, you're my hero! You were a wonderful guide into this world of AI text-generation and I am so pleased to have had my first "conversation" so to speak with AI. Thank you, Nicholas!

  • @markusbuchholz3518
    @markusbuchholz3518 3 года назад +12

    Nicholas, you display again awesome content and promote the beauty of CS (general approach). From my point of view your channel gives the community a chance to be inspired : to perform similar projects and/or to go further and see in details how the models are built/developed (perform some research and learn). We need to appreciate also the effort of people who stay behind this process. Nicholas you are state-of-the-art ambassador of AI. Thanks and have a nice day!

    • @NicholasRenotte
      @NicholasRenotte  3 года назад +2

      Thank you so much @Markus, it's a bit of balance, I've been testing out a mix of short form content and longer style videos. I'm curious, which do you prefer?

    • @markusbuchholz3518
      @markusbuchholz3518 3 года назад

      @@NicholasRenotte For me both "versions" work fine. From my point of view you should think also about yourself. Probably short version requires slightly less effort in compere to longer one. "Spare time" can be utilized for the other projects. You are expert so you will figure out. This is my opinion but the community and you are the bosses. Have a good day!

    • @NicholasRenotte
      @NicholasRenotte  3 года назад +1

      @@markusbuchholz3518 thanks so much for sharing your feedback, honestly, I really appreciate it!

    • @abhishekprakash9803
      @abhishekprakash9803 2 года назад

      @@NicholasRenotte i have a question u r doing grt. but the question is that why we use model why not ask to the google ,he reply anything..about what is bitcoin, meaning of life.....my question is that i wana to generate text by using my own data .....not wikepedia text.....

  • @clovenbeast5183
    @clovenbeast5183 3 года назад +2

    Your personality and communication skills are amazing unfortunately I'm too fucked up nowadays to pay enough attention lol thank you so much. It's really hard to get the framework up and going through errors and trying to figure out what you did to what I did lol

    • @NicholasRenotte
      @NicholasRenotte  3 года назад

      Ayyyee, all good my guy. If you need a hand just hmu!

  • @muhammadrezahaghiri
    @muhammadrezahaghiri 3 года назад +18

    1:30, Yes, I really like to see how I can fine-tune GPT-Neo 😁

    • @antihuman007
      @antihuman007 3 года назад

      Did we get a fine tune video ?

    • @muhammadrezahaghiri
      @muhammadrezahaghiri 3 года назад

      @@antihuman007 Not yet.

    • @ASTERisk44946
      @ASTERisk44946 3 года назад

      I would pay good money to see how to finetune gpt-neo or gpt-j with 2 billion parameters or more specifically and only for JavaScript code generated with NLP

    • @ASTERisk44946
      @ASTERisk44946 3 года назад

      Pretty much just going all out insane on the jsplayground like if someone made a version that was 100x better but only focused on the js playground part that would be really cool

  • @viljevisser1442
    @viljevisser1442 3 года назад +5

    Love your videos! Please do a fine tuning video if you have the time. I have honestly learned so much from the content you post. Keep up the great work Nicholas!

    • @SA-lh6bx
      @SA-lh6bx 3 года назад +1

      Great video... I would also like to see a fine-tuning video.

    • @NicholasRenotte
      @NicholasRenotte  3 года назад +3

      You got it guys, will start planning for it. I think I've got the code done somewhere just need to tidy it up!

    • @nesrinebouazizi5744
      @nesrinebouazizi5744 3 года назад +1

      @@NicholasRenotte yes please we need this

    • @tearsintherain6311
      @tearsintherain6311 3 года назад

      @@NicholasRenotte please please please

  • @jordan6921
    @jordan6921 3 года назад +1

    Been wanting to check out Neo! Thanks for the vid

    • @NicholasRenotte
      @NicholasRenotte  3 года назад

      Anytime, yeah it's one of my fav things i've tested this year!

  • @yousseffarhan8901
    @yousseffarhan8901 3 года назад +1

    Always new and fun 🤩🤩🤩
    The benefit is guaranteed 🤓

    • @NicholasRenotte
      @NicholasRenotte  3 года назад +1

      I aim to please! Thanks for checking it out @Youssef!

  • @AI-LearnAndEarn
    @AI-LearnAndEarn 3 года назад +4

    Yes. please make a video on fine-tuning it.

    • @NicholasRenotte
      @NicholasRenotte  3 года назад +5

      You got it!

    • @if432
      @if432 3 года назад

      @@NicholasRenotte please do this

  • @shunmax
    @shunmax 3 года назад +1

    Great!!! I really hope you'll go deeper into this. Thanks

    • @NicholasRenotte
      @NicholasRenotte  3 года назад

      You know it, started on fine tuning this week!

  • @dawnsaju2779
    @dawnsaju2779 3 года назад +2

    Your Contents are Lit and Epic 🔥. best RUclips Channel for Python Programmers. You should probably get 1milion+ subs

  • @ScriptureFirst
    @ScriptureFirst 3 года назад +1

    YES! 🙋🏻‍♀️. I want fine tuning video! I’ll even fork out for some cloud gpus!

  • @vivekvp
    @vivekvp 3 года назад +2

    Wow! I know nothing about this stuff! #noob Stumbled on this video by accident...and was glued! Thank you so much. (or did Neo respond to this?) Subscribed!

    • @NicholasRenotte
      @NicholasRenotte  3 года назад +1

      Hahahah, well, did Neo respond to this?

    • @LiberyTree
      @LiberyTree 3 года назад +1

      Me too. Here almost by accident. Great job. Subscribed.

  • @Veptis
    @Veptis 2 года назад +2

    Did you ever follow up on fine tuning or training a model from scratch (with your own dataset)? I couldn't find any video on your channel on the topic.

  • @chriss3154
    @chriss3154 2 года назад

    When GPT Neo insist on importing it self you'll know it's selfaware😁BTW Great video and very well explained!

  • @user___01
    @user___01 3 года назад +1

    Some interesting stuff in here as always!

  • @JoeMathew
    @JoeMathew 3 года назад +1

    Awesome, exactly what I wanted! Thanks for sharing

  • @abdelhamidomari6460
    @abdelhamidomari6460 3 года назад +2

    Thank you bro for the wonderful informative content. It would be nice from your part if you should light on how to fine tune the model.

  • @TheUnderMasked
    @TheUnderMasked 3 года назад +4

    Great video, just a quick question what Pipeline would I use to generate a similar text after feeding it a list of texts without retraining it.

    • @NicholasRenotte
      @NicholasRenotte  3 года назад

      Could fine train the model and then use the generate function :)

  • @norvikalexian734
    @norvikalexian734 3 года назад +2

    Can we generate a content with gpt-neo using seed words?

  • @darsdars5249
    @darsdars5249 3 года назад +1

    so many thanks for your awesome videos, please keep countinue...
    peace

  • @AI-LearnAndEarn
    @AI-LearnAndEarn 3 года назад +2

    Hi Nicholos. Can you please make a video on pre-train language model using domain specific text ? or can you guide me how to do it?

  • @shimarahimimoghaddam645
    @shimarahimimoghaddam645 3 года назад +3

    Wonderful videos! Very high quality and informative material! Also, a tutorial on transformers in general and on GPTs particularly would be much appreciated!

  • @Mrree1078
    @Mrree1078 3 года назад +2

    how can you train your own data in GPT-NEO for instance say i want to create a hary potter book for example using the text from the previous books using pipelines? Pretty new to AI and looking for some examples

    • @NicholasRenotte
      @NicholasRenotte  3 года назад +1

      Heya @Paul, you can fine tune the underlying GPT model to do something like that. I'll have a tutorial coming up on it soon!

    • @Mrree1078
      @Mrree1078 3 года назад +1

      @@NicholasRenotte fantastic, love your videos and look forward to seeing it

  • @wtaylorjr2001
    @wtaylorjr2001 3 года назад +1

    Can you tell me how to install gpt-neo to an external hard drive on a mac?

    • @NicholasRenotte
      @NicholasRenotte  3 года назад

      Haven't tried that myself yet William, but could look at setting up a virtual environment on the drive.

  • @aalekhp
    @aalekhp 5 месяцев назад

    unable to load pipeline, ""specific module could not be found". Please suggest a solution

  • @LiaAnggraini1
    @LiaAnggraini1 3 года назад +5

    Thank you for bringing this topic, been interested in GPT-neo. btw, I am still a newbie for language modeling, can I pass this gpt-neo for a specific task such as sentiment analysis? how to do that? also using a specific dataset like bioinformatics or such?

    • @NicholasRenotte
      @NicholasRenotte  3 года назад

      GPT-Neo is mainly used as a text generation pipeline. You can however pass through your text to a sentiment pipeline to perform sentiment analysis however!

  • @titusfx
    @titusfx 3 года назад +2

    Can you set something to generate the same output with the same input? Like seed in random? Thanks

    • @NicholasRenotte
      @NicholasRenotte  3 года назад +1

      Hmmm, for repeatable results or to prompt output?

    • @titusfx
      @titusfx 3 года назад

      @@NicholasRenotte for repeatable results.

  • @stefanocaravello7971
    @stefanocaravello7971 2 года назад

    Hi nicholas i can't set the model with pipeline i get an error if i do this in my local machine.. someone know a solution?

  • @prasadnimantha
    @prasadnimantha 3 года назад

    unable to load the model in colab. ERROR:
    "ValueError: Unrecognized configuration class for this kind of AutoModel: TFAutoModelForCausalLM.
    Model type should be one of BertConfig, OpenAIGPTConfig, GPT2Config, TransfoXLConfig, XLNetConfig, XLMConfig, CTRLConfig."

  • @karasu.a
    @karasu.a 3 года назад +1

    Great job! Nice videos! Keep sharing these useful stuffs ;)

    • @NicholasRenotte
      @NicholasRenotte  3 года назад

      Definitely! Thanks for checking it out @Rafael!

  • @bellemarravelo6002
    @bellemarravelo6002 3 года назад +2

    Hi sir, do you have any tutorial about train and test data set and save it to the csv file?

    • @NicholasRenotte
      @NicholasRenotte  3 года назад

      Creating a training/testing split in general or?

    • @LiberyTree
      @LiberyTree 3 года назад

      A video on how to train Neo on a specific subject would be great!

  • @yasVFX
    @yasVFX 2 года назад +1

    does not work for me : I have this message on cell of setup generator :
    NameError Traceback (most recent call last)
    in ()
    ----> 1 generator = pipeline('text-generation', model='EleutherAI/gpt-neo-2.7B') # Second line
    NameError: name 'pipeline' is not defined
    bit the pipeline is installed !!!!

    • @NicholasRenotte
      @NicholasRenotte  2 года назад

      Run this for me before you run that line of code:
      from transformers import pipeline

  • @Blessings-And-Beyond
    @Blessings-And-Beyond 3 года назад +1

    Hi Nicholas, is it possible for this model to read input from excel and generate a output?

    • @NicholasRenotte
      @NicholasRenotte  3 года назад

      Yah, could load the Excel file and loop through each line to produce output.

  • @ahmedshokry497
    @ahmedshokry497 3 года назад +3

    Thanks for your content. Can you share how to fine tune GPT-Neo with custom data?

    • @NicholasRenotte
      @NicholasRenotte  3 года назад +1

      Yup, coming soon @Ahmed!

    • @LiberyTree
      @LiberyTree 3 года назад

      I think GPT is the future. I have used GPT-3, and on some tasked and was disappointed; it needed training, but there no option to do that. Neo has a major advantage, if it can be trained without too much trouble! (Also, not having too pray large fees is really helpful for a non-profit.)

  • @pushkarkathayat7893
    @pushkarkathayat7893 3 года назад +2

    Also, can we train it for a given article? So that it generates an AI spin version of the given article?

    • @123abhishekmr
      @123abhishekmr 3 года назад

      I wanted to ask the same thing. Good question

    • @NicholasRenotte
      @NicholasRenotte  3 года назад

      Yep, you could pass through a specific topic for that article but could also fine tune to apply tone etc @Pushkar!

    • @123abhishekmr
      @123abhishekmr 3 года назад

      @@NicholasRenotte Great thanks for the reply . I did try finetuning the whole friends script and the results were good . Not the best but good .
      Any idea if the GPT3 will be open to public?

    • @NicholasRenotte
      @NicholasRenotte  3 года назад +1

      @@123abhishekmr wow, that's super interesting. I'm not too sure, I've got a feeling it will be a paid API when it is released. I actually got access to it last week!

    • @123abhishekmr
      @123abhishekmr 3 года назад

      @@NicholasRenotte I am totally okay with it being paid to be honest. I have some ideas actually which I want to implement but yeah I just applied 3 days back .
      I am very happy to hear you got the access and looking forward to your videos related to it.
      Any tips on how I can get the access too? Btw when did you apply for it if I may ask?
      Thanks a lot for taking time to reply me .

  • @sazidshaik4577
    @sazidshaik4577 3 года назад +1

    I am Working with lstm in my csv file 223641 rows and 2005 here in this i need to predict class column so i droped it i need to predict 257 class in LSTM input_shape(..) How should i take input shape parameters please help me?

    • @NicholasRenotte
      @NicholasRenotte  3 года назад

      Check this out: www.nicholasrenotte.com/how-to-predict-the-next-best-action-to-progress-sales-with-tensorflow-2/

  • @Gos2
    @Gos2 3 года назад

    It doesn't seem to work for me, I get an error: "Unknown task text-generation, available tasks are ['feature-extraction', 'sentiment-analysis', 'ner', 'question-answering', 'fill-mask', 'summarization']"

    • @NicholasRenotte
      @NicholasRenotte  3 года назад

      Hmmm, would need to dig into it. What line of code is triggering it?

  • @FreeFire-ue4dm
    @FreeFire-ue4dm 2 года назад

    Isn't there a library or a api which can record our questions asked or like add more keyword by itself when there's no match for it..... Have seen code using specific keyword to tell it so can't it create one when said and not there and like this adding many more....

  • @dev4197
    @dev4197 3 года назад +1

    how do you validate accuracy of all predictions if you use it to sentiment analyses ?
    You can use some of thoses models to predict sentiment but I actually was thinking how could I validate if it is predicting it with high accuracy ?

    • @NicholasRenotte
      @NicholasRenotte  3 года назад

      Depends how it's built, you can still have a training/testing set if you're building from scratch. When using pre-trained models it's a little trickier as you'd ideally have to fine tune to reevaluate.

  • @nesrinebouazizi8442
    @nesrinebouazizi8442 3 года назад +1

    hi nicholas when fine tuning gpt2 i had a problem because the sentences in my dataset are too long , i got this error that it is greater than 1024 , any ideas how to fix this please ?

    • @NicholasRenotte
      @NicholasRenotte  3 года назад +1

      Heya @Nesrine, can you shorten your sentences or chunk them up?

    • @nesrinebouazizi8442
      @nesrinebouazizi8442 3 года назад

      @@NicholasRenotte ​ i tried chunking them , i got a list of tensors and in each tensor there was lists of 1024 but i could not introduce them to the model , because i had a problem with the dataset length, you see i created a dataset class ,when i try the chunking code outside the dataset class i get the correct length of the dataset , however when passing it to the dataset class i get len(dataset)=1
      why did i greated the dataset class honestly am new to this and i saw that i should create a data set class in which i use the tokenizer and get the input_ids and attention masks

    • @NicholasRenotte
      @NicholasRenotte  3 года назад

      @@nesrinebouazizi8442 hmmm, I'm not too sure, would need to dig into this a little more!

  • @d3dmane
    @d3dmane 3 года назад +2

    Hey Nicholas!
    Thank you for your awesome videos. I find myself returning again and again to bingewatch your content!
    Do you plan to make a video on object detection API on android or ios? Maybe an app where you take a photo and then it detects objects and counts them?

    • @NicholasRenotte
      @NicholasRenotte  3 года назад

      It's on the list to make something using React Native to deploy on both Android and iOS, I also have to do the same with Flutter!

    • @d3dmane
      @d3dmane 3 года назад

      @@NicholasRenotte Cool! I am really looking forward to it.

    • @NicholasRenotte
      @NicholasRenotte  3 года назад

      @@d3dmane nice, will let you know as soon as it's out!

  • @elliotkantor9904
    @elliotkantor9904 3 года назад +1

    How do you use priming on GPT Neo? Like samples of prompt/answer to fine tune its tone?

    • @NicholasRenotte
      @NicholasRenotte  3 года назад +2

      Hmmm, haven't dug that far into it yet @Elliot. Will get back to you, hopefully with a vid!

    • @elliotkantor9904
      @elliotkantor9904 3 года назад +1

      @@NicholasRenotte Awesome! Amazing video

    • @NicholasRenotte
      @NicholasRenotte  3 года назад

      @@elliotkantor9904 thanks so much!

  • @theinfinitetech3725
    @theinfinitetech3725 2 года назад

    An error is showing:
    ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
    torchtext 0.11.0 requires torch==1.10.0, but you have torch 1.8.1+cu111 which is incompatible.
    What i have to do?

  • @CristiVladZ
    @CristiVladZ 3 года назад +1

    it's easier to just use the huggingface api and call for the model directly. it's lightningly faster and you don't have to install/download the model locally

    • @NicholasRenotte
      @NicholasRenotte  3 года назад

      You can do that? Awesome, got an example I can check out @Cristi?

    • @CristiVladZ
      @CristiVladZ 3 года назад

      @@NicholasRenotte look into inference api. It's a paid service

    • @NicholasRenotte
      @NicholasRenotte  3 года назад

      @Cristi Vlad ah, got it, will take a look!

    • @CristiVladZ
      @CristiVladZ 3 года назад

      @@NicholasRenotte you thought it was free? They have to charge, if they and serve the models on demand...I think it's very cheap given that you have access to all their models...$9 a month

    • @NicholasRenotte
      @NicholasRenotte  3 года назад

      Huh? No definitely makes sense, running GPU workloads is expensive and the HF team are doing awesome work. No beef with that here my man.

  • @aliriano15
    @aliriano15 3 года назад +3

    Daaaamn. Thanks so much for your content! I imagine the architecture is exactly the same as GPT-3, right?
    Gonna try it on a text generation task I have!

    • @NicholasRenotte
      @NicholasRenotte  3 года назад +9

      Ya, it's a little smaller 2.7B vs 175B parameters but it's still superrr slick and way better compared to anything I've tried yet. I actually got access to the proper OpenAI beta this week, might do a comparison vid!

    • @tkipkemboi
      @tkipkemboi 3 года назад

      @@NicholasRenotte will you be doing the comparison vid? Excited!

    • @NicholasRenotte
      @NicholasRenotte  3 года назад

      @@tkipkemboi yah, won't be for a little while but defs!

  • @sarahali2707
    @sarahali2707 3 года назад +1

    Hey nicholas,do you have any idea/title in predictive analysis project? I would be glad to hear yr idea!

  • @davidtaneja
    @davidtaneja 3 года назад +1

    Can we use any like this or another NLP "python library / open source library or model / transformer" in our project (in production or in web apps) ?
    Is there any issue for License or copyright ?
    Please tell about NLP libraries or models which I can use in production ?

    • @NicholasRenotte
      @NicholasRenotte  3 года назад

      I believe so, it is open source from my understanding. There aren't any APIkeys required or anything!

  • @jamesclow108
    @jamesclow108 Год назад

    Thank you, that was so easy to follow 🙂

  • @armaneshaghi6732
    @armaneshaghi6732 Год назад

    Is there a fine tuning video for this too? Thank you for the excellent work.

  • @sixten7659
    @sixten7659 3 года назад +1

    Hello, I downloaded the repository code and opened it in jupyter. I changed the prompt and I wanted to run the code but nothing is happening, can anyone help me?

    • @NicholasRenotte
      @NicholasRenotte  3 года назад

      Changed the kernel?

    • @sixten7659
      @sixten7659 3 года назад

      @@NicholasRenotte Don't know what is meant by kernel but I might have changed something accidentally. All I did was open the file, edit the text of the prompt line and tried to run, but nothing was happening.

    • @NicholasRenotte
      @NicholasRenotte  3 года назад

      @@sixten7659 are you getting any errors in the prompt?

    • @sixten7659
      @sixten7659 3 года назад

      @@NicholasRenotte No errors at all, I just ran all the lines again but again, nothing is happening.

    • @sixten7659
      @sixten7659 3 года назад

      Can anybody else help me? I'd really like to test this out but it won't work.

  • @nicholassimmers1318
    @nicholassimmers1318 3 года назад +1

    I have no idea if you will see this but I really want to use the gpt in a way to speak with it(or just type to it and have it converse with me). Does this tutorial set it up to do that or do I need to use a different setting other than text generation? Also how much does the hot neo actually know. I know that the gpt 3 aparently in its biggest form knows almost the entirety of Wikipedia. Does this come anywhere close to that?

    • @NicholasRenotte
      @NicholasRenotte  3 года назад

      Yep, you can 'chat' with it and ask it questions. Not as powerful as gpt-3 but it'll work!

  • @creatorkannan675
    @creatorkannan675 3 года назад

    Hey bro I tryed in Google colab but in the generator thet getting error name nor defined

  • @MyChris128
    @MyChris128 3 года назад +1

    Very interesting, thank you Nicholas 👍

  • @samiulhuda
    @samiulhuda 3 года назад

    Thanks for the nice demo. How to prevent them generating by faction sentences. I want to generate complete paragraph. But last line is incomplete here

  • @akashkothari8308
    @akashkothari8308 2 года назад

    Can we save the 10GB generator? or every time we need to download when we open our notebook?

  • @ankitsrivastava513
    @ankitsrivastava513 3 года назад +1

    I tried this one on google colab. And it didnt work. Coz, all of the ram on google colab just got used up and the notebook crashed. So, the code couldn't get implemented further.

    • @NicholasRenotte
      @NicholasRenotte  3 года назад +1

      Heya @Ankit, did you have a GPU allocated?

    • @BiaCh-qu6ji
      @BiaCh-qu6ji 3 года назад

      hey @@NicholasRenotte can you please share the GPU specs? and RAM as well thanks :)

    • @ankitsrivastava513
      @ankitsrivastava513 3 года назад

      @@NicholasRenotte I have tried with gpu activated for google colab also, and yet it crashed on google colab. It prompts to, upgrade to google colab pro version for avoiding crashing.

    • @ankitsrivastava513
      @ankitsrivastava513 3 года назад

      @@NicholasRenotte By the way, thanks for your reply!

    • @ankitsrivastava513
      @ankitsrivastava513 3 года назад

      @@NicholasRenotte the 1.3B model finally worked today. It generated codes for different cases, like a react to do app, a fast-api app, Nltk codes, etc.

  • @diegokasas77
    @diegokasas77 2 года назад

    Help, everytime I try to import the pipeline from transformers it gets me a Dead Kernel advice and restart the kernel

    • @code-hh4xb
      @code-hh4xb 11 месяцев назад

      😂 I'm sure you figured it out by now.

  • @ArshaansEdits
    @ArshaansEdits 2 года назад +1

    Bro I've seen many of your videos and love them all just like this one. I would really appreciate if you could upload a detailed video showing what other things the gpt neo can do if it can... Also it is really slow, I have a 3060Ti and 40GB RAM, any way to make this work faster?

    • @PCIexplorer
      @PCIexplorer 2 года назад

      An easy way you can make it go faster is by upgrading your hardware :3

  • @TanHanWei
    @TanHanWei 3 года назад +2

    Awesome stuff!! Thanks for sharing! When I ran the generator method, I noticed that CPU is used to generate the text. Any idea on how to utilize a GPU for text generation?

    • @ToniFabijancic
      @ToniFabijancic 3 года назад

      Same question - did you solve it by now?

    • @ToniFabijancic
      @ToniFabijancic 3 года назад

      got it:
      generator = pipeline('text-generation', model='EleutherAI/gpt-neo-2.7B', device=0)

  • @yeetdeets
    @yeetdeets 3 года назад +1

    Can you set this up to write python functions or classes based on a description? For research purposes naturally!

    • @NicholasRenotte
      @NicholasRenotte  3 года назад

      Ya, try passing through def test_function() as the prompt!

  • @sahucodes7969
    @sahucodes7969 3 года назад

    Sir how can I use GPT-2 model to generate code ?? As I am facing this issue of Disk quota exceede ?

    • @NicholasRenotte
      @NicholasRenotte  3 года назад

      Could look at using a smaller version of the model!

  • @yossig7316
    @yossig7316 2 года назад

    is it the same exact process for GPT-NeoX-20B?

  • @jaroslavmarko9246
    @jaroslavmarko9246 3 года назад

    Hi Nicholas, could you tell me how to remove downloaded GTP NEO resources from Mac? Couldn't find it on Google :/

  • @tarunaswini6709
    @tarunaswini6709 3 года назад +1

    Pls solve the problems facing during installation of mediapipe and other modules.......

  • @lordcrayzar
    @lordcrayzar 2 года назад +3

    wish i had any idea what the hell Jupyter is and how to set that up. cant even start the damn tutorial

  • @richieithaca
    @richieithaca 3 года назад

    Very impressed with this example - scary output :-)

    • @NicholasRenotte
      @NicholasRenotte  3 года назад

      That's not even the half of it 😬, thanks for checking it out as well @Richard!

  • @EventHorizon139
    @EventHorizon139 3 года назад

    Where did you get the variable for the "temprature" variable from in the generator() function? Where are the docs for the rest of the variables?

    • @NicholasRenotte
      @NicholasRenotte  3 года назад

      Doco is here: huggingface.co/transformers/main_classes/pipelines.html#transformers.TextGenerationPipeline

    • @EventHorizon139
      @EventHorizon139 3 года назад

      @@NicholasRenotte I cant seem to find a "temperature" parameter explicitly listed in the docs. Is there some kind of "stop_sequence" parameter that I can use in the generator() function?

  • @TheSaak
    @TheSaak 3 года назад +1

    thanks for the video Nicholas! Quick question, I;ve been trying to implement the gpt-neo-2.7b model via transformers like you demonstrate here with gradio to make a quick web ui and I'm having trouble with the prompt. It seems like the text-generation pipeline doen't accept "= inp" rather than a predefined text input like aitextgen. The problem I'm facing is that gradio only recognizes the predefined prompt regardless of what i type into the input field on subsequent generations. I would just use aitextgeen, but I can't seem to properly tell colab to use the pre downloaded 2.7B model I have saved in my drive, so it redownloads it every time and takes 5-7 minutes versus this method which I was able to easily avoid redownloadibg by mounting my drive and replacing what you have for the model argumeent with the path to the model in my drive. Any idea if theres another way to define prompt to be based on input rather than predefined text?

    • @NicholasRenotte
      @NicholasRenotte  3 года назад

      Heya @Steven, just double checking, you're using transformers and not aitextgen right?

    • @TheSaak
      @TheSaak 3 года назад

      @@NicholasRenotte yes, the text generation pipeline imported from transformers

    • @NicholasRenotte
      @NicholasRenotte  3 года назад

      @@TheSaak actually have a tutorial coming up on gradio integration soon! Although if deploying from Colab this might be a little tricky. Will dig into it.

  • @ankitsrivastava513
    @ankitsrivastava513 3 года назад +1

    I wanna ask that, how Can we use Gpt neo,(if possible) for finding semantically similar sentences?

    • @NicholasRenotte
      @NicholasRenotte  3 года назад +1

      Oooooh, may I ask what the use case is? To do sentence matching or something along those lines?

    • @ankitsrivastava513
      @ankitsrivastava513 3 года назад

      @@NicholasRenotte I want to do it for a chatbot. I don't want the AI chatbot to to generate text reply for duplicate questions. I want to reply back directly from the database, for a question which has same meaning as the old question (which generated text reply in the past and is now in the database). These questions may be common frequently asked questions with similar meanings. This process will speed up the chatbot reply and reduce the dependence on text generation as time progresses. I want to do it as a part of a internship project and also present it in my college.

    • @NicholasRenotte
      @NicholasRenotte  3 года назад

      @@ankitsrivastava513 got it, if you're open to APIs you should take a look at Watson Discovery. I've used it for FAQ retrieval for this exact use case a bunch of times!

  • @jwknight
    @jwknight 2 года назад

    GPT-NEOX-20B came out a month ago will you make a video on it?

  • @mannyx2796
    @mannyx2796 3 года назад +1

    How does it compare against gpt2 model?

  • @bixo2956
    @bixo2956 3 года назад +1

    it is possible to create a GUI for it?

    • @NicholasRenotte
      @NicholasRenotte  3 года назад +1

      Definitely, not the same model but could be modified to do so: ruclips.net/video/feA-H6blwr4/видео.html

  • @GandenKohkono
    @GandenKohkono 3 года назад +2

    love this video... please update for next video how to train with custom datasets txt file. Thanks ❤️

  • @BiaCh-qu6ji
    @BiaCh-qu6ji 3 года назад +1

    Hi,
    can you please share the system requirements to run it as fast as you did, GPU/TPU etc specs? Thanks

  • @umbertoaltieri494
    @umbertoaltieri494 3 года назад

    Hi , i have a problem when i do this istruction:" generator = pipeline('text-generation', model='EleutherAI/gpt-neo-2.7B')
    " i have this runtime error "RuntimeError: [enforce fail at ..\c10\core\CPUAllocator.cpp:75] data. DefaultCPUAllocator: not enough memory: you tried to allocate 104857600 bytes. Buy new RAM!
    " my pc have 8Gb ram i dont think this problem is caused by ram, everyone can help me?

    • @PCIexplorer
      @PCIexplorer 2 года назад

      I have 32GB, and when that particular model is running-it uses up nearly all of it while running, so I think the RAM might be a problem-

  • @FreeFire-ue4dm
    @FreeFire-ue4dm 2 года назад

    And thanks for creating such useful content ;)

  • @nesrinebouazizi5744
    @nesrinebouazizi5744 3 года назад +1

    Great job your videos are really helpful , but i want to ask what's the difference between working with hugging face or with aitextgen for text generation for both models gpt2 and gpt neo , thank u !

    • @NicholasRenotte
      @NicholasRenotte  3 года назад +1

      They're both similar! I haven't done too much with aitextgen but AFAIK they do pretty much the same thing @Nesrine!

    • @nesrinebouazizi5744
      @nesrinebouazizi5744 3 года назад +1

      @@NicholasRenotte thank you so much for answering

    • @NicholasRenotte
      @NicholasRenotte  3 года назад +1

      @@nesrinebouazizi5744 anytime! Hopefully it helped.

    • @nesrinebouazizi5744
      @nesrinebouazizi5744 3 года назад

      @@NicholasRenotte yes it did thank u !

  • @vaporwareproducts
    @vaporwareproducts 3 года назад

    Is there a way to auto populate the ai gen engine with a list of relevant key words to get the engine to create long form content automatically ?

    • @NicholasRenotte
      @NicholasRenotte  3 года назад +1

      Heya @Amrkan, you can fine-tune the model on the language of your domain, this would allow you to do it!

    • @vaporwareproducts
      @vaporwareproducts 3 года назад

      @@NicholasRenotte Nice thanks!

  • @edwardcarbo6258
    @edwardcarbo6258 3 года назад +1

    Which is the model with the least size? I have 6gb ram

  • @sparqify
    @sparqify 3 года назад +1

    embarrassing - but I can't even get past the 1st step here - jupyter memory craps out (exceeds allocated 2 GB) just trying to install pytorch. What am I doing wrong :(

    • @NicholasRenotte
      @NicholasRenotte  3 года назад

      Heya @Sparq, can you allocate more memory to the notebook you're running? Are you operating on a physical machine or virtual?

    • @sparqify
      @sparqify 3 года назад

      Hi @@NicholasRenotte - I have since figured it out - put everything to run on my physical machine and played around with this so much that my poor laptop almost grilled its internals :). Is there a way to set this up in a Google Colab instance so I could make use of cloud resources? Thanks for responding to a total n00b btw ;)

    • @NicholasRenotte
      @NicholasRenotte  3 года назад +1

      @@sparqify anytime!! Yep, could definitely do it on Colab, should be easily portable!

  • @myrhev
    @myrhev 2 года назад

    I like the video but have you considered doing one from the ground up locally on a windows machine? By ground up I mean pre python install.

  • @eloisevo1225
    @eloisevo1225 2 года назад

    thank you so much for this clear tutorial. I am wondering how to add our own text corpus ?

  • @pushkarkathayat7893
    @pushkarkathayat7893 3 года назад +1

    Which is better GPT2-large model or GPT NEO?

    • @NicholasRenotte
      @NicholasRenotte  3 года назад

      I think it boils down to fine training that being said, I got better results from GPT Neo although purely anecdotal!

  • @adnantamimi1128
    @adnantamimi1128 3 года назад +1

    how much RAM do i need to do this on my laptop ?

    • @sidharthpanda4931
      @sidharthpanda4931 3 года назад +1

      Atleast 16 GB, so that it won't crash while loading the model

  • @ZEN467
    @ZEN467 2 года назад +1

    what was your pc specifications ?

    • @NicholasRenotte
      @NicholasRenotte  2 года назад

      Check out the battle station breakdown vid! I show it all!

  • @josephmoglia5827
    @josephmoglia5827 3 года назад

    this is awesome, thank you! other question.. when you run, where is it actually downloading the 10g file? I don't see it in the venv

    • @NicholasRenotte
      @NicholasRenotte  3 года назад +1

      I believe it's stored in C drive somewhere, the model itself is not saved in the venv

    • @drzibranomfs
      @drzibranomfs 3 года назад

      C:\Users\{username}\.cache\

    • @mathef
      @mathef 2 года назад

      it is located in C:\Users\USERNAME\.cache\huggingface\hub

  • @nasroluxe2552
    @nasroluxe2552 Год назад

    What languages ​​does it support?

  • @purukiri
    @purukiri 3 года назад +1

    Do you know what is the higher limit on max_length? See that you put in 50, but what happens if you put in , say 10000? Is it theoretically possible if you have the required computing power? Or is there an inherent limit so you can not put in a number more than a certain amount?
    Cool video btw, keep up!

    • @NicholasRenotte
      @NicholasRenotte  3 года назад

      Heya @Purushottam, I haven't tested it myself, the default is 20 but I think you can push it way higher. Even if you hit a limit you can always take the generated sequence and pass it back to the pipeline!

  • @abhishekprakash9803
    @abhishekprakash9803 3 года назад

    can u make a one video how to perform a automated question and answers using question generation piplines in tranformer.

  • @theydontcareaboutus843
    @theydontcareaboutus843 3 года назад +1

    Hey Nicholas, can we use this for text to sql generation? If so how can we do it. Any reference will be really helpful. Awesome work btw. To many more!

    • @NicholasRenotte
      @NicholasRenotte  3 года назад +2

      I think you could, I haven't tested how context works yet. I think there are better models that do it out there, will do some digging for you!

  • @robertbouchardt3357
    @robertbouchardt3357 3 года назад

    what's the min specs required?

  • @henkhbit5748
    @henkhbit5748 3 года назад

    No coding anymore :-) Most of the NLP packages are trained for some dataset (I read Neo is trained on the Pile dataset). But will the dataset be updated and used for retraining each year? I can imagine that some general information, for example bitcoin news of 2021 is not available. Can u trained a specific dataset based on the current dataset? (transfer learning) I am also interested in python packages to cluster similar words based on some input text? Maybe you can add it to yure "Great Wall" list...

    • @NicholasRenotte
      @NicholasRenotte  3 года назад

      Hahahah, from now on I'm calling the list the Great Wall 🤣. You sure can fine-tune it on new data sets, that way you can do exactly what you're referring to, ideally, having an up to date model.

  • @japrogramer
    @japrogramer 3 года назад

    How do I train it to create an HTML website?

  • @jelleludolf
    @jelleludolf 3 года назад

    This dude is on fire