Fine-tuning
Run your fine-tuning jobs with Portkey Gateway
Portkey Gateway supports fine-tuning in two ways:
- Fine-tuning with portkey as a provider, supports multiple providers with a single unified API.
- Fine-tuning with Portkey as a client, supports following providers:
1. Fine-tuning with Portkey as a client
With Portkey acting as a client, gives you the following benefits:
- Provider specific fine-tuning.
- More control over the fine-tuning process.
- Unified API for all providers.
2. Fine-tuning with Portkey as a provider
With Portkey acting as provider, gives you the following benefits:
- Unified API for all providers
- No need to manage multiple endpoints and keys
- Easy to switch between providers with limited changes
- Easier integration with Portkey’s other features like batching, etc.
How to use fine-tuning
Portkey supports a Unified Fine-tuning API for all providers which is based on OpenAI’s Fine-tuning API.
While the signature of API is same for all providers, there are places where a specific provider require some more information which can be passed via headers if used as a client, or by portkey_options
params if used as a provider.
Fine-tuning with Portkey as a client
Upload a File
Create a Fine-tuning Job
portkey_options
supports all the options that are supported by each provider
in the gateway. Values can be provider specific, refer to provider’s
documentation for each provider’s specific options required for fine-tuning.
List Fine-tuning Jobs
Get Fine-tuning Job
Cancel Fine-tuning Job
When you use Portkey as a provider for fine-tuning, everything is managed by Portkey hosted solution, this includes job submission with provider, monitoring job status and able to use the fine-tuned model with Portkey’s Prompt Playground.
Providers like OpenAI, Azure OpenAPI does provider a straight forward approach
to use the fine-tuned model for inference whereas providers like Bedrock
abd
Vertex
does require you to manually provider compute which is hard for
portkey to manage.
Notes:
- For
Bedrock
,model
param should point to themodelId
fromportkey
and themodelId
to submit to the provider should be passed viaprovider_options
. Example is available below.
For more info about
modelId
, please refer to the provider’s documentation.
Please refer to the provider’s documentation for fine-tuning with Portkey as a gateway.
Was this page helpful?