akka optimize training adapters import
Import a PEFT LoRA adapter as a version of a named model
Synopsis
Import a PEFT LoRA adapter, the adapter_config.json and adapter_model.safetensors a training run elsewhere saved, as a version of NS/NAME.
--base names the base model the adapter was trained over: a base model this deployment allows and that has been selected, by repository, or a registered base model version. The adapter’s config must name that base, by repository or by a snapshot path in the Hugging Face cache, at the commit the base pins.
The service refuses the import, registering nothing and deleting what was uploaded, where:
-
either file is missing;
-
the config is not a LoRA adapter’s, or uses DoRA or modules_to_save;
-
it names another base model, or a revision that is not the base’s commit;
-
its rank is above what an endpoint here loads ("training endpoints info");
-
the adapter does not load onto the base model, such as one that adapts a module the base model does not have. A deployment without a training cluster does not run this check.
--project names the training project an endpoint for the adapter counts against. It defaults to the training project whose name is the model’s namespace.
The command uploads the files, then follows the import until it is registered or refused, and prints the command that serves it.
akka optimize training adapters import NS/NAME --base BASE_MODEL -d DIR [flags]
Examples
# Import an adapter over a selected base model
akka optimize training adapters import triage/support-adapter \
--base google/gemma-4-E4B-it -d ./epoch-2
# Then serve it
akka optimize training endpoints create --model triage/support-adapter:v1 --wait
Options
--base string Base model the adapter was trained over
-d, --dir string Directory holding adapter_config.json and adapter_model.safetensors
-h, --help help for import
--project string Training project an endpoint for the adapter counts against (default the model's namespace)
Options inherited from parent commands
--cache-file string location of cache file (default "~/.akka/cache.yaml")
--config string location of config file (default "~/.akka/config.yaml")
--context string configuration context to use
--disable-prompt Disable all interactive prompts when running akka commands. If input is required, defaults will be used, or an error will be raised.
This is equivalent to setting the environment variable AKKA_DISABLE_PROMPTS to true.
--force Skip the confirmation prompt
--jq string Filter the JSON output with a jq expression
--json string Output JSON with only these fields; --json= lists the fields a command offers
--no-color Print without color, as NO_COLOR does
-o, --output string set output format to one of [text,json,json-compact,go-template=] (default "text")
--page-mode string the mode for paging, either paged, buffered or auto. (default "auto")
-q, --quiet set quiet output (helpful when used as part of a script)
--region string Region to use if the project has more than one region
--timeout duration client command timeout (default 10s)
--trainer-url string Trainer service URL (default TRAINER_URL, then AKKA_OPTIMIZE_URL, then http://localhost:9001)
--url string Optimize service URL (default OPTIMIZE_URL, then AKKA_OPTIMIZE_URL, then http://localhost:9010)
--use-grpc-web use grpc-web when talking to Akka APIs. This is useful when behind corporate firewalls that decrypt traffic but don't support HTTP/2.
--verbose set verbose output
SEE ALSO
-
akka optimize training adapters - Import a LoRA adapter trained elsewhere, so an endpoint can serve it