Weekly round-up: Deploy Hugging Face Transformers, LightGBM, and XGBoost models
Baseten’s model deployment stack runs on Truss, our open-source library for model serving. Any model framework supported by Truss is also supported in the Baseten CLI. As such, the Baseten Python client now supports three new frameworks:
And of course you can deploy any model to Baseten as a custom model.
To use these newly supported frameworks, upgrade to the latest version of the Baseten Python client with:
pip install --upgrade baseten
Example deployment
Let’s take a look at what deploying a model built from Hugging Face Transformers looks like:
1import baseten
2from transformers import pipeline
3
4model = pipeline('fill-mask', model='bert-base-uncased')
5
6baseten.login("*** INSERT API KEY ***") # https://docs.baseten.co/settings/api-keys
7
8baseten_model = baseten.deploy(
9 model,
10 model_name='bert base uncased',
11)
As we continue developing Truss, more frameworks will be supported out-of-the-box on Baseten. Let us know what framework you’d like to see next by opening an issue.
🎃 The pumpkin patch
A handful of small-but-mighty changes to make Baseten more joyful to use:
You can view and edit your workspace name in settings
Code files show when they were last edited
The file upload component checks uploaded files to ensure they are below the maximum size before saving
Bug fixes and performance improvements