Prerequisites
Before proceeding, ensure the following prerequisites are met:- Install MindsDB locally via Docker or use MindsDB Cloud.
- To use Anyscale Endpoints within MindsDB, install the required dependencies following this instruction.
- Obtain the Anyscale Endpoints API key required to deploy and use Anyscale Endpoints models within MindsDB. Follow the instructions for obtaining the API key.
Setup
Create an AI engine from the Anyscale Endpoints handler.anyscale_endpoints_engine
as an engine.
The implementation is based on the engine for the OpenAI API, as Anyscale conforms to it. There are a few notable differences, though:
- All models supported by Anyscale Endpoints are open source. A full list can be found here for inference-only under section Supported models.
- Not every model is supported for fine-tuning. You can find a list here under section Fine Tuning - Supported models.
- This integration only offers chat-based text completion models, either for normal text or specialized for code.
- When providing a description, this integration returns the respective HuggingFace model card.
- Fine-tuning requires that your dataset complies with the chat format. That is, each row should contain a context and a role. The context is the text that is the message in the chat, and the role is who authored it (system, user, or assistant, where the last one is the model). For more information, please check the fine tuning guide in the Anyscale Endpoints docs.
The base URL for this API is
https://api.endpoints.anyscale.com/v1
.Usage
The following usage examples utilizeanyscale_endpoints_engine
to create a model with the CREATE MODEL
statement.
Classify text sentiment using the Mistral 7B model.
Next StepsFollow this tutorial to see more use case examples.