Giter Club home page Giter Club logo

Comments (10)

merveenoyan avatar merveenoyan commented on May 12, 2024 2

It was raised by another user in this forum question. Two sentences is just fine but with more sentences it might be problematic.

from huggingface.js.

adrinjalali avatar adrinjalali commented on May 12, 2024 1

@osanseviero wanna move this to https://github.com/huggingface/hub-docs?

from huggingface.js.

Narsil avatar Narsil commented on May 12, 2024

pipeline-wise, it seems that this task is more like pair-wise classification, NOT pure classification.

zero-shot uses under the hood entailment to do the job, but it does not seems like the pipeline will be reusable (since 1 sentence, comma-separated labels -> classification outputs) is not really what is desired here (couple of sentences -> Entailment/not entailment/neutral classification).

Couple of notes/questions:

  • How many models require this to be showcased properly ? (Or how popular are they too?, just to gauge a sense of variability in what would be a nice showcase for those models).
  • If we send more than two sentences, what is the expected output ?
  • Maybe we need to keep in mind backward compatiliby vs Zero-shot which I think is the default pipeline for these models (mnli variants at least).
  • There is a way to make zero-shot work on exactly the same input with hypothesis parameter and by enabling multi_label. (Definitely not ideal, just food for though)

from huggingface.js.

merveenoyan avatar merveenoyan commented on May 12, 2024

Hello @Narsil 🤗
Yes, it's just there's this family of tasks in text classification called GLUE and it's way too general (reason why we needed zero shot classification, I guess). For QNLI ones we can simply change the name of the input texts in the widget imo, it only takes a question and a context. There's another task called QQP that assesses if one question is a paraphrase of another, takes two separate inputs. Another one is MRPC which again takes two texts and assesses if one is a paraphrase of another. I don't know what was the use case of the user in the forum but probably one of these.
TLDR; some of the GLUE tasks take one input (which is covered), some take two inputs (not covered) and others are covered under zero shot. The similarity based ones are not text classification technically (the MSMARCO I put above) so it's okay if we don't cover it for now imo, I think it's because the way these similarity models work (they're not actually classification models).
The ones that take two inputs can be solved with same pipeline but we should change the name of the input according to task itself, somehow.

from huggingface.js.

Narsil avatar Narsil commented on May 12, 2024

I see !

Right now I don't see anything around having a new pipeline for processing texts two at a time in a classification manner (text-classification cannot be realistically extended, since pipe(["text1", "text2"]) is already defined and just means classify two texts). I am also not in favor of mixing argument types all the time.

sentence-similarity fits the bill perfectly and already exists as a widget, @osanseviero wdyt, should we add it to transformers ? IMHO it seems like the best course of action.

from huggingface.js.

osanseviero avatar osanseviero commented on May 12, 2024

sentence-similarity fits the bill perfectly and already exists as a widget, @osanseviero wdyt, should we add it to transformers ? IMHO it seems like the best course of action.

Just as a note, I see many models are using Crossencoder which is a sentence-transformers class, so maybe we should also consider moving some models to sentence-transformers. E.g.

Anyways, I think sentence-similarity name is a bit strange for this case, no? I think the pipeline should have a different name although we can reuse the widget. My main question is if the inference of all these models that are currently not supported consistent. That is, if all models expect the two inputs in the same way.

from huggingface.js.

merveenoyan avatar merveenoyan commented on May 12, 2024

@osanseviero QQP and MRPC models answer if one sentence is a paraphrase of another so they're irrelevant with sentence-similarity yet take two inputs (they're in GLUE).

from huggingface.js.

osanseviero avatar osanseviero commented on May 12, 2024

Yes please, I don't have settings access in that repo unfortunately

from huggingface.js.

adrinjalali avatar adrinjalali commented on May 12, 2024

@osanseviero that should be fixed now.

from huggingface.js.

osanseviero avatar osanseviero commented on May 12, 2024

Hi all! I'll close this issue as we have not received more requests for this and there are no new models, as far as I know, for this use case. The user in the forum worked around it by creating their own Pipeline class.

from huggingface.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.