Custom Training Question Answer Model Using Transformer BERT

Поділитися
Вставка
  • Опубліковано 16 лис 2024

КОМЕНТАРІ • 88

  • @asieharati
    @asieharati Рік тому +6

    You're so passionate about teaching and it shows through all your tutorials. Thanks for the effort you put into this and helping others. The best ML channel I know so far on youtube.

  • @krunaltanna8469
    @krunaltanna8469 2 роки тому +16

    There are annotation tools like Haystack Annotation where you can annotate the training and test data set manually. Its a great tool for someone who is looking out to train a huge corpus of data. Btw Fantastic video Krish!! Thankyou :)

    • @hridaymehta893
      @hridaymehta893 Рік тому

      Hi Krunal! Thanks for the insight!
      Have you tried this with simpletransformers?
      I tried using haystack annotation and exported the annotated documents in the SQuAD format, but that doesn't seem to work while training the model!
      Am I doing something wrong?

    • @avartarstar6744
      @avartarstar6744 Рік тому

      @@hridaymehta893 hi, may i ask for the solution for the issues u have mentioned?

    • @hridaymehta893
      @hridaymehta893 Рік тому

      @@avartarstar6744 Hey, as far as I remember, there is just some formatting that needs to be done in the JSON file, after you export the annotations.
      You just need to remove some fields in the JSON file, if I am not wrong.
      Check the difference in the format of the file required for simpletransformers vs what you are getting using Haystack.
      Or you can use the Haystack Model itself for the QnA training. I worked with the Haystack Model as well.

    • @avartarstar6744
      @avartarstar6744 Рік тому +1

      @@hridaymehta893 i see! Much appreciated!

    • @hridaymehta893
      @hridaymehta893 Рік тому

      @@avartarstar6744 No worries :)

  • @in_experience6383
    @in_experience6383 3 роки тому +4

    Thank you Krish for covering this Topic, you are a saviour as always.

  • @a.s.8113
    @a.s.8113 2 роки тому +1

    Thank you Krish. We really appreciate your effort to create the video lectures. Your tutorials are really informative. Thanks for covering the Question Answer Generation BERT model topic.

  • @ayushsaxena5004
    @ayushsaxena5004 Рік тому

    Thanks for all the effort you've put on this Krishnaik. It's super well-made and helpful!

  • @pabloempire9274
    @pabloempire9274 2 роки тому

    Sir I am not able to find more videos from this playlist. This is amazing playlist. I want to learn more about transformers.

  • @vikasrathod4813
    @vikasrathod4813 Рік тому +2

    Krish sir, your videos are more informative than others. Would you please share how you created the dataset for QA model training.

  • @jayasandeepreddy3474
    @jayasandeepreddy3474 3 роки тому +3

    Thank you Krish.
    Could you please make a video for "Text Summarization with Custom Data"

  • @Praveenkumar-pe6fh
    @Praveenkumar-pe6fh 2 роки тому +1

    @3:52 , it's a wrong explanation of the is_impossible flag. It essentially means that if it is set to false, the answer can be obtained directly from the context and if it is true, it means the answer can not be directly answered from the context.

  • @nawazsheikh4724
    @nawazsheikh4724 3 роки тому +2

    Thank you Krish. This was really helpful. Keep up the good work :)

  • @ankitkumarverma1685
    @ankitkumarverma1685 Рік тому

    Please create a video on how to train squad dataset for question generation. And thanks for this video.

  • @mansoorbaig9232
    @mansoorbaig9232 3 роки тому +1

    Great topic Krish, please add videos on other NLP tasks also.

  • @SanaKhoshkalamian
    @SanaKhoshkalamian 4 місяці тому

    GREAT video! very informative!

  • @rv0_0
    @rv0_0 Рік тому

    I would request you to please make an updated video on this same topic. This is need of the hour.

  • @mamunurrahman5341
    @mamunurrahman5341 Рік тому

    Change train_batch_size to lower value like 6 or 2 . It will give you correct result. Bcs number of training data is very small.

  • @ysjang05050
    @ysjang05050 2 роки тому +2

    Thank you for your video. It was so helpful. One question. In real implementation, how do you use metric (e.g. f1 score) for evaluate the model?

  • @TheAmit4sun
    @TheAmit4sun Рік тому

    Context, can answer, index at which answer is available. Feeding this kind of details to a ML model which is already trained on NL is not too much spoon feeding ? Think the amount of effort it will take to create a Q&A dataset with diverse topic. At the end model is doing a lookup or search? Where is intelligence ?

  • @MrCdofitas
    @MrCdofitas 3 місяці тому

    thank you so much krish! how can you get the list of training accuracy and evaluation accuracy?

  • @shushantpudasaini2306
    @shushantpudasaini2306 3 роки тому +1

    Thank you, your videos are of great help. Can you please guide me on how you created your custom data? Like if there are any labelling tools for question answering tasks.

  • @jaswujaswu
    @jaswujaswu 2 роки тому

    impressive tutorial

  • @52_it_nikhilpoojari61
    @52_it_nikhilpoojari61 Рік тому

    Thank you so much, it was a great tutorial it helped alot

  • @somethoughts2255
    @somethoughts2255 5 днів тому

    ValueError: 'use_cuda' set to True when cuda is unavailable. Make sure CUDA is available or set use_cuda=False. what does that mean. and 2 on executing this code :# Train the model
    model.train_model(train, eval_data=test) showing train and eval not available

  • @debmalyaray3252
    @debmalyaray3252 3 роки тому

    Thank you Krish

  • @abhishekprakash9803
    @abhishekprakash9803 2 роки тому +1

    hey can can u make video automatically created question and answers from pdf and text file?

  • @saharyarmohammadtoosky
    @saharyarmohammadtoosky Рік тому +1

    Hi Krish, thank you very much for the great video, my dataste is in the csv format and I have one column of description, and the other column of labels both in text, can I do QA on this such that the Q is the description and the answer is the labels? If yes, how can I prepare the data in the format you mentioned?

    • @manasmanuu5430
      @manasmanuu5430 Рік тому

      Have you got process
      how to prepare that?

    • @saharyarmohammadtoosky
      @saharyarmohammadtoosky Рік тому

      No, what do you mean?@@manasmanuu5430

    • @hainguyennam2598
      @hainguyennam2598 5 місяців тому

      @saharyarmohamadi9176 hi, I have the same data as you and tried converting to json, however when train_model I get a message that cannot be found... (I don't know if the default setting answer_start = 0 affects the results or not)

  • @SmitNReyansh
    @SmitNReyansh 3 роки тому

    Hi Krish, can you please make a video on Feature Engineering on numerical variables? Thank you

  • @balapranav5364
    @balapranav5364 3 роки тому

    Sir make video on batch normalisation please

  • @ramadaskamat6418
    @ramadaskamat6418 3 роки тому

    Great tutorial

  • @sobhansai2955
    @sobhansai2955 Рік тому

    How can I achieve the same question answering model without transformers and use rnn LSTM and attention mechanism. Please help me on that sir

  • @Sahil-te3kz
    @Sahil-te3kz 5 місяців тому

    could u please make a video same for jira sample data .

  • @mahaksaxena7107
    @mahaksaxena7107 3 роки тому

    How to finetune Dense Passage Retriever using your own excel file for Question-Answer Model using DPR?

  • @idrispane2590
    @idrispane2590 3 роки тому

    thank you krish for the great video, can you please make a video about deploying custom object detection model on android? thanks in advance!

  • @avartarstar6744
    @avartarstar6744 Рік тому +1

    @kirsh naik Hi, when creating a custom dataset, is it best to limit the context as short / as long as possible? Additionally, can a context have multiple question, and each quesiton might have multiple variation of answer?

  • @shawcking2472
    @shawcking2472 9 місяців тому +6

    The QA is so nonsense. I mean if the user has to provide context with the question then it means he already knows the answer then why would he take help from the model 😂

    • @krazysam5714
      @krazysam5714 8 місяців тому

      If the document is too long and the person doesn't wanna read it all

    • @nicolasnicolas5238
      @nicolasnicolas5238 8 місяців тому

      It's called extractive question answering for a reason 🤦 what did you expect

    • @SmartTech-m1u
      @SmartTech-m1u 3 місяці тому +1

      @@nicolasnicolas5238 but the extraction process will take alot of time if the context is long document

    • @nicolasnicolas5238
      @nicolasnicolas5238 3 місяці тому

      @@SmartTech-m1u
      Actually, it doesn'ttake too much time. This is because the fact that if you know beforehand that the task is QA with context, you can finetune a small language model which should run faster than an LLM like GPT3, it's should even run faster than GPT3-turbo or GPT-4o-mini by orders of magnitude at no cost. This is possible because abstractive QA can be formulared as a prediction of indices over the context. The training data looks something like this input=(question, context) -> output=(position where the answer appears in the context, span of the answer). Notice that the output os just a tuple of integers, which means this task is easier than text generation (generative QA).
      Now, you can even filter out unnecesary context even more, just follow the RAG process but exchange the final call generative model (the G in RAG) with the abstractive QA model and there you go. That simple trick should make the whole process even faster.
      And if you use an open model trained on the Squad dataset, the implementation should be really easy, no more than 50 lines I'd say.

  • @akankshakadam24
    @akankshakadam24 3 роки тому

    Please can you make more videos on transformers

  • @satyamtripathi1732
    @satyamtripathi1732 3 роки тому

    krish sir please please reply one thing if a want a advice from you what subscription I have to take please tell me u are everything for me sir

  • @giridharnair01
    @giridharnair01 3 роки тому

    Sir can you add a video to extract the output from the lstm model

  • @parthdeshmukh63
    @parthdeshmukh63 8 місяців тому

    The dataset building process will take too long and the process is not feasible to create custom datasets from scratch. Is there any work around for this??. Mostly looking for an answer which will automate this task.

  • @satyamtripathi1732
    @satyamtripathi1732 3 роки тому

    krish sir i want to work under u for whole life what I have to do please tell me bcoz of u I am learning so many things

  • @Arceus948
    @Arceus948 Рік тому

    what if i have a csv file which has 2 columns "Questions" and "Answers", how will i build the chatbot then??

  • @carmelo6782
    @carmelo6782 5 місяців тому

    Hi! I have a question... How use SimpleTransformers for generate answers more smartest?

  • @ravinduyasith9548
    @ravinduyasith9548 Рік тому

    can I use a one large context with many questions, instead of using separate contexts?

  • @santhoshckumar7367
    @santhoshckumar7367 Рік тому

    Great tutorial. Could anybody share the link to the source code?

  • @SANJIVRAI6693
    @SANJIVRAI6693 3 роки тому

    multi label classification using bert possible ? any good Neural Network project to refer ?

  • @memeswallah5253
    @memeswallah5253 8 місяців тому

    Sir My dataset have only two column first is question and answer i want to train my model on this so can i train my model using this method or not

  • @AjhayV
    @AjhayV 7 місяців тому

    i want this to work offline what should i do sir... where should i download the bert files from

  • @Sai-kj4fw
    @Sai-kj4fw 7 місяців тому

    How can I use this for more than 512 tokens?

  • @scar2080
    @scar2080 3 роки тому

    Why is it asking for API key??Cant we train offline? if so what is required jee?

  • @JayantaKalita-jq3wd
    @JayantaKalita-jq3wd 2 роки тому

    model.train_model(train, eval_data=test)
    NameError Traceback (most recent call last)
    in
    ----> 1 model.train_model(train, eval_data=test)
    NameError: name 'test' is not defined

    • @EGspider
      @EGspider Рік тому

      I have the same issue.

  • @tanvigupta3499
    @tanvigupta3499 3 роки тому

    @krishnaik the video is amazing...i am looking for Faq based qna with no context ...how can i use your code?

  • @anishaudayakumar1778
    @anishaudayakumar1778 3 роки тому +1

    Amazing Video! Can you make similar video on Conversational AI with End to End Pipeline :)

  • @AmitKumar-fn8px
    @AmitKumar-fn8px 7 місяців тому

    can i do it for mistral or llama2?

  • @krushnapatil8406
    @krushnapatil8406 7 місяців тому

    Sir is this based on same paper

  • @svenschnydrig1768
    @svenschnydrig1768 Рік тому

    Why is the eval_loss negative? Is it possible that there might be a bug somewhere?

  • @lalitameena3321
    @lalitameena3321 2 роки тому

    Thanks for the illustrative video. I have transformed my data from csv to json format required by simple transformers. I checked the format line by line with yours as well. As soon as I try to train my model, it says list index out of range. Can you please help me why is it throwing that error?

    • @tijothomas4563
      @tijothomas4563 2 роки тому

      Hey I faced the same error. Were you able to solve it?

  • @manthanghonge007
    @manthanghonge007 7 місяців тому

    cant we use csv file for the bert model ?

  • @wilfredomartel7781
    @wilfredomartel7781 2 роки тому

    How to creat a custom.dataset?

  • @prantikbanerjee1573
    @prantikbanerjee1573 3 роки тому

    Can I use this simpletransformer for bengaliQA dataset?

  • @deepthimidasala9771
    @deepthimidasala9771 Рік тому

    Can u tell me how to install cdqa In colab

  • @footballforfun2054
    @footballforfun2054 3 роки тому

    can we use it for fake news detection? and can excel format will work?

  • @DataTheory92
    @DataTheory92 3 роки тому

    is this task with Pytorch or tensorflow?

  • @kettleghost3721
    @kettleghost3721 Рік тому

    Sir, is there a fast and efficient way to create the dataset in this format from a csv file?

  • @vikasrathod4813
    @vikasrathod4813 Рік тому

    What is the difference between Transformer and a Simple transformer you are using a simple transformer while implementing the QA. Anyone can give and if you guys know the answer.

  • @kachrooabhishek
    @kachrooabhishek Рік тому

    @krish What is the use of this if we have to provide context every single time when we are doing the prediction. This makes this whole framework garbage , if there is no other . if there is please share

  • @murtazajabalpurwala8124
    @murtazajabalpurwala8124 3 роки тому

    model.train_model(train, eval_data = test) Hey Krish, got confused at this point. What is train_model?

  • @chamaljayasinghe4210
    @chamaljayasinghe4210 Місяць тому

    😍😍

  • @ashifismail9606
    @ashifismail9606 Рік тому

    gem💎

  • @zaheerbeg4810
    @zaheerbeg4810 2 роки тому

    #Thanks #krish

  • @JoeConstance-i7h
    @JoeConstance-i7h Місяць тому

    Robinson Larry Taylor Christopher Lopez Larry

  • @shubhambala809
    @shubhambala809 3 роки тому

    How do i experts in data scientist???how

  • @Pratapsingh-ng7pr
    @Pratapsingh-ng7pr 2 роки тому +4

    no offence but you don't have any idea how to improve accuracy