Code Monkey home page Code Monkey logo

Comments (3)

ShengdingHu avatar ShengdingHu commented on July 28, 2024 1

You may not need to modify the transformer's BART code. Just look at what we have done for T5, we wrap the original forward function of each transformer layer with a new forward function which passes past_key_values to the original transformer forward function. What need to be done to BART will be similar (I think). However, since we haven't support bart model yet, this functionality may be postponed to one or two weeks later (After the ACL :)

from openprompt.

ShengdingHu avatar ShengdingHu commented on July 28, 2024 1

PRs are welcomed!

from openprompt.

BrettFyt avatar BrettFyt commented on July 28, 2024

PRs are welcomed!

Hello author,have you ever used gpt2 for prompt test?If I want to output mask after the input without textual content,it will show "IndexError:index is out of bounds for dimension with size 0". Did I write something wrong?
For example:
promptTemplate = ManualTemplate( text = '{"placeholder":"text_a"} {"mask"}' , tokenizer = tokenizer )
promptVerbalizer = ManualVerbalizer( classes = classes, label_words = { "1": ["one"], "2": ["two"], "3": ["three"] }, tokenizer = tokenizer )

from openprompt.

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.