openai backend in Curator. This guide generates vegan recipes.
Setup
- Create a Hugging Face account if you do not have one.
- Create an access token. You use it to authenticate your requests.
- Turn on at least one provider on the Inference Providers settings page.
1
Create an LLM subclass
2
Create the input dataset
3
Point the OpenAI backend at Hugging Face
Set these three values.The model page on the Hub shows which providers serve a model.
base_urlis the Hugging Face router,https://router.huggingface.co/v1.api_keyis your Hugging Face token.model_nameis the model ID on the Hub. Add:<provider>to the end to choose a provider, e.g.,:together. Without it, Hugging Face picks a provider for you.
4
Share the results
To look through the results in the Curator Viewer, upload them with The results are a Hugging Face This dataset on the Hub was made in the same way.
push_to_viewer.Dataset, so you can also push them to the Hub.Switch models
You can change the model or the provider by changingmodel_name. To find the models that one provider serves, filter the Hub by that provider, e.g., the models served by Together.