Configuration¶
The module has no settings form of its own. Everything you configure lives in the provider module, in permissions, and in the view modes and Views displays that describe your datasets.
Permission¶
administer ai finetuning grants full access: create, edit, delete, start, refresh and cancel
jobs. The permission is marked as restricted because a training run spends provider credits and
sends site content to a third party. Grant it to trusted roles only.
Provider API keys¶
Each fine-tuning plugin belongs to a provider module and reads its credentials from there. A plugin
reports itself as usable once its provider has an API key. The job form lists every installed
plugin but warns when none is usable, and drush ai-finetuner:providers shows the same information
in the Usable column.
Configure the provider under Configuration > AI > Provider settings. Store the key with the Key module rather than in configuration.
View modes for entity datasets¶
The Entities rendered through a view display dataset source uses an entity view mode to decide
which fields are part of the training material. The module ships a view mode named
AI fine-tuning dataset (machine name ai_finetuner) for nodes and media.
To use it for a bundle:
- Go to Structure > Content types > (type) > Manage display (or the equivalent for media).
- Under Custom display settings, enable AI fine-tuning dataset and save.
- On the new AI fine-tuning dataset tab, keep only the fields that should train: image or media fields for an image dataset, text fields for a text dataset. Hide labels, since they end up in the text otherwise.
For other entity types, add a view mode with the machine name ai_finetuner under
Structure > Display modes > View modes, or use any other view mode and enter its machine name on
the job.
If a bundle has no customised ai_finetuner display, the module falls back to the bundle's default
display.
Views displays for view datasets¶
The View with an "AI fine-tuning dataset" display source needs a view that has a display of type AI fine-tuning dataset. Setting one up is described in Datasets.
Cron¶
Every cron run refreshes the status of each job that is pending or running by asking its
plugin. Nothing else is needed; there is no interval setting. Run cron often enough for your
provider's typical training time, or refresh manually from the UI or with
drush ai-finetuner:status.
Uploaded images¶
Images uploaded directly on a job are stored under ai-finetune/YYYY-MM in the site's default file
scheme. Allowed extensions are png, jpg, jpeg and webp. The field has unlimited cardinality.