Either expand TransformersTextRouter or make a new component to support Text-generation based classifiers
There have been more instances of newer classifiers actually utilizing the Text-Generation task in HuggingFace where the final predicted tokens made by the LLM count as the labels.
For example, the LLama-Guard family of models:
- https://huggingface.co/meta-llama/Llama-Guard-4-12B
- https://huggingface.co/meta-llama/Llama-Guard-3-8B
Also this is how some new Rankers work that are based off of LLMs such as https://huggingface.co/mixedbread-ai/mxbai-rerank-large-v2
The main request of this issue is to either update TransfomersTextRouter to be able to work with Text-Generation type classifiers (currently it's hard-coded to Text-Classification type models) or create a new component to accomodate the new type of classifier.
This is currently being asked for by @ju-gu for a client to use the Llama-Guard models for safety filtering.