Skip to main content
A switch decides whether a family or a model answers calls. Switch one on to call it, and off to free its place for another model. Roll a family back when a newer model does worse for you: the family returns to an older model, and every newer one is discarded. Delete a family or a model when you no longer need it. A delete can’t be undone.
Families explains how a family grows and moves.

Switch a family or a model on

A family starts switched on. A model answers calls to its number only once you switch it on, as in the request above.
  • POST /v1/families/support-router/switch switches the family.
  • Switching a model on loads it and checks it first.
  • A family switches on as described in how a family moves.
  • Send {"on": false} to switch either off. Calls stop at once, and its keep warm stops too.
To switch the family off:
GET /v1/families and GET /v1/families/support-router show each family’s switch as switched_on, and the model it serves. They also show each model’s own switch as on_at. That is when the switch went on, or null while it is off.

Places

Each model that answers calls takes one place, however many switches make it answer. Your tier sets how many places you have. answering in effective_limits on /v1/account gives the number (tiers). places on /v1/account counts the places you use. It has answering, and kept_warm for the models kept warm. In a shared organisation, its projects share its places. A switch that would take one more place gets 409 live_limit. Its details list what would answer in your project once its switch_off is applied, the one used longest ago first. Each has used_at: the latest call, evaluation or switch-on of the switches it answers through. elsewhere counts the places the organisation’s other projects use. To switch some off in the same step, send them as switch_off. It is a list of families and models, such as ["support-router@2"]. Lowering a limit below what answers switches nothing off.

Checks and errors

To switch only what you last read, add a check. If what you read has changed, the switch is refused:
  • To a family’s switch, send served, the ID of the model the family serves as you saw it. A change gets 409 served_changed.
  • To a model’s switch, send adapter, the model’s ID. A change gets 409 model_changed.
The same codes answer in two cases, whether or not you sent a check:
  • A newer model joined while the switch was loading a latest model the family didn’t serve.
  • A model, or a family serving one, was switched off before the switch took hold. The switch had read it as on.

Unused switches

A switch nobody uses doesn’t turn itself off. A family or a model keeps its place until you switch it off. So switch off what you no longer call, to free a place.
  • A name that appears only in fallback doesn’t count as a use. Nor do tries in the console playground.
  • The family’s switch and a model’s switch are counted apart. Calls to support-router move the family’s used_at, not the used_at of support-router@3.
  • Switching on again needs a place, like any switch-on.

Roll a family back

A rollback takes a family back to one of its older models. It discards every newer one for good.
  • to names the model by its number, such as support-router@2.
  • discard lists the models newer than to that aren’t deleted or discarded, exactly as you confirmed them.
  • served is optional. It is the ID of the model the family serves, as you saw it.
A discarded model answers nothing. Its own switch and keep warm go off, and its hour of keep warm is billed to the minute. A call to it gets 410 model_discarded, with no fallback answer. Its number is never given again. The family lists it with status discarded and discarded_at. A fine-tune of the family that is still training is cancelled, and its hold released. An evaluation of a discarded model that is still running is cancelled too. The rows it scored stay charged. A family that is switched on loads to and checks it first, the same way a move does. Then it serves to, and keep warm follows. If to fails to load, nothing changes. A rollback takes a place only when a move would. It is never refused at your limits. With no place free, it still discards the newer models. The same holds for a kept-warm family with no warm place. The family keeps serving its model while its move to to waits, like any move. A rollback onto a full size goes ahead, unless it would leave the size no room for models that aren’t kept warm. A family that is switched off serves to once it is switched on, as its latest model. The dataset is unchanged. The family’s next fine-tune trains from to, and still needs new rows.

Delete a family

Send dataset_id, the dataset the family grew on, as you saw it. Send latest, the ID of the family’s latest model as you saw it, or null for none. Then a delete never takes a model you didn’t see. What happens depends on whether a model ever joined the family. A model that failed its gate never joined. After a family that a model joined is deleted:
  • Calls to the family get 410 family_deleted. So does reading, switching, keeping warm, rolling back or continuing it.
  • Calls to its models get 410 model_deleted, with no fallback answer.
  • GET /v1/families leaves it out.
  • Its models no longer count against your storage allowance.
Either way its dataset stays. So do its jobs in the fine-tuning jobs list, with their charges and family_deleted: true. The answer is {"id": "support-router", "object": "family", "deleted": true}.

Delete the dataset instead

When you delete a family’s dataset instead, the family keeps its models, and they answer as before. The family can’t continue. Its continue state is dataset_deleted, and continuing it gets 410 dataset_deleted. Start a new family from its latest model, such as support-router@4. A dataset can’t be deleted while a fine-tune, an evaluation or a prompt-tuning job reads it. Deleting it then gets 409 in_use.

Delete a model

Delete a model by its number. Add ?adapter=ft-..., the ID you saw for that number. Then the call changes nothing if the number names another model. Deleting a model removes it for good, with its weights, its training specification and its held-out records.
  • A call to it gets 410 model_deleted, with no fallback answer. So does an evaluation or fine-tune that names it.
  • A decision already under way on it finishes and is charged. A fine-tune that started from it before also finishes.
  • It no longer counts against your storage allowance.
  • Deleting again changes nothing, so a retry is safe.
The family’s line keeps the model’s place, with only these fields: A switched-off family whose model you delete serves its latest model once you switch it on.