LLM prodigy connectivity

I saw how spacy has a spacy.Mistral.v1 model, well I assume since I have briefly read through the docs, with prodigy LLM support can I attach this model? Or use any external model such as a fine-tuned BERT into the interface?

Hi @cromander - thanks for reaching out!

Prodigy does indeed provide LLM support. You could use spacy-llm and the prodigy recipe i.e. ner.model-annotate to annotate models using an LLM. Follow along with this video to learn more about how to use a spacy-llm config to create an LLM component for data labelling. The use case uses GPT-3.5 but you can change the model to spacy.Mistral.v1 by using:

[components.llm.model]
@llm_models = "spacy.Mistral.v1"
name = "Mistral-7B-v0.1"

You can learn more about spacy-llm here.

As for using a custom model like a fine-tuned BERT model, please refer to the custom model section in the Prodigy documentation here. Here's an example of a custom recipe that uses a BERT model fine-tuned for sentiment analysis.

1 Like

Thank for you responding @india-kerle, would I be able to make prompts about dataset I want to curate? Such as ask the MistralAI LLM to identify the entities of label "topic" for example. Of course I would need to connect my MistralAPI key.

Hi - yes you should be able to! Again, you would be able to define this behaviour in the config file (see 10:30 - 14:46 - Setting up spacy-LLM in the video)