Learn how to fine-tune a large language model (LLM) and computer vision models with Domino Foundation Models (preview) to affordably take advantage of large, general-purpose models for your domain-specific needs.
Domino Code Assist provides a friendly UI for selecting a foundation model and fine-tuning it on a new dataset. Domino Code Assist generates code to preprocess the data and execute a model trainer. After training, Domino publishes the fine-tuned model to the Experiments page along with the experiment’s parameters and logged metrics.
Domino Foundation Models gives you the following benefits:
Full transparency and control of training code
Rapid testing and iteration with processed data
Integration with ML Flow to easily monitor results, register, and deploy models
Rapid setup and configuration
Domino Foundation Models leverages models and datasets from Hugging Face.
In this example, you fine-tune the bert-base-uncased model on the glue sst2 dataset from Hugging Face to improve its efficiency and effectiveness.
Start a Jupyter workspace to use Domino Foundation Model. For this feature, we recommend using a hardware tier with a minimum of 6 cores, 56GB RAM, and 1 Nvidia V100 GPU.
Hover over the Code Assist icon to show a popup menu.
Select Foundation Models > Text Classification > bert-base-uncased > FINE-TUNE to fine-tune the bert-base-uncased model from Hugging Face.Note
Fine-tune the model on the glue dataset with sst2 config from Hugging Face. The dataset is comprised of two columns: A "sentence" column and a "label" column of the sentence’s sentiment.
Code Assist automatically adds ML FLow tracking to let you view results and monitor progress. You can specify an
experiment_name to override the default tracking experiment.
To view the experiment, click Open experiment.
Note the Run-name indicated and select your experiment.
View Parameters and Metrics including real-time statistics such as loss, learning rate, and epoch. Once fine-tuning finishes, your model appears in the Outputs tab.
The code that Domino Code Assist generates is just the beginning. Data scientists can use this code to bootstrap their experiments or select Edit from the Code Assist popup to reconfigure their code.
For example, if you’d like to fine-tune the
roberta-base model instead of the
bert-base-uncased model, simply change the
model_name variable in the autogenerated code from
roberta-base and rerun the code.
Feel free to use any model from the Hugging Face website or a private model that you have locally.
If you want to tune hyper-parameters, update your code to run on a Ray cluster.