Comments (10)
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.
@osanseviero wanna move this to https://github.com/huggingface/hub-docs?
from huggingface.js.
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 enablingmulti_label
. (Definitely not ideal, just food for though)
from huggingface.js.
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.
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.
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.
- https://huggingface.co/cross-encoder/ms-marco-MiniLM-L-12-v2
- https://huggingface.co/cross-encoder/qnli-electra-base
- etc
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.
@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.
Yes please, I don't have settings access in that repo unfortunately
from huggingface.js.
@osanseviero that should be fixed now.
from huggingface.js.
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)
- [gguf types] Add missing types & make existing types stronger HOT 1
- [gguf] add support for legacy gguf v1 HOT 1
- [Conversation Widget] Bug on examples
- Finalize image-feature-extraction support HOT 4
- [Inference] Support for Messages API OpenAI API specs
- [Feature Request] Model inspector for other formats HOT 4
- Missing Type From the Inference Package HOT 1
- [Conversational] Property conversational does not exist on type HfInference HOT 3
- Safetensors sharded model inspector does not work in subdirs HOT 8
- Is 404 console.error expected for `fileExists ` HOT 4
- Sharded GGUF in subdir HOT 3
- fix `pipelineSnippet` for repos with custom pipelines HOT 2
- GGUF Sharded model metadata display might have a memory leak HOT 6
- GGUF: missing `split.no` metadata HOT 6
- [Question] What is the correct way to access commit diff results via http? HOT 1
- [ASR Widget] “Browse for file” is unresponsive HOT 1
- Inference API widget does not work anymore for token classification of POS HOT 3
- [Widget] "Model not loaded yet" error on page load
- Rm ArrayBuffer.resize polyfill when Firefox supports it by default HOT 4
- Feature Request: Get Commits List / Commits History by Repository ID using @huggingface/hub HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from huggingface.js.