Model Export
Export fine-tuned models to various formats for deployment.
Merge LoRA Adapter
Merge a LoRA adapter with its base model into a standalone model:
# Auto-detect base model from adapter_config.json
soup merge --adapter ./output --output ./merged
# Specify base model and dtype
soup merge --adapter ./output --base meta-llama/Llama-3.1-8B --dtype bfloat16
# Merge tensor by tensor, without loading the whole model into RAM (v0.77.0)
soup merge --adapter ./output --output ./merged --low-memoryA native MLX adapter (written by backend: mlx training) is not merged by the default backend: it needs soup merge --backend mlx, which writes a dense checkpoint on Apple Silicon (v0.78.0; see Native MLX chat and fusion). The default backend refuses such a directory with Native MLX adapter detected; select --backend mlx.
--low-memory (v0.77.0) merges a plain LoRA adapter tensor by tensor straight from the base model's .safetensors files instead of loading the whole model into RAM, so peak memory is about one shard, the largest .safetensors file. A base stored as a single model.safetensors is memory-mapped whole, so it saves little. Upstream states that the values are identical to the regular merge; the output keeps the base's shard layout instead of one model.safetensors, and the tokenizer is saved from the adapter directory. It needs the default --save-format fp16 (any other value exits 2 with --low-memory only supports --save-format fp16) and a plain LoRA adapter: DoRA, modules_to_save, rank or alpha patterns, adapters on the embeddings or lm_head, a LoRA bias, a base without .safetensors files and a base stored in a quantized dtype are refused before anything is written, with Low-memory merge not possible: ... Run again without --low-memory. (exit 1). The merge is written to a staging directory next to --output and moved into place only when complete, and an existing non-empty --output is not overwritten. A Hub-id base is fetched through Soup's own download wrapper, so, unlike the regular merge, it goes through the namespace pin (#2006). Since v0.78.0 the files it fetches are the ones a local base would have (#2235, by @deven1003): the .safetensors shards and .json files, plus .model, .txt, .tiktoken and .jinja files, and .py files only with --trust-remote-code, so a remote-code model's merged folder loads. It no longer downloads the unused consolidated.safetensors, and when model.safetensors.index.json names a consolidated* shard the shard is fetched by name, as from a local directory (#2856). Through v0.77.2 only *.safetensors and *.json were fetched.
Since v0.78.0 --low-memory also refuses an adapter whose initialization rewrites the base (#2722, #2732, by @abdumutalipabay0): one trained with lora.init_strategy PiSSA or OLoRA, or with CorDA, LoftQ or LoRA-GA, because such an adapter is only correct on the rewritten base. The message reads Low-memory merge not possible: adapter_config.json sets init_lora_weights='pissa', which can rewrite the base weights at initialization; the low-memory merge does not support it followed by Run again without --low-memory.; use the regular soup merge for these. init_lora_weights values that leave the base alone (unset, a boolean, gaussian, mica, eva, orthogonal, or zero) still merge, and init_lora_weights: 1 is refused with the same message. The refusal text was confirmed by calling the adapter loader (load_adapter) on tiny adapter folders on the v0.78.0 code, where pissa, olora and 1 were refused and true, false and gaussian passed (the same folders passed on v0.77.2); the exit code 1 is read from commands/merge.py, and the command was not run to its end because this site's light install has no torch.
Warning:Re-run this if you merged with
--low-memory(v0.78.0). From v0.77.0, which introduced the flag, through v0.77.2,soup merge --low-memoryof an adapter whose initialization rewrites the base, such as PiSSA or OLoRA (upstream's list adds CorDA, LoftQ and LoRA-GA), did not refuse it. In upstream's words, v0.78.0 refuses it "instead of silently writing wrong weights" (#2732). Merge such an adapter again without--low-memory. The scope is the low-memory merge: the adapter itself and the regular merge are not affected.
Since v0.77.2 both paths load the base at the Hub commit recorded in the adapter's training provenance, not the latest one, and print a Base revision: line; with HF_HUB_OFFLINE set and that commit not cached the merge fails. The details and the scope are under GGUF below.
The regular merge loads the adapter's tokenizer before anything else (v0.78.0, #2760, #2761, by @artikulus1301). soup merge reads the tokenizer from the adapter directory before it loads the base or writes a file, so an adapter directory without usable tokenizer files fails without leaving merged weights and no tokenizer in --output. The --low-memory path still saves the tokenizer last, into its staging directory, which is moved into place only when the merge is complete. Upstream did not exercise the refusal of a merge whose tokenizer is missing by hand before the release, and this page prints no exit code for it.
--save-format 4bit writes a single bitsandbytes 4-bit merged checkpoint without a dequantize, merge, requantize cycle. --save-format 4bit_forced quantizes every linear module, including lm_head; through v0.75.2 transformers' default skip list left lm_head in full precision, so the "forced" checkpoint was not fully forced. A model with tied embeddings (tie_word_embeddings=True) cannot hold a 4-bit lm_head that shares the embedding weights, so 4bit_forced refuses it by name once the fp16 merge has been staged and before the 4-bit reload (Merge failed: ..., exit 1); use --save-format 4bit for those (#1606).
GGUF (llama.cpp / Ollama)
# Export LoRA adapter (auto-merges with base, then converts)
soup export --model ./output --format gguf --quant q4_k_m
# Different quantizations
soup export --model ./output --format gguf --quant q8_0
soup export --model ./output --format gguf --quant f16
# Export a full (already merged) model
soup export --model ./merged --format ggufSupported quantizations: q4_0, q4_k_m, q5_k_m, q8_0, f16, f32
Phases, logs and dependencies (v0.77.0). A GGUF export prints a line for each phase it runs (toolchain lookup, dependency check, the adapter merge when there is one, conversion, and quantization when there is one). Two flags are new:
# Stream the converter's and quantizer's output while they run
soup export --model ./output --format gguf --verbose
# The environment manages its own packages: never run pip
soup export --model ./output --format gguf --no-install-deps --llama-cpp /path/to/llama.cpp--verbose streams the converter's and quantizer's combined output as it arrives and keeps the last 100 lines for the failure summary; without it a successful run keeps the tools' logs quiet. --no-install-deps checks that gguf, sentencepiece and protobuf are installed and, if any is missing, exits 1 naming them, before merging an adapter or touching llama.cpp; it never runs pip. It does not stop the llama.cpp clone: with no --llama-cpp, LLAMA_CPP_PATH or existing ~/.soup/llama.cpp, Soup still clones the pinned checkout, so pass --llama-cpp <dir> in a managed environment. Both flags apply to --format gguf only; with any other format, gguf-ud included, the command exits 2 rather than ignoring them (#1777): --verbose requires --format gguf. for one flag, --verbose and --no-install-deps require --format gguf. for both. Through v0.77.2 the single-flag form read --verbose require --format gguf., a grammar error fixed in v0.78.0 (#2259); the exit code did not change. Run on the v0.78.0 binary with --format onnx and --format gguf-ud.
The pinned llama.cpp moved from b5270 to b12423 (v0.78.0, #1911, #2910, by @1DMB1). The auto-cloned llama.cpp is pinned at tag b12423; through v0.77.2 it was b5270. Upstream says Qwen3.5 GGUF exports pass the capability check on a fresh default checkout now; this site did not run an export or a clone, so that is upstream's statement, not a result here. An existing ~/.soup/llama.cpp is reused as it is, and the pin is a tag, not a commit. Delete that folder to have the next export clone the pinned tag, then build llama-quantize again. A GGUF written by the new converter can differ from one written with b5270 for the same model, so export again before you compare files. soup export --format gguf also stops before any cloning, with exit 1, when transformers is not installed: The pinned llama.cpp converter requires transformers, which is not installed in this environment. and Install it the supported way: pip install "soup-cli[train]". The converter imports transformers when it loads; Soup reports it missing before the adapter merge and the dependency handling, and never installs it for you. A light install without transformers printed exactly that on the v0.78.0 binary, and the home folder had no ~/.soup/llama.cpp afterwards (checked by this site's audit).
An architecture the pinned converter cannot convert is refused before cloning, installing or converting (v0.77.0). For the default checkout Soup compares the model's text architecture in config.json (text_config.architectures when it is set) with the list of architectures the pinned converter supports, and stops before cloning, installing anything or converting: Architecture '<name>' is not supported for text conversion by default llama.cpp b12423. Select a compatible checkout with --llama-cpp <dir>. (exit 1; the tag in the message is the pin, so it read b5270 through v0.77.2). An adapter is checked after its temporary merge, which is then removed. A checkout you supply (--llama-cpp, LLAMA_CPP_PATH or an existing ~/.soup/llama.cpp) is asked for its own supported list instead, and when that answer is inconclusive the conversion decides. (Since closed in v0.78.0: through v0.77.2 the b5270 pin could not convert Qwen3.5 and moving the pin was open upstream, #1911, #1955.)
Checkpoints that declare MTP layers they do not hold (v0.77.0). When a model's config declares mtp_num_hidden_layers but its safetensors headers carry no MTP tensors, as in a merged Qwen3.5 text model, Soup passes --no-mtp to the converter, and keeps real MTP tensors when they are present. Upstream records that such a merge used to export to a GGUF that would not load (#1912, #1957). The converter must advertise --no-mtp. Upstream says the default b12423 pin does, so MTP-declared checkpoints convert on a fresh default checkout (not run here: it needs a clone); the b5270 pin did not, so through v0.77.2 this needed a newer checkout passed with --llama-cpp. An older checkout you pass yourself may not advertise it, and then soup export stops with MTP is declared but no MTP tensors were saved. The selected converter does not advertise --no-mtp successfully; use --llama-cpp with a compatible llama.cpp checkout supporting --no-mtp. Missing or malformed checkpoint metadata is refused rather than read as "no MTP tensors". The shared safetensors header reader currently refuses unsupported dtypes such as F8_E4M3, so this inspection can refuse an FP8 checkpoint even when its MTP tensors are present.
An adapter is merged onto the base commit its run recorded (v0.77.0). When --model is a LoRA adapter whose directory holds a soup_run.json with the Hub commit of the same base, the merge that gguf, gguf-ud, onnx, tensorrt, bitnet and tq1_0 run first loads that commit (torchao merges first too since v0.78.0, see below) and prints Base revision: <commit> (recorded run); otherwise it prints Base revision: unknown (legacy, local source or base override) and loads the base as before.
soup merge does the same since v0.77.2 (#2485, by @vaputa). Both of its paths, the regular one and --low-memory, print the same Base revision: line and load the base at the Hub commit recorded in the adapter's training provenance, not the latest one. With HF_HUB_OFFLINE set and that commit not in the cache, the merge now fails where v0.77.1 merged whatever snapshot was cached. Upstream did not exercise a merge at a recorded Hub commit by hand before the release. Its v0.77.2 Known Limitations said base-revision binding covered the Transformers backend and soup merge, and that Unsloth and MLX loads and local or cached-path base hints were not bound. At v0.78.0 upstream lists the binding as covering the Transformers backend, soup merge, soup sweep and native MLX text training (single process, Hugging Face base; see MLX backend), and still not Unsloth loads or local and cached-path hints (#1902, still open). The MLX inference, chat, serve, merge and export paths are outside it. The merge that soup export runs first loads the recorded commit too (above, since v0.77.0), so soup merge is not the only path that pins.
A failed export removes its temporary merge directory (v0.77.1). The adapter merge writes .soup_merge_tmp_<adapter>/ next to the adapter (through v0.77.2; see the next paragraph for the name since v0.78.0). Through v0.77.0 a later failure (llama.cpp not found, a failed clone or dependency install, or a merge that dies while saving the model or tokenizer) could leave that directory behind, a multi-gigabyte one for a large model. Since v0.77.1 the gguf, onnx, tensorrt, bitnet and gguf-ud paths remove it when the export fails (#1464, #2164). It removes only a directory the export created. Read from the call site (commands/export.py, _merge_dir_for and _remove_merge_dir) and not run, because a failing export needs a model and llama.cpp.
Since v0.78.0 the scratch directory has a unique name (#2299, #2310, by @bfs2021). Every adapter export creates its own .soup_merge_tmp_<adapter>_<random suffix> next to the adapter and removes only that one, printing Cleaning up temporary merge files..., so a .soup_merge_tmp_<adapter>* folder left by an earlier run is never reused and never deleted. Through v0.77.2 the name was the fixed .soup_merge_tmp_<adapter>, and an existing one was left alone with Leaving <path>: it existed before this export.; that message no longer exists in the code at the tag.
Without --output, the file is named <model-name>.<quant>.gguf and written next to the model directory, not inside it: --model ./output with --quant q4_k_m produces ./output.q4_k_m.gguf. Pass --output ./my-model.q4_k_m.gguf to choose the name. Since v0.76.0 the directory that will hold the output is created up front; through v0.75.2 a quantized export into a directory that did not exist yet crashed after the adapter had been merged, and the cleanup deleted the merged model (#1445).
Use with Ollama:
echo 'FROM ./output.q4_k_m.gguf' > Modelfile
ollama create my-model -f Modelfile
ollama run my-modelONNX
Use a separate export-only environment. Upstream's supported path keeps training and adapter merging in the training environment and installs only soup-cli[onnx] in a fresh one: installing [train] and [onnx] together is unsupported (the tested optimum-onnx==0.1.0 needs Transformers below 4.58, and the [train] extra needs 5.16.1 or newer). An adapter-only output is merged first in the training environment, then exported from the other one:
soup merge --adapter ./output --output ./merged
python3 -m venv .venv-onnx
source .venv-onnx/bin/activate
python -m pip install "torch==2.6.0" --index-url https://download.pytorch.org/whl/cpu
python -m pip install "soup-cli[onnx]" "optimum==2.1.0" "optimum-onnx==0.1.0" "transformers==4.57.6"
python -m pip check
soup export --model ./merged --format onnx --output ./model_onnxOn Windows activate the environment with .venv-onnx\Scripts\Activate.ps1 in PowerShell instead of source. The package versions are upstream's pins. Upstream checked the setup on Linux and Python 3.12 against two tiny random models, installing Soup with pip install -e ".[onnx]" from a checkout (this page shows soup-cli[onnx] from PyPI, the same extra), for a merged checkpoint whose configuration and tokenizer Transformers 4.57.6 can read. This site did not run it. The [onnx] extra is still optimum[onnxruntime]>=1.16.0, and no dependency bound changed in v0.78.0.
A checkpoint saved by Transformers 5 can have a tokenizer that 4.x cannot load (a tokenizer saved as TokenizersBackend is upstream's example). Such a checkpoint is outside this path, and upstream says not to rename the tokenizer class to get past the error. Transformers-5-only architectures are not qualified either. Upstream's record of why the environments are separate (benchmarks/onnx-export-compatibility-2026-11-11.md) found that the released Optimum 2.3.0 with optimum-onnx 0.1.0 and Transformers 5.19.0 failed at import, and so did Optimum 1.16.0, in the lab environments it tried. Before v0.78.0 this page printed a three-line recipe (pip install "soup-cli[onnx]" and the export) as if it worked next to the training stack; that is the combination upstream now calls unsupported.
--onnx-task text-generation (the default) exports a causal LM; --onnx-task feature-extraction exports an embedding model (a task: embedding run). Without --output the directory is <model-name>_onnx next to the model.
Check the export numerically: --validate-onnx (v0.78.0)
soup export --model ./merged --format onnx --validate-onnx --prompts ./prompts.txt --atol 0.0001 --output ./model_onnxThe prompt file is UTF-8, one text per line, or .jsonl with {"prompt": "..."} rows (#2676, #2695). The check feeds the same token ids to the source model and to ONNX Runtime, compares all logits, and prints the maximum and the mean absolute error, the tolerance and PASS or FAIL under ONNX Logits Validation. Both run on CPU in float32, one prompt at a time, without a chat template, padding or truncation. --atol defaults to 1e-4; upstream calls that an FP32 smoke check and a configurable starting point, not a quality threshold, and there is no relative tolerance. Non-finite logits never pass.
The scope is --onnx-task text-generation with exactly one ONNX graph, integer token inputs and a float32 logits output: cached decoding, split graphs, other tasks and unknown inputs are refused. Inputs are limited to 1 MiB, 32 non-empty prompts and 512 tokens per prompt, and a limit refuses the check instead of checking a subset. --prompts is required with the flag (ONNX validation input error: --validate-onnx requires an explicit --prompts file.), and --prompts and --atol need --validate-onnx (ONNX validation input error: --validate-onnx, --prompts and --atol require --format onnx --onnx-task text-generation and --validate-onnx.); both exit 3 on the v0.78.0 binary. Plan RAM for both the source model (float32 weights, about four bytes per parameter) and ONNX Runtime.
| Exit | Meaning |
|---|---|
0 | PASS |
2 | A numerical FAIL (logits above the tolerance or non-finite), or an export option conflict: --verbose or --no-install-deps with ONNX is refused before the export because those options need GGUF |
3 | Invalid validation input, missing validation dependencies, or a comparison that cannot run (ONNX validation input error, ONNX validation could not run) |
1 | An exporter failure, as before |
So a script must not read exit 2 alone as numerical drift: the FAIL case prints the ONNX Logits Validation report with FAIL and the error figures, and an option conflict prints its own message and no report. A failed check leaves the exported files in place for inspection, prints no completion panel and does not register the export. For an adapter the reference is its freshly merged model. A pass says nothing about held-out accuracy or about generation with a KV cache. Upstream did not exercise --validate-onnx by hand before the release (it needs the [onnx] stack, and its Known Limitations list the ONNX path among the paths never part of a smoke); the input refusals above were run on the v0.78.0 binary, the PASS and FAIL panel and exits 0 and 2 were not.
TensorRT-LLM
pip install "soup-cli[tensorrt]"
soup export --model ./output --format tensorrt
soup export --model ./output --format tensorrt --output ./model_trtThis path now checks itself before it does any work, and on a current TensorRT-LLM it stops there (v0.74.0). Soup shelled out to
python -m tensorrt_llm.commands.convert_checkpoint, a module absent from every current TensorRT-LLM release: that package ships onlybench,build,eval,prune,refitandserve, and checkpoint conversion now lives as a per-architectureexamples/<arch>/convert_checkpoint.pyscript in NVIDIA's source tree instead. Before v0.74.0 the export silently produced zero artifact bytes; it now fails immediately with a message naming the missing entry point, before the LoRA merge and the output directory are touched. If you exported to TensorRT on an earlier release, check the directory actually holds an engine. Installingtensorrt_llmcan also downgrade a training environment'storch,transformers,numpyanddatasetspins, so keep it out of the environment you train in.
TorchAO post-training quantization
pip install "soup-cli[qat]"
soup export --model ./output --format torchao --quant-config quant.yaml--quant-config is required with this format (without it the command exits 2). The YAML names one scheme in a top-level scheme: key and, for the schemes that take one, a group_size:
scheme: Int4WeightOnly
group_size: 128The four schemes are Int4WeightOnly, Int8DynActInt4, Float8DynActFloat8 and NVFP4. The names are Soup's own and are case-sensitive; each is mapped to the torchao class that implements it. group_size is accepted for Int4WeightOnly and Int8DynActInt4, and the other two take no extra keys. Any other key is refused with the allowed list. The output goes to <model-name>.torchao.<scheme> next to the model unless you pass --output.
--model may be an adapter directory since v0.78.0 (#2862, #2920, by @abdumutalipabay0). Soup resolves the base (--base, otherwise the adapter's recorded base_model_name_or_path, at the revision its run recorded), merges the adapter into it, quantizes the merged model and removes the scratch merge, as every other export format does. With no base it prints Cannot detect base model. Pass --base. and exits 2 (run on the v0.78.0 binary with an adapter that records none, after LoRA adapter detected — merging first...). In upstream's account, through v0.77.2 an adapter directory given to this format was loaded as it was, so the output held the adapter files only, with no config.json and no weights, the panel still printed TorchAO Export Complete, and the export was attached to the registry. If you exported an adapter to TorchAO on v0.77.2 or earlier, open the output folder: a missing config.json and no model weights mean it holds no model, and the registry entry points at that folder. Export again. The merge-then-quantize path needs torch, transformers and torchao, and upstream's tests replace torchao's quantize_ with a recorder, so this page says that it merges first, not that it quantizes correctly.
The [qat] extra now requires torchao>=0.18.0 (it was 0.4.0), because 0.18.0 is the release the class locations were verified against; an older torchao is no longer accepted by the extra. Through v0.75.2, three of the four schemes (Int8DynActInt4, Float8DynActFloat8 and NVFP4) asked torchao for classes it does not export, so they could not build a config at all, and the refusal told you to upgrade torchao when nothing newer existed (#826). Two of the four classes (Int8DynActInt4 and NVFP4) currently live in torchao's prototype namespace, which torchao does not promise to keep stable; Soup tries the public path first, and if a torchao release moves a class the error names every path it tried. inner_k_tiles was removed from the Int4WeightOnly keys because torchao's config raises TypeError for it. The quantization step itself needs transformers and torchao and was not run for this page; the class mapping, floor and keys are read from the v0.76.0 code, and the flag handling (exit 2 without --quant-config, the scheme-name check) was run; the key allowlist is read from the code, because it runs after transformers is imported.
AWQ and GPTQ export (removed in v0.77.0)
soup export --format awq and --format gptq were removed in v0.77.0, together with the [awq] and [gptq] extras and the --bits, --group-size and --calibration-samples options that only they used, because both upstream projects, AutoAWQ and AutoGPTQ, are archived (#1951). The command now stops before it reads the model:
Unsupported format: awq
--format awq was removed in v0.77.0.
Supported: gguf, onnx, tensorrt, bitnet, tq1_0, torchao, gguf-udThat is exit 1. (Since closed in v0.78.0: a --format value written as Rich markup, such as "[/x]", is shown as typed, Unsupported format: [/x] with the supported list and exit 1, #2533. At v0.77.2 it ended in a markup error, Error: MarkupError: closing tag '[/x]' ..., also with exit 1.) A script that still passes --bits, --group-size or --calibration-samples exits 2 with No such option, and soup quantize --to awq or --to gptq (any case) exits 2 with --to must be one of ['gguf', 'onnx', 'tensorrt']; got 'awq' followed by --to awq was removed in v0.77.0. (the second line since v0.77.2; a --to value such as "[/]" is shown as typed and also exits 2, where v0.77.1 exited 1, #2217). --calibration-data remains for its other use, the calibration JSONL for the imatrix GGUF ladder of --format gguf-ud, which is now the only thing that reads it (see Quant Menu II). AWQ and GPTQ export need v0.76.x and its [awq] or [gptq] extra, for example pip install "soup-cli[awq]<0.77"; upstream notes that both projects are archived and incompatible with [train]. v0.76.x supports Python 3.10 to 3.12 and, per upstream's SECURITY.md at v0.78.0, gets no further security fixes after that release. You can also export from a separate environment with the upstream tools.
Training a LoRA on top of a checkpoint that is already AWQ- or GPTQ-quantized is a different feature and is unchanged: training.quantization: awq and gptq still load such a base (see Quant Menu).
History, for artifacts made by older releases. v0.76.0 deprecated both formats, with a yellow Deprecated: line, and upstream's documentation for that line said the [awq] and [gptq] extras could not be installed next to [train]. --calibration-data became required for GPTQ in v0.74.0 and for AWQ in v0.75.0; before v0.75.0 a flagless AWQ export silently downloaded AutoAWQ's large default calibration dataset, so the calibration inputs behind such an artifact were whatever that download contained. A GPTQ export written before v0.74.0 holds only its own gptq_model-<bits>bit-<group>g.safetensors shard, which AutoModelForCausalLM.from_pretrained does not look for, so it does not reload by the standard path; from v0.74.0 the directory also carried a standard model.safetensors.
Deploy to Ollama (v0.18.0+)
Deploy a GGUF model directly to your local Ollama instance:
# Deploy a GGUF model
soup deploy ollama --model ./output.q4_k_m.gguf --name soup-my-model
# Deploy with system prompt and parameters
soup deploy ollama --model ./model.gguf --name soup-chat \
--system "You are a helpful assistant." \
--template chatml \
--parameter temperature=0.7 \
--parameter top_p=0.9
# Export + deploy in one command
soup export --model ./output --format gguf --deploy ollama
# List Soup-deployed models
soup deploy ollama --list
# Remove a model
soup deploy ollama --remove soup-my-modelAuto-detected chat templates: chatml, llama, mistral, vicuna, zephyr (or auto to infer from soup.yaml).
soup export --deploy is for the GGUF family only. --deploy ollama works with gguf, gguf-ud, bitnet and tq1_0 (the last three since v0.76.0; they are described under Quant Menu II and Modality II). For onnx, tensorrt and torchao it fails before any export work, with exit 1 and --deploy is not supported for format '<fmt>', because Ollama cannot load those files. Any target other than ollama is refused as well, also with exit 1.
--registry-id records the export, whatever the format. soup export --registry-id <id> attaches the exported artifacts to a local registry entry; without it Soup tries to match the entry from the source model's output directory. Since v0.76.0 this works for every format (gguf, gguf-ud, bitnet, tq1_0, onnx, tensorrt, torchao, and on v0.76.x also awq and gptq); through v0.75.2 only the plain gguf path recorded anything and the flag was accepted and ignored for the others (#1679). When an export produces a directory (multi-shard safetensors, ONNX data files, TensorRT engine files in <output>/engine/*.engine) every produced weight and engine file is attached, and the success line names them. Registration never decides the exit code: with no matching entry and no --registry-id nothing is recorded and nothing is printed, and a failed attach prints a yellow Could not attach export to registry warning while the command still exits 0, because the export itself succeeded.
Without --registry-id the match works since v0.78.0 (#2726, #2739, by @abdumutalipabay0). Through v0.77.2 the lookup read a column that registry entries do not have and matched nothing, so an export without the flag recorded nothing and printed nothing, as the paragraph above says. Now an entry matches through its run id: the experiment tracker's output directory for that run is compared with --model by realpath. An entry with no run id, or whose run is gone from the tracker, never matches; when several match the most recently registered one wins, and --registry-id overrides the lookup. Only the newest 1000 entries are searched (a ResourceWarning says older ones are missed). A registry or tracker database that cannot be read prints a warning and the export, which has already succeeded, still exits 0. One consequence to know: exports that attached nothing before now add artifact rows (path, SHA-256, size) to the matching entry, an implicit write. Read from the code at the tag (registry/attach.py); not run.
Naming and --list. soup deploy ollama needs both --model and --name and uses the name exactly as you give it. soup export --deploy ollama names the Ollama model soup-<model-name> unless you pass --deploy-name. --list is a filter over ollama list on the soup- name prefix (a name:tag form counts when its name part starts with soup-), so a model deployed with --name my-model exists in Ollama but does not appear in soup deploy ollama --list. --remove <name> has no such filter and removes any Ollama model by name, asking for confirmation unless you pass --yes.
Push to HuggingFace Hub
soup push --model ./output --repo your-username/my-model
soup push --model ./output --repo your-username/my-model --privateAuto-generates a model card with training details.
Soup is free and Apache-2.0. If it saved you a training run, starring the repo costs nothing and helps most. You can also fund the GPU time behind the work a 4 GB laptop cannot reach.