Code Monkey home page Code Monkey logo

Comments (4)

chrisdonahue avatar chrisdonahue commented on July 17, 2024

Sorry for the delayed response. I don't think this would be a huge job. All you would have to do is create a new mask function which does exactly this masking task of preserving the first word of a sentence but masking out the rest.

For example, for the sentence:

Therefore, the idea was straightforward.

You would want to produce a training example of the form:

Therefore, [blank] [sep] the idea was straightforward. [answer]

Does this help?

from ilm.

jbmaxwell avatar jbmaxwell commented on July 17, 2024

Ah, right—a custom mask function... makes sense. I can't dig into this for another week, or so, but will give it a go when I'm back on this task. Thanks!

This is a very cool tweak on applied Transformers, btw! 👍

from ilm.

chrisdonahue avatar chrisdonahue commented on July 17, 2024

Thank you!

Also, I just thought about this again and realized that you absolutely don't need a custom mask function for this. You just need to train a standard ILM to perform sentence infilling, and then condition the generation on the initial word.

E.g., pass the model [blank_sentence] [sep] Therefore, as input and have it generate until it produces an [answer] token.

from ilm.

jbmaxwell avatar jbmaxwell commented on July 17, 2024

Ah, okay! I'll give this a go first.

I can't remember what I tried, but I think I was just trying things in the Jupyter notebook and wasn't sure how infill_word or infill_sentence would do this. Sounds like it would just be a matter of writing a new "infill" function(?).

from ilm.

Related Issues (11)

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.