Code Monkey home page Code Monkey logo

Comments (6)

psinha30 avatar psinha30 commented on May 30, 2024

Can you provide the context? because it gives me exactly the same number of questions I ask for.

from question_generation.

krrishdholakia avatar krrishdholakia commented on May 30, 2024

sure -

i'm using the t5 model from the nlp pipeline e2e

and i run the nlp argument given above: nlp(text5, model_args)

any additional context i can give ?

from question_generation.

patil-suraj avatar patil-suraj commented on May 30, 2024

thanks @krrishdholakia !

Here num_return_sequences can't be used because the number questions generated will depend on the number of answers extracted. If the ans extraction model gives only two answer then only two questions will be generated.

num_return_sequences is used with beam search or top-k top-p sampling in the .generate method. With beam search, in most of the cases it returns the similar or slightly paraphrased version of the same questions, so I'm not using num_return_sequences.

I'm trying out other methods for better answer extraction, but havn't got any good results yet. Will ping you if I find some other method to extract more answers.

from question_generation.

krrishdholakia avatar krrishdholakia commented on May 30, 2024

hey @patil-suraj,

they mention an interesting approach using top-k sampling in this article - https://medium.com/huggingface/how-to-build-a-state-of-the-art-conversational-ai-with-transfer-learning-2d818ac26313

thoughts on using this ?

from question_generation.

patil-suraj avatar patil-suraj commented on May 30, 2024

I have tried sampling but beam search results are better than sampling for this task. Feel free to give it try though!

from question_generation.

nomoreoneday avatar nomoreoneday commented on May 30, 2024

thanks @krrishdholakia !

Here num_return_sequences can't be used because the number questions generated will depend on the number of answers extracted. If the ans extraction model gives only two answer then only two questions will be generated.

num_return_sequences is used with beam search or top-k top-p sampling in the .generate method. With beam search, in most of the cases it returns the similar or slightly paraphrased version of the same questions, so I'm not using num_return_sequences.

I'm trying out other methods for better answer extraction, but havn't got any good results yet. Will ping you if I find some other method to extract more answers.

Hi @patil-suraj, great work! May I ask how do you control the number of answers extracted? My project came up with a different number of answers for different texts.

from question_generation.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.