can I use prodigy train-curve with a transformers model?

the train-curve command currently uses the default spacy model, can I get it to use a transformers model instead?

Yes, in Prodigy v1.11 (currently available as a nightly pre-release) you can use the --base-model argument to provide a different spaCy model package, including one that's initialised with transformer weights. This can either be a package provided by spaCy (e.g. en_core_web_trf) or a custom one using a config that defines a transformer component with pretrained weights of your choice and no other components. The spacy assemble command lets you turn a config into a saved pipeline you can use:

A quick note on using transformers here: keep in mind that the train-curve command runs the training multiple times with different portions of the data so it likely won't run very efficiently on your local machine if you don't have a GPU available (in general, you should train your transformer-based pipelines on GPU). So if you're using the train curve as a quick diagnostic to see if your model is learning something, it might make sense to run it without a transformer first. It'll still give you similar insights: if your model is converging well, it'll likely do even better once you initialise it with transformer weights. If it's not learning anything, there's likely a problem with your data that you want to fix first. Initialising with a transformer may give you slightly higher accuracy, but if there are deeper issues with your data, you'll still end up with worse results than what you could achieve.

1 Like

makes perfect sense, thanks!