Model Descriptor reference
The model descriptor is the YAML applied by akka models apply to a project’s region. It declares the accelerator allocations that the project claims, the models that run on them, and the endpoints that serve those models. See Serving models for the tasks these resources support.
To check a descriptor against the region without persisting anything, add --dry-run:
akka models apply -f models.yaml --dry-run
The CLI checks the shape of the descriptor before it sends anything and reports every problem at once. The region then decides whether the descriptor is admitted, including whether the requested devices fit the pool.
Document envelope
A descriptor is a multi-document YAML file. Documents are separated by a line starting with ---, and every document carries the same four top-level fields.
| Field | Type | Description |
|---|---|---|
resource |
string required |
One of |
resourceVersion |
string required |
Must be |
metadata.name |
string required |
Resource name. See Naming rules. |
spec |
object required |
Shape depends on |
Specs are parsed strictly. An unrecognized field is an error rather than a value that is silently ignored, so a mistyped field name fails the file instead of quietly changing behavior.
A descriptor cannot contain a Service, Route, or Secret. Those resources belong to the project descriptor. Create them with akka projects apply, akka routes, or akka secrets.
Naming rules
metadata.name and the names of allocation entries must be valid DNS labels:
-
lowercase alphanumeric characters and dashes, matching
[a-z0-9]([-a-z0-9]*[a-z0-9])? -
63 characters maximum
The platform derives object names from yours by adding suffixes, such as -engine for the service that a model answers on, and the derived names have to fit the same limit.
Apply order
Applying a descriptor writes resources in dependency order, so nothing refers to an object that does not exist yet:
-
Accelerator allocations
-
Models
-
Model endpoints
akka models apply creates or updates each resource by name, and prints whether it was created, updated, or unchanged. akka models delete runs in the reverse order.
AcceleratorAllocation
An accelerator allocation partitions the region’s finite accelerator capacity to your project. The region declares which pools exist, you allocate devices from a pool, and the region fits models within the allocation.
resource: AcceleratorAllocation
resourceVersion: v1
metadata:
name: tutorial
spec:
allocations:
- name: gpu
acceleratorPool: POOL_NAME
devices: 1
Each allocated device becomes one standing claim, named from the entry name and the device index. A claim is allocated to exactly one project, so projects cannot share a device.
| Field | Type | Description |
|---|---|---|
spec.allocations |
list required |
The device counts that your project holds, one entry per allocation name. At least one entry. Two entries can draw on the same pool under different names. |
spec.allocations[].name |
string required |
The name of the entry, and what a model’s |
spec.allocations[].acceleratorPool |
string required |
A pool that the region declares, for example |
spec.allocations[].devices |
integer required |
The number of whole devices from the pool that are allocated to the project. The minimum is 1. |
Model
A model is one checkpoint served by an engine on a device of an allocation.
resource: Model
resourceVersion: v1
metadata:
name: assistant
spec:
model: mistralai/Ministral-3-3B-Instruct-2512
source:
type: huggingface
huggingface:
secretRef: hf-token
revision: COMMIT_SHA
engine:
type: vllm
vllm:
checkpointFormat: mistral
toolCalling:
parser: mistral
placement:
allocation: gpu
device: 0
serving:
contextLength: 8192
The schema only grows. The region refuses a field that it does not implement yet.
| Field | Type | Description |
|---|---|---|
spec.model |
string required |
The checkpoint to serve, passed to the model server as it is written, for example |
spec.task |
string |
What the engine serves: |
spec.source |
object required |
Where the weights come from. See spec.source. |
spec.engine |
object required |
The model server. See spec.engine. |
spec.placement |
object required |
The device that the model runs on. See spec.placement. |
spec.serving |
object |
The serving limits. See spec.serving. |
spec.loraAdapters |
list |
LoRA adapters served next to the base model. See spec.loraAdapters. |
spec.replicas |
integer |
The number of engine replicas. The only accepted value is |
spec.workloadIdentity |
object |
The cloud identity that the engine pod runs as, set on the model’s own service account as it is for a service. An adapter fetched from a bucket with native credentials authenticates as this identity. The |
spec.source
| Field | Type | Description |
|---|---|---|
type |
string required |
The source provider. Only |
|
object required when |
The Hugging Face source. |
huggingface.revision |
string required |
The full 40-character commit SHA, in lowercase hexadecimal, that the weights are pinned to. A branch or tag name is refused, because it moves under a running model. Requests cannot override the revision. |
huggingface.secretRef |
string |
The name of the project secret that holds the token for gated checkpoints. The secret stores the token under the key |
cache |
object |
Persist the weights across restarts. |
cache.sizeGiB |
integer required with |
The size of the cache volume in GiB. The minimum is 1. |
spec.engine
| Field | Type | Description |
|---|---|---|
type |
string required |
The model server. Only |
|
object required when |
The vLLM settings. Every field is optional, and a field that is absent or |
vllm.dtype |
string |
The data type of the weights and activations: |
vllm.quantization |
string |
The weight quantization method: |
vllm.kvCacheDtype |
string |
The data type of the KV cache: |
vllm.checkpointFormat |
string |
The checkpoint layout: |
vllm.chatTemplateRef |
string |
The name of the project secret whose |
vllm.toolCalling.parser |
string |
Enables OpenAI tool calls with the named parser. One of |
vllm.extraArgs |
list of strings |
Arguments appended to the engine command line, last and verbatim. The region refuses the flags that the platform owns: the model, port, served name, memory fraction, adapters, and parallelism. |
spec.placement
| Field | Type | Description |
|---|---|---|
allocation |
string required |
The name of an entry in your project’s |
device |
integer |
The index of the device within that entry that the model runs on. The minimum and default are |
memoryGiB |
integer |
The engine’s device-memory budget on that device, in GiB. The minimum is 1. When absent, the model takes the whole device less the type’s headroom. |
spec.serving
| Field | Type | Description |
|---|---|---|
|
integer |
The maximum number of tokens per sequence, prompt and completion together. The device-memory budget must hold at least one sequence of this length, or the engine refuses to start. When absent, the engine uses the checkpoint’s own maximum. The minimum is 1. |
maxConcurrentRequests |
integer |
The maximum number of requests scheduled at once. The minimum is 1. |
resources |
object |
The CPU and memory of the engine container, applied as both request and limit. When absent, the region default applies. The device is never listed here. |
spec.loraAdapters
Adapters are static. Changing the set restarts the engine.
| Field | Type | Description |
|---|---|---|
name |
string required |
The name that clients send in the |
model |
string required |
The adapter checkpoint, for example |
rank |
integer required |
The LoRA rank of the adapter. The minimum is 1. The engine computes its maximum rank from the declared ranks. |
source.type |
string required |
|
source.huggingface |
object |
For |
source.objectStorage.bucket |
string required |
For |
source.objectStorage.path |
string required |
For |
source.objectStorage.sha256 |
string required |
For |
ModelEndpoint
A model endpoint serves one or more models behind one address, and clients choose between them with the OpenAI model field. The endpoint knows nothing about public hostnames. Internet exposure is a project route whose backend is the endpoint.
resource: ModelEndpoint
resourceVersion: v1
metadata:
name: assistant-endpoint
spec:
models:
- name: assistant
apiKeySecret: assistant-keys
| Field | Type | Description |
|---|---|---|
spec.models |
list required |
The models that the endpoint serves. At least one. |
spec.models[].name |
string required |
The name of a |
spec.apiKeySecret |
string required |
The name of the project secret whose entries are the accepted API keys. The endpoint is reachable by anything that can reach the gateway, so it must never be silently open. |
A project can serve at most 64 endpoints. The region refuses the endpoint that would exceed that number.
Cross-document rules
Checked by the CLI across the whole file:
-
metadata.namemust be present and must not repeat within a resource kind. -
Allocation entry names must not repeat across every allocation in the descriptor.
-
Every allocation entry has an
acceleratorPooland at least one device. -
A model has
spec.model,spec.source.type, a pinnedrevisioninspec.source,spec.engine.type, andspec.placement.allocation. -
An endpoint lists at least one model and names an
apiKeySecret.
What the region checks
The CLI does not check anything that depends on the region. When you apply, the region admits or refuses the change. It checks, among other things:
-
Whether the devices that an allocation asks for fit the pool, and whether the allocation exceeds what the project can draw.
-
Whether a model sets only values that the region accepts. A model runs one replica, does not use the
akkaworkload identity, and does not pass flags that the platform owns inextraArgs. -
Whether adapter names are unique across the project’s routing table.
-
Whether the fields of a model are ones that the region implements.
Use --dry-run to run these checks without persisting anything.
Complete example
resource: AcceleratorAllocation
resourceVersion: v1
metadata:
name: tutorial
spec:
allocations:
- name: gpu
acceleratorPool: POOL_NAME
devices: 1
---
resource: Model
resourceVersion: v1
metadata:
name: assistant
spec:
model: mistralai/Ministral-3-3B-Instruct-2512
source:
type: huggingface
huggingface:
secretRef: hf-token
revision: COMMIT_SHA
engine:
type: vllm
vllm:
checkpointFormat: mistral
toolCalling:
parser: mistral
placement:
allocation: gpu
device: 0
serving:
contextLength: 8192
---
resource: ModelEndpoint
resourceVersion: v1
metadata:
name: assistant-endpoint
spec:
models:
- name: assistant
apiKeySecret: assistant-keys
Resources that belong elsewhere
Accelerator pools cannot be created from a descriptor. They are regional inventory. See Reviewing available hardware.
| The features described in this section are an add-on to Akka Automated Operations. They are not included in the base product. |