Load a model that requires authentication with Hugging Face
use_auth_token
when creating the actual model.pipeline
function from the
transformers library, and defining the Model
class.
__init__
function.
pipeline
, we use the use_auth_token
parameter,
pass the hf_access_token
secret that is on our Baseten account.
requirements
, which need to include Hugging Face transformers,
and the secrets.
hf_access_token
available in the Truss, we need to include
it in the config. Setting the value to null
here means that the value
will be set by the Baseten secrets manager.
--trusted
flag to give the model access to
secrets stored on the remote secrets manager.