Skip to main content

Upload Adapter

info

Compatible PEFT adapters can be uploaded for use with Predibase inference.

Adapters must include the following:

  • an adapter_config.json file
  • at least one of adapter_model.safetensors or adapter_model.bin
Only these required files will be uploaded. All other files in the directory are ignored.

pb.adapters.upload

pb.adapters.upload

Uploads an existing adapter into Predibase

Parameters:

   local_dir: str
Directory containing the adapter files

   repo: str
The Predibase adapter repo to upload to

   base_model: str
The base model that the adapter was fine-tuned from. Will be used to match adapters to the appropriate deployments.

Returns:

   Adapter

Example:

pb.adapters.upload("/my/local/adapter/", "myrepo", "llama-3-8b")