Skip to content
Publishing adapters to Hugging Face

Publishing adapters to Hugging Face

Upload a trained adapter and a model card to your own Hugging Face repository, private by default.

You can upload a training run's adapter to a model repository on your organization's Hugging Face account. Anyone who can read the repository can then load the adapter with PEFT on the same base model, in any tool.

Only the adapter and a short model card are uploaded. Nothing about your dataset leaves Tensorant: no dataset name, no examples, no scores.

To serve the adapter to your applications through Tensorant instead, publish it as a model.

A decision project's run publishes its whole model the same way, from Use this model: the weights, the tokenizer files and kev_config.json without its calibration record, and a card that shows how to load it with kev. Its card names no dataset and carries no scores either. See Publish to Hugging Face.

Before you start

  • A run with a verified adapter, showing Adapter ready or Completed. See Training runs. Trial runs can't be published.
  • A Hugging Face token with write access, added by an owner under Hugging Face in Connections. It must be allowed to write to the account or Hugging Face organization you publish to. A read-only token, enough for everything else, is refused here.
  • The member or owner role. Viewers don't see Publish to Hugging Face. See roles.

Publish an adapter

  1. Open the run in Runs, or its experiment, and choose Use this adapter, then Publish to Hugging Face.
  2. Enter the Repository as owner/name. It suggests your token's account and the base model's name with -lora, for example acme/Qwen3-4B-Instruct-2507-lora.
  3. Keep Private repository ticked for a private repository, or untick it for a public one.
  4. Choose Publish.

The upload runs in the background as Publish run to Hugging Face: follow it in Activity. When it completes, a notice says "Adapter published to Hugging Face" with Open on Hugging Face, and Use this adapter on the run offers Open repository.

Before uploading, Tensorant checks that the adapter on your network volume is still the one the run verified. A changed or missing adapter is not published.

What is uploaded

One commit adds:

File What it is
adapter_config.json The adapter's configuration
adapter_model.safetensors The adapter's weights
README.md A model card, only if the repository has none

The model card is tagged lora and peft. It links the base model and the exact revision trained on, lists the method (LoRA or QLoRA), training objective (SFT, DPO or RL), DPO beta for a DPO run, LoRA rank and alpha, epochs, learning rate and context length, and ends with a "Use it" example that loads the adapter with PEFT. An RL run has no epochs, so its card lists its number of RL rounds in their place.

DPO runs publish the same adapter files as SFT runs, including runs trained on image preference pairs. The generated example uses AutoModelForCausalLM for a text model; for a vision model, use the base model's matching vision model class and processor. The upload does not include base weights or a processor, so the base model must remain accessible to whoever loads the adapter. A QLoRA training run still exports an adapter, not a standalone 4-bit model.

The repository

  • Name: owner/name. Each part has up to 96 letters, digits, underscores, dots or hyphens, starts with a letter, digit or underscore, and does not end with a dot or hyphen. --, .. and a trailing .git are not allowed.
  • A new repository is created as a model repository, private if Private repository is ticked.
  • An existing repository keeps its visibility. If it is public and Private repository is ticked, publishing is refused, so you never publish a private adapter to a public repository by mistake. Untick Private repository to publish there on purpose.
  • Publishing again to the same repository adds a new commit.

Limits

Limit Value
Repository name 3 to 200 characters, up to 96 per part
Uploads of one run at a time 1
Attempts Up to 3 when Hugging Face fails. A refused token or repository is not retried.

When something goes wrong

A problem found before the upload shows in the dialog. Otherwise it shows on the upload in Activity.

Message What to do
"Enter a Hugging Face model repository such as your-name/adapter-name." Enter owner/name. See The repository.
"Add your organization's Hugging Face token, with write access, under Connections first." or "Add a Hugging Face token with write access under Hugging Face in Connections, then publish again." An owner adds one in Connections. Open Connections goes there.
"This run has no verified adapter to publish yet." Wait until the run shows Adapter ready.
"The Hugging Face token was refused…" The token was deleted or expired. Create a new one and replace it in Connections.
"This Hugging Face token can only read…" Replace it with a token that has write access.
"This token cannot write to repository…" Choose a repository under the token's account, or give the token write access on Hugging Face.
"repository is a public repository…" Choose another repository, or untick Private repository.
"This adapter is being published to repository…" Wait for that upload to finish in Activity.
"This organization uses Tensorant's connections. Publishing needs your organization's own Hugging Face token." or "Publishing needs your organization's own Hugging Face token…" Your organization uses connections Tensorant provides. Choose Use this adapter, then Download adapter, and upload it yourself.
"The adapter is missing from storage…", "…is not the one this run verified…" or "…is not a valid LoRA adapter…" The adapter file on your volume is gone, changed or unreadable. Train again, or upload a copy you downloaded earlier yourself.
"Storage configuration changed…" Connect the network volume the run was trained on.
"Hugging Face did not accept the adapter (HTTP code)…" Hugging Face had a problem. Try again later.
View-only access: "You have view-only access to this organization. Ask an owner for member access to make changes." You are a viewer. Ask an owner for the member role.

Need a hand? Visit troubleshooting