I am trying to figure out where documentation for models exists. For example, I am looking at the pipeline documentation which says that task is some id. But it is not a user defined id because passing “foo” as the task to the model gemma-3-27b-it gives me an error that lists all the tasks. Is there a function to call that lists the tasks ahead of time without having to get an error message? It is not clear from the documentation that the tasks are implemented by each model not the pipeline api - and it would be nice to know exactly what a model does for implementation purposes rather than some generic description of tasks in the tutorial. I would rather have some way of figuring out what a particular model does so I can implement it. Are there any tools that help me figure this out? Maybe it’s possible to parse it from the config files or the model file?
Also, how can I get information on message formatting for each task? Is there a way to figure this out or is it dependent on the information provided on the model card? So if the tasks and message formats are not listed on the model card, is there a way to determine these? Especially because I am also not seeing any source code implementing a model class that lists tasks and message parsers. Maybe there is a way to parse these from the config or model files as well?
It seems that tasks are being retrieved from classes registered in AutoModel, so you should be able to identify the problem by checking whether the class corresponding to the task is defined in the code.
I’m not sure if there is a simple method (a dedicated function) for this…
@John6666 Thanks that’s a good place to start looking!
Also, to add an example to the original post, the jinaai-embeddings model implements all custom tasks but lists them on the model card (e.g., retrieval.query, text-matching). However, it is unclear what the input format should be for each task just from the model card. It looks like lists of strings, but would need to see the model implementation to be sure there aren’t other options.