Giter VIP home page Giter VIP logo

Comments (5)

spencekim avatar spencekim commented on September 3, 2024 1

Got it, feel free to close this issue then. Would be great to be able to use the params you mentioned!

from transformers.js.

spencekim avatar spencekim commented on September 3, 2024 1

Great, I'll give it a shot.

from transformers.js.

xenova avatar xenova commented on September 3, 2024

The main reason is I copied it from HuggingFace's transformers library code, but either (1) no supported model uses it or (2) it hasn't been implemented yet.

The reason it's commented out (and not, well, deleted), is because I plan to add it :) For example, the RepetitionPenaltyLogitsProcessor, NoRepeatNGramLogitsProcessor, and MinLengthLogitsProcessor classes will be coming soon!

from transformers.js.

spencekim avatar spencekim commented on September 3, 2024

Is there a rough timeline for implementing additional config, like the three you mentioned above? Just curious since it would be very useful to my project. I could also take a look at implementing them if there is no work started on that.

I saw the python code here: https://huggingface.co/transformers/v4.1.1/internal/generation_utils.html#transformers.RepetitionPenaltyLogitsProcessor

from transformers.js.

xenova avatar xenova commented on September 3, 2024

That would be awesome if you could try implementing it! I'm currently adding new model types, so, I'd only be able to get to adding this in ~a week or so.

Here's the original implementation code from HF: https://github.com/huggingface/transformers/blob/main/src/transformers/generation/logits_process.py

and this library's implementation is here: https://github.com/xenova/transformers.js/blob/main/src/generation.js

The conversion shouldn't be too difficult, but if you have any questions, feel free to ask!

from transformers.js.

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.