4 December 2026

AI and agents, every day. Straight to it.

GuidesQuick notes

TRL synchronizes adapters for training across separate Jobs

The recipe syncs TRL LoRA adapters via a bucket to separate training and generation Jobs.

Bia Kanashiro

· 1 min read

Read in Portuguese

You can run training and generation in separate Hugging Face Jobs, distributing LoRA adapters through a shared bucket. The recipe published by Amine Dirhoussi and coauthors on September 10 requires an adapter configuration that vLLM can load directly.

The support lives in TRL’s AsyncGRPOTrainer, available since TRL v1.14. To follow the documented architecture:

  1. Mount the bucket at an identical absolute path in every Job. The trainer writes adapter files; inference servers read them.
  2. Give each adapter version a distinct name. vLLM keys its attention key-value cache by adapter name. Reusing that name can combine generation stages computed with different weights.
  3. Point the trainer at the proxy. It adds authentication and forwards adapter-loading requests to every replica.

The implementation uses /v1/load_lora_adapter. This excerpt of the official example shows the shared mount; the ellipses represent arguments omitted in the source itself:

# every Job gets the same bucket at the same absolute path
hf jobs run ... -v hf://buckets/aminediroHF/asyncgrpo-lora-buckets:/lora ...

This path does not cover every fine-tuning configuration: unsupported settings can trigger a fallback to transferring merged weights. Check for Adapter-only vLLM sync enabled in the log before assuming synchronization is moving only the adapter.

Bia Kanashiro

Guides & prompts.

Read articles by Bia KanashiroEditorial policy
Report an error

Use 10–1,000 characters; a reply email shares this space.

Next in your reading list