Releases

agilerl-arena/v1.53.1: agilerl-arena v1.53.1: Snowflake app skips billing for runs that never trained and gives plain manifest refusals

Released on 2026-11-27 - GitHub - PyPI

Fixes

  • Snowflake app skips billing for runs that never trained and gives plain manifest refusals

    The Snowflake Native App no longer bills a run that ends before its first training step; such a run settles unbilled with usage_items.unbilled_reason. A learn step that fails before its metrics report still counts as training, so that run is billed up to the failure. Job containers keep trainer logs at INFO. submit turns manifest validation failures into one plain line per field (what is wrong and what to change) and refuses algorithm names the app does not train.

Full Changelog: agilerl-arena/v1.53.0...agilerl-arena/v1.53.1

v2.74.1: remove the arena snowflake commands

Released on 2026-11-27 - GitHub - PyPI

Features

  • add arena cluster manifest for GitOps installs of the BYOC agent

    arena cluster manifest --name <cluster> --format argocd|flux prints, or writes with -o, the GitOps manifest Arena serves for a registered cluster: an Argo CD Application, or a Flux HelmRepository and HelmRelease, that install the agent chart at the Arena release's pinned version with the cluster's values, which hold no secrets. Agent ClusterRole changes are printed to stderr. Upgrading a GitOps install is committing the new manifest.

Fixes

  • write BYOC Helm values files readable only by the owner

    arena cluster register and the BYOC agent install write Helm values files that hold the cluster token and the registry pull credential. They are now created with mode 0600, like the cluster token file.

Breaking Changes

  • remove the arena snowflake commands

    The arena snowflake command group is removed from agilerl-arena. The Arena
    Native App on Snowflake Marketplace is now the only way to run Arena inside a
    Snowflake account. The shared modules under agilerl/arena/snowflake/ that the
    app uses stay; the setup, publish and teardown commands, the trainer image copy
    and the driver check, and the code only they used are removed. The wheel no
    longer carries a bundle version stamp. The Snowflake CLI reference page is
    removed from the docs.

Other

  • Snowflake Native App build copies the trainer image from a private registry

    The snowflake-app-build recipe in justfile now copies the trainer image
    from a private registry with an AWS login, and the app README describes the
    new prerequisite.

Full Changelog: v2.74.0...v2.74.1

agilerl-arena/v1.53.0: agilerl-arena v1.53.0: remove the arena snowflake commands

Released on 2026-11-27 - GitHub - PyPI

Features

  • add arena cluster manifest for GitOps installs of the BYOC agent

    arena cluster manifest --name <cluster> --format argocd|flux prints, or writes with -o, the GitOps manifest Arena serves for a registered cluster: an Argo CD Application, or a Flux HelmRepository and HelmRelease, that install the agent chart at the Arena release's pinned version with the cluster's values, which hold no secrets. Agent ClusterRole changes are printed to stderr. Upgrading a GitOps install is committing the new manifest.

Breaking Changes

  • remove the arena snowflake commands

    The arena snowflake command group is removed from agilerl-arena. The Arena
    Native App on Snowflake Marketplace is now the only way to run Arena inside a
    Snowflake account. The shared modules under agilerl/arena/snowflake/ that the
    app uses stay; the setup, publish and teardown commands, the trainer image copy
    and the driver check, and the code only they used are removed. The wheel no
    longer carries a bundle version stamp. The Snowflake CLI reference page is
    removed from the docs.

Other

  • Snowflake Native App build copies the trainer image from a private registry

    The snowflake-app-build recipe in justfile now copies the trainer image
    from a private registry with an AWS login, and the app README describes the
    new prerequisite.

Full Changelog: agilerl-arena/v1.52.1...agilerl-arena/v1.53.0

agilerl-arena/v1.52.1: agilerl-arena v1.52.1: write BYOC Helm values files readable only by the owner

Released on 2026-11-27 - GitHub - PyPI

Fixes

  • write BYOC Helm values files readable only by the owner

    arena cluster register and the BYOC agent install write Helm values files that hold the cluster token and the registry pull credential. They are now created with mode 0600, like the cluster token file.

Full Changelog: agilerl-arena/v1.52.0...agilerl-arena/v1.52.1

v2.74.0: default an unset LLM context to 2048 tokens

Released on 2026-11-26 - GitHub - PyPI

Features

  • default an unset LLM context to 2048 tokens

    An LLM manifest that leaves network.max_context_length unset now gets 2048 tokens, or the next allowed length above algorithm.max_output_tokens (twice that when answer_continuation is set) when that is larger, capped at the model's context window, instead of the model's full window. A quoted cap is read the same way validation reads it. Validation warns when the default was used. arena manifest validate and arena experiments submit refuse an org/name Hub id outside the supported model catalog instead of warning. fill_catalog_context_length is renamed fill_default_context_length, and TrainingManifest.context_from_catalog is renamed context_defaulted.

  • run Pulsar standalone as a per-job broker sidecar

    Adds agilerl.arena.broker, the Pulsar standalone helpers (config, memory sizing from the container's cgroup limit, start, health, tenant and namespace creation, stop), and agilerl.arena.job_broker, an entrypoint that runs Pulsar as a sidecar beside a Ray head: web port 8081, all broker state under one data volume, an 8 GiB per-topic backlog quota that holds producers, a ready marker once the broker answers, and recovery or a clean restart after a container restart. The Snowflake broker now uses the shared helpers and behaves as before.

  • estimate SFT and DPO learn-step time per resource tier

    The resource-tier check now reports step_seconds for SFT and DPO runs. It prices one learn step with the existing learn-cost model on the run's training-memory plan: SFT trains one row per sample, and DPO trains chosen and rejected rows and scores both with the reference policy. check_tiers takes optional dataset row-length statistics (RowTokens); when the trainer packs sequences, rows are priced at their real length while each micro-batch's fixed overhead keeps its full-length price. Without them, rows are priced at max_model_len. Rollout runs are unchanged.

  • convert dataset row characters to tokens per model family

    Adds agilerl.arena.memory.resolve.row_chars. row_tokens_from_chars turns an SFT or DPO dataset's mean and mean-square characters per trained row into the RowTokens that check_tiers uses to price a packed learn step. Each Hugging Face model_type has a fitted characters-per-token ratio and chat-template token count (tokens = chars / chars_per_token + template_tokens). The fits were made on public SFT and DPO datasets. Families outside the table use the median fit.

  • add row_tokens to traces snapshot manifests

    SnapshotManifest gains an optional row_tokens field (RowTokens: mean and mean-square tokens per row, a row's length being its last call's prompt plus completion tokens), written by manifest_json and read by read_manifest. Manifests without it still read, with row_tokens set to None. read_manifest reads a whole number where the format holds a float.

Fixes

  • refuse a Snowflake pool change that strands a queued job, and fail a run whose head or workers are gone

    set_pools and arena snowflake pools set leave a pool unchanged when a queued or running service still needs more nodes than the new maximum. A job service waiting for its first node counts: its current instance count is 0, and the nodes it needs are the greatest of its current, target, and minimum instances, and at least one. A finished service does not block the change.

    A GPU cap that is not a multiple of that family's GPUs per node is refused before a pool is created, resized, or dropped.

    status reports failed when the head or worker service is gone and the head has not finished. A missing broker alone stays running.

  • clearer Snowflake refusals and logs for runs that cannot start

    The Snowflake app's submit now refuses, before starting anything, a source alias that is not bound, a GPU family with no pool, and a GPU count the pool cannot run. A run the memory estimator says needs more GPUs, or an engine-plus-teacher bundle wider than one node, is refused with what to ask for instead of starting unchecked. Each message ends with "Nothing was started." The GPU-count message from choose_gpu_family lists the valid counts, and service_logs says when a container has not started yet or has written no logs, instead of raising a raw SQL error.

  • name --reward-file when a submit leaves out the reward file

    arena experiments submit and --dry-run now stop before sending a rollout manifest whose environment.rubric_file_path names a local file without uploading it, and say to pass --reward-file (SDK: reward_file) or use an s3:// URI.

  • correct DPO logged means and add sample spread stats

    DPO logs chosen and rejected reward as means over the pairs in the update. The logged loss is the pair-mean DPO term minus nll_alpha times the mean chosen-token log-probability. A training learn also stores each pair's chosen and rejected rewards as histograms.

    GRPO reports group_reward_std: the mean, across prompt groups, of the population standard deviation of that group's episode returns.

    aggregate_metrics_dict accepts minimized and reduces those metrics to the smallest value on any rank, in the same all-reduce as maximized.

    spread_stats returns the population standard deviation, quartiles, minimum, and maximum of a sample list, keyed <name>_std, <name>_p25, <name>_p50, <name>_p75, <name>_min, and <name>_max.

  • generate --max-tokens, OPD default reference, validate refuses deprecated models

    • arena agent generate takes --max-tokens (default 512) instead of always asking for 100 tokens.
    • Arena's default OPD manifest on a question/answer dataset has the self-distilling teacher read the answer column.
    • arena manifest validate now fails on a deprecated or preview catalog model, as submit does.
  • print server messages in the CLI as sent, not as Rich markup

    The Arena CLI printed server error messages, log notices, stream rows and table cells through Rich markup, so text in square brackets was dropped. For example, "Its columns: [question, answer]" printed as "Its columns: .". That text is now escaped or printed with markup off. JSON output is unchanged.

Documentation

  • README examples use 2 GPUs on GPU_NV_S

    The Snowflake app README's pool and training examples now use GPU_NV_S with 2 GPUs, the smallest request that runs reinforcement learning, instead of 4 GPUs on GPU_NV_M.

Tests

  • skip the transformers config stub on core installs (#711)

Full Changelog: v2.73.0...v2.74.0

agilerl-arena/v1.52.0: agilerl-arena v1.52.0: convert dataset row characters to tokens per model family

Released on 2026-11-26 - GitHub - PyPI

Features

  • convert dataset row characters to tokens per model family

    Adds agilerl.arena.memory.resolve.row_chars. row_tokens_from_chars turns an SFT or DPO dataset's mean and mean-square characters per trained row into the RowTokens that check_tiers uses to price a packed learn step. Each Hugging Face model_type has a fitted characters-per-token ratio and chat-template token count (tokens = chars / chars_per_token + template_tokens). The fits were made on public SFT and DPO datasets. Families outside the table use the median fit.

  • add row_tokens to traces snapshot manifests

    SnapshotManifest gains an optional row_tokens field (RowTokens: mean and mean-square tokens per row, a row's length being its last call's prompt plus completion tokens), written by manifest_json and read by read_manifest. Manifests without it still read, with row_tokens set to None. read_manifest reads a whole number where the format holds a float.

Fixes

  • refuse a Snowflake pool change that strands a queued job, and fail a run whose head or workers are gone

    set_pools and arena snowflake pools set leave a pool unchanged when a queued or running service still needs more nodes than the new maximum. A job service waiting for its first node counts: its current instance count is 0, and the nodes it needs are the greatest of its current, target, and minimum instances, and at least one. A finished service does not block the change.

    A GPU cap that is not a multiple of that family's GPUs per node is refused before a pool is created, resized, or dropped.

    status reports failed when the head or worker service is gone and the head has not finished. A missing broker alone stays running.

  • clearer Snowflake refusals and logs for runs that cannot start

    The Snowflake app's submit now refuses, before starting anything, a source alias that is not bound, a GPU family with no pool, and a GPU count the pool cannot run. A run the memory estimator says needs more GPUs, or an engine-plus-teacher bundle wider than one node, is refused with what to ask for instead of starting unchecked. Each message ends with "Nothing was started." The GPU-count message from choose_gpu_family lists the valid counts, and service_logs says when a container has not started yet or has written no logs, instead of raising a raw SQL error.

  • name --reward-file when a submit leaves out the reward file

    arena experiments submit and --dry-run now stop before sending a rollout manifest whose environment.rubric_file_path names a local file without uploading it, and say to pass --reward-file (SDK: reward_file) or use an s3:// URI.

  • correct DPO logged means and add sample spread stats

    DPO logs chosen and rejected reward as means over the pairs in the update. The logged loss is the pair-mean DPO term minus nll_alpha times the mean chosen-token log-probability. A training learn also stores each pair's chosen and rejected rewards as histograms.

    GRPO reports group_reward_std: the mean, across prompt groups, of the population standard deviation of that group's episode returns.

    aggregate_metrics_dict accepts minimized and reduces those metrics to the smallest value on any rank, in the same all-reduce as maximized.

    spread_stats returns the population standard deviation, quartiles, minimum, and maximum of a sample list, keyed <name>_std, <name>_p25, <name>_p50, <name>_p75, <name>_min, and <name>_max.

  • generate --max-tokens, OPD default reference, validate refuses deprecated models

    • arena agent generate takes --max-tokens (default 512) instead of always asking for 100 tokens.
    • Arena's default OPD manifest on a question/answer dataset has the self-distilling teacher read the answer column.
    • arena manifest validate now fails on a deprecated or preview catalog model, as submit does.
  • print server messages in the CLI as sent, not as Rich markup

    The Arena CLI printed server error messages, log notices, stream rows and table cells through Rich markup, so text in square brackets was dropped. For example, "Its columns: [question, answer]" printed as "Its columns: .". That text is now escaped or printed with markup off. JSON output is unchanged.

Documentation

  • README examples use 2 GPUs on GPU_NV_S

    The Snowflake app README's pool and training examples now use GPU_NV_S with 2 GPUs, the smallest request that runs reinforcement learning, instead of 4 GPUs on GPU_NV_M.

Tests

  • skip the transformers config stub on core installs (#711)

Full Changelog: agilerl-arena/v1.51.0...agilerl-arena/v1.52.0

agilerl-arena/v1.51.0: agilerl-arena v1.51.0: default an unset LLM context to 2048 tokens

Released on 2026-11-26 - GitHub - PyPI

Features

  • default an unset LLM context to 2048 tokens

    An LLM manifest that leaves network.max_context_length unset now gets 2048 tokens, or the next allowed length above algorithm.max_output_tokens (twice that when answer_continuation is set) when that is larger, capped at the model's context window, instead of the model's full window. A quoted cap is read the same way validation reads it. Validation warns when the default was used. arena manifest validate and arena experiments submit refuse an org/name Hub id outside the supported model catalog instead of warning. fill_catalog_context_length is renamed fill_default_context_length, and TrainingManifest.context_from_catalog is renamed context_defaulted.

  • run Pulsar standalone as a per-job broker sidecar

    Adds agilerl.arena.broker, the Pulsar standalone helpers (config, memory sizing from the container's cgroup limit, start, health, tenant and namespace creation, stop), and agilerl.arena.job_broker, an entrypoint that runs Pulsar as a sidecar beside a Ray head: web port 8081, all broker state under one data volume, an 8 GiB per-topic backlog quota that holds producers, a ready marker once the broker answers, and recovery or a clean restart after a container restart. The Snowflake broker now uses the shared helpers and behaves as before.

  • estimate SFT and DPO learn-step time per resource tier

    The resource-tier check now reports step_seconds for SFT and DPO runs. It prices one learn step with the existing learn-cost model on the run's training-memory plan: SFT trains one row per sample, and DPO trains chosen and rejected rows and scores both with the reference policy. check_tiers takes optional dataset row-length statistics (RowTokens); when the trainer packs sequences, rows are priced at their real length while each micro-batch's fixed overhead keeps its full-length price. Without them, rows are priced at max_model_len. Rollout runs are unchanged.

Full Changelog: agilerl-arena/v1.50.0...agilerl-arena/v1.51.0

v2.73.0: offer suggested GPU classes after cluster register

Released on 2026-11-26 - GitHub - PyPI

Features

  • offer suggested GPU classes after cluster register

    After arena cluster register registers a customer cluster, and after arena cluster connect sees the agent's first health report, the CLI lists the GPU resource classes Arena suggests from the cluster's nodes: one per GPU model and GPU count, with its node selector, CPUs, memory and node count. Both commands create them with --yes, or after a prompt in a terminal, and keep going if Arena refuses one. It also warns about classes whose node selector matches no node and says when the agent needs an upgrade to report its nodes. Platform-scope registers and registers that create classes from a cluster spec skip this step, and so does an Arena release without suggestions.

  • run an LLM judge on Amazon Bedrock

    JudgeSpec accepts provider: bedrock with model (a Bedrock model id) and region. A bedrock judge calls Bedrock's Converse API through boto3 with the default AWS credential chain, so it needs no base_url or API key. boto3 joins the cpu-llm extra.

Fixes

  • ship a consumer README in the Snowflake Native App

    The Snowflake Native App package now includes a README for consumers, shown in the installed app. It covers requirements and privileges, setup steps, every stored procedure with its signature and role, the chat function of a served model, built-in rewards, example SQL, billing, data sent to AgileRL and uninstall. Tests check that the README is packaged and names every procedure the app grants.

  • run the Snowflake publish job on the CPU head pool

    The publish job loads the merged checkpoint on CPU, logs it to the Model Registry, and waits while the vLLM service starts. It now runs on the account head pool, which also builds the inference image. The service stays on the GPU pool, so a one-node GPU pool can schedule it.

    PublishSettings.head_pool replaces image_build_pool and names that CPU pool. The job's host memory is checked against the head node. A GPU count above the service pool's node is rejected only when a service is started.

  • size Snowflake runs that set a built-in reward

    The memory estimator no longer fills a placeholder rubric path into a manifest that sets environment.reward, so rollout runs with a built-in reward validate and are sized. Snowflake submit now passes each GPU family's GPU model to the estimator as well as its memory, so it can size the trainer and rollout split. 80 GiB A100 families are named so that split uses the 80GB card's bandwidth. choose_gpu_family passes the family name to its fits callback, and manifest_fits takes the family.

Other

  • Train each reasoning turn of a traces segment as it was sampled

    The traces SFT loader now checks that every trained turn renders the same as when it was sampled, not only that its prompt matches. Templates that drop an earlier turn's reasoning once a later user turn follows (Qwen3, gpt-oss, Gemma 4) now expand such segments to one row per turn, so earlier answers train with their reasoning. Gemma 4 tool-call parsing types bare argument values from the tool schema, so {a:2} parses to the integer 2. Traces snapshot manifests gain excluded.with_images, the number of calls left out because they sent an image; a manifest without it reads as 0. ImageTokens.from_processor raises a ValueError saying the chat template writes nothing for an image part, instead of a bare substring not found.

Full Changelog: v2.72.1...v2.73.0

agilerl-arena/v1.50.0: agilerl-arena v1.50.0: offer suggested GPU classes after cluster register

Released on 2026-11-26 - GitHub - PyPI

Features

  • offer suggested GPU classes after cluster register

    After arena cluster register registers a customer cluster, and after arena cluster connect sees the agent's first health report, the CLI lists the GPU resource classes Arena suggests from the cluster's nodes: one per GPU model and GPU count, with its node selector, CPUs, memory and node count. Both commands create them with --yes, or after a prompt in a terminal, and keep going if Arena refuses one. It also warns about classes whose node selector matches no node and says when the agent needs an upgrade to report its nodes. Platform-scope registers and registers that create classes from a cluster spec skip this step, and so does an Arena release without suggestions.

  • run an LLM judge on Amazon Bedrock

    JudgeSpec accepts provider: bedrock with model (a Bedrock model id) and region. A bedrock judge calls Bedrock's Converse API through boto3 with the default AWS credential chain, so it needs no base_url or API key. boto3 joins the cpu-llm extra.

Fixes

  • ship a consumer README in the Snowflake Native App

    The Snowflake Native App package now includes a README for consumers, shown in the installed app. It covers requirements and privileges, setup steps, every stored procedure with its signature and role, the chat function of a served model, built-in rewards, example SQL, billing, data sent to AgileRL and uninstall. Tests check that the README is packaged and names every procedure the app grants.

  • run the Snowflake publish job on the CPU head pool

    The publish job loads the merged checkpoint on CPU, logs it to the Model Registry, and waits while the vLLM service starts. It now runs on the account head pool, which also builds the inference image. The service stays on the GPU pool, so a one-node GPU pool can schedule it.

    PublishSettings.head_pool replaces image_build_pool and names that CPU pool. The job's host memory is checked against the head node. A GPU count above the service pool's node is rejected only when a service is started.

  • size Snowflake runs that set a built-in reward

    The memory estimator no longer fills a placeholder rubric path into a manifest that sets environment.reward, so rollout runs with a built-in reward validate and are sized. Snowflake submit now passes each GPU family's GPU model to the estimator as well as its memory, so it can size the trainer and rollout split. 80 GiB A100 families are named so that split uses the 80GB card's bandwidth. choose_gpu_family passes the family name to its fits callback, and manifest_fits takes the family.

Other

  • Train each reasoning turn of a traces segment as it was sampled

    The traces SFT loader now checks that every trained turn renders the same as when it was sampled, not only that its prompt matches. Templates that drop an earlier turn's reasoning once a later user turn follows (Qwen3, gpt-oss, Gemma 4) now expand such segments to one row per turn, so earlier answers train with their reasoning. Gemma 4 tool-call parsing types bare argument values from the tool schema, so {a:2} parses to the integer 2. Traces snapshot manifests gain excluded.with_images, the number of calls left out because they sent an image; a manifest without it reads as 0. ImageTokens.from_processor raises a ValueError saying the chat template writes nothing for an image part, instead of a bare substring not found.

Full Changelog: agilerl-arena/v1.49.0...agilerl-arena/v1.50.0

v2.72.1: price LLM decode from expected lengths

Released on 2026-11-26 - GitHub - PyPI

Features

  • price LLM decode from expected lengths

    The memory estimator prices each turn's decode from expected lengths, clamped at the turn's output cap. Without them a single-turn run uses generic defaults: 4,096 tokens per turn when the run reasons, 128 when it does not, and a 256-token prompt, each clamped to what the cap and row leave. The defaults do not scale with context. Multi-turn runs without expected lengths keep their previous defaults.

    ExpectedLengths (prompt_tokens, generated_tokens_per_turn, turns, and optional generated_tokens_per_turn_low / _high) prices the GPU split at those lengths. Tier checks add step_seconds_low and step_seconds_high, which reprice the chosen split at each end of the range and equal step_seconds without one.

    expected_lengths_for_run in agilerl.arena.memory.resolve.lengths picks the thinking-on or thinking-off lengths for a single-turn rollout run.

  • add arena cluster smoke to check that a BYOC cluster can run jobs

    arena cluster smoke --name NAME asks the cluster's agent to install a small training release with its own ServiceAccount, wait until its Ray head is Ready, and remove it. The command waits for the result and prints whether it passed, or the reason it failed. It uses the same --kubeconfig/--context selection and cluster identity check as the other cluster commands. --timeout sets how long to wait.

  • estimate SFT and DPO step time and set the L4 learn speed

    SFT and DPO runs now get a learn-only step time. Each row is max_model_len tokens. Each update epoch is a forward and a backward. A DPO row is a chosen sequence and a rejected sequence, plus one reference pass at every beta, including 0. The time is divided by the training GPUs.

    The L4 peak_speed is 1.7: learn work per peak bf16 FLOP, relative to the A100. Measured Qwen3.5 LoRA SFT steps were 1.82x and 1.29x faster on an A100-40 than on an L4, against a peak ratio of 2.58x. The L40S and RTX 6000 Ada share the L4's compute capability and keep the A100 learn costs. A100 and H100 learn costs are unchanged.

    Step times assume full-length rows, so a shorter dataset is an upper bound. Comparing GPUs uses the ratio of those times.

  • arena cluster preflight and arena cluster connect

    arena cluster preflight checks, without changing anything, that a Kubernetes cluster can run the Arena agent: Kubernetes 1.30 or later, rights to create the agent's cluster-scoped RBAC and admission policies, GPU nodes and their nvidia.com/gpu.product labels, a StorageClass for Ray data, that admission allows the agent's privileged containers, and that no other Arena agent is installed. It prints a pass/warn/fail table, or one JSON document with --json, and exits non-zero when a check fails.

    arena cluster connect --name NAME --context CONTEXT runs those checks and stops on a failure, then registers the cluster, installs the agent, waits for it to connect and send its health report, prints that report and any resource classes Arena suggests, and exits non-zero on a failing health check.

  • fill and check LLM run settings for bundled environments and catalog context

    agilerl-arena fills an unset network.max_context_length with the catalog model's context window and warns that the run is sized for it. AgentWorldModel and VisualWebArena take their run settings from agilerl.arena.models.bundled_envs. An unset bundled context is the larger of the environment default and the minimum, rounded up to a power of 2 from 1024, then capped at the catalog window. A shorter context is rejected. A text-only catalog model is rejected on VisualWebArena.

    verdict() reports batch-size and context-length option errors on every check, not only at submit. submit_errors takes the raw document as well as the validated manifest.

    Manifest fields carry x-arena-visibility in the published schema. auto fields (algorithm.batch_size, training.evo_steps, vllm_config.gpu_memory_utilization) are left out of templates and accepted when set. When the catalog sets rollout_gpu_memory_utilization for the model, that share replaces vllm_config.gpu_memory_utilization, and verdict() warns when the manifest set a different share. A non-mapping algorithm, network, or replay_buffer section is a validation error. advanced hosting fields are left out of templates and accepted. A value Arena would not choose is a warning, except fields also marked x-arena-platform-written (env_hosts, env_port, cpus_per_env_host, env_host_memory_bytes), which are not warned about. hidden fields are left out of templates. pop_size, hpo, rollout_version_stamp, and LoRA task_type are refused at submit when set to a value Arena would not choose. mutation, tournament_selection, and LoRA target_parameters are marked x-arena-platform-written and stay accepted. A mutation that changes the run is still rejected as HPO.

    default_verdict(..., user_view=True) and arena manifest template return the template without the marked fields. LLM payloads no longer include a no-op mutation, or a tournament_selection when pop_size is 1. The published schema no longer includes a default for algorithm.max_model_len. The network context replaces it.

    SFT default manifests no longer include beta or answer_continuation. A caller can still set beta, and it has to be between 0 and 1. The serialized manifest omits it. DPO default manifests no longer include answer_continuation. beta stays. GRPO and other rollout algorithms still include answer_continuation.

    default_verdict requires network.pretrained_model_name_or_path to name a supported model, a local path (a value starting with ., /, or ~), or a checkout whose directory contains config.json. Any other string fails with one error, Arena does not support the model '<id>'. Omitting the id still reports the required-field errors.

Fixes

  • train SFT turns the chat template rewrites, including inline think blocks

    SFT finds each assistant turn in one tokenization of the chat template render, instead of planting sentinels in the message text. A template that rewrites a turn, including an inline think block, still trains the tokens it renders.

    The turn stops at the template's end-of-turn token, so the next message's opener is not trained as assistant text. A split with no trainable row raises NoValidSamplesError when the rows are invalid, or NoFittingSamplesError when every row is longer than the context limit.

  • cluster register works before BYOC is enabled

    arena cluster register no longer fails with a 404 for an organization that has not enabled BYOC yet. The cluster UID check and the lookup of stored Nebius project ids now treat that 404 as nothing registered yet. Other errors still stop the command.

Documentation

  • L4 and A100 GPUs train GRPO on Arena

    The GSM8K GRPO tutorial and the Arena guide no longer say L4 and A100 GPUs are unavailable for LLM training. The tutorial tells readers to run arena resources list --algorithm GRPO to see the GPU types and counts a GRPO run takes, and shows a memory estimate and submit for Qwen3.5-0.8B on two L4 GPUs. The Arena guide's example resources table matches the current CLI output, including the --num-gpus column.

Full Changelog: v2.72.0...v2.72.1

agilerl-arena/v1.49.0: agilerl-arena v1.49.0: price LLM decode from expected lengths

Released on 2026-11-26 - GitHub - PyPI

Features

  • price LLM decode from expected lengths

    The memory estimator prices each turn's decode from expected lengths, clamped at the turn's output cap. Without them a single-turn run uses generic defaults: 4,096 tokens per turn when the run reasons, 128 when it does not, and a 256-token prompt, each clamped to what the cap and row leave. The defaults do not scale with context. Multi-turn runs without expected lengths keep their previous defaults.

    ExpectedLengths (prompt_tokens, generated_tokens_per_turn, turns, and optional generated_tokens_per_turn_low / _high) prices the GPU split at those lengths. Tier checks add step_seconds_low and step_seconds_high, which reprice the chosen split at each end of the range and equal step_seconds without one.

    expected_lengths_for_run in agilerl.arena.memory.resolve.lengths picks the thinking-on or thinking-off lengths for a single-turn rollout run.

  • add arena cluster smoke to check that a BYOC cluster can run jobs

    arena cluster smoke --name NAME asks the cluster's agent to install a small training release with its own ServiceAccount, wait until its Ray head is Ready, and remove it. The command waits for the result and prints whether it passed, or the reason it failed. It uses the same --kubeconfig/--context selection and cluster identity check as the other cluster commands. --timeout sets how long to wait.

  • estimate SFT and DPO step time and set the L4 learn speed

    SFT and DPO runs now get a learn-only step time. Each row is max_model_len tokens. Each update epoch is a forward and a backward. A DPO row is a chosen sequence and a rejected sequence, plus one reference pass at every beta, including 0. The time is divided by the training GPUs.

    The L4 peak_speed is 1.7: learn work per peak bf16 FLOP, relative to the A100. Measured Qwen3.5 LoRA SFT steps were 1.82x and 1.29x faster on an A100-40 than on an L4, against a peak ratio of 2.58x. The L40S and RTX 6000 Ada share the L4's compute capability and keep the A100 learn costs. A100 and H100 learn costs are unchanged.

    Step times assume full-length rows, so a shorter dataset is an upper bound. Comparing GPUs uses the ratio of those times.

  • arena cluster preflight and arena cluster connect

    arena cluster preflight checks, without changing anything, that a Kubernetes cluster can run the Arena agent: Kubernetes 1.30 or later, rights to create the agent's cluster-scoped RBAC and admission policies, GPU nodes and their nvidia.com/gpu.product labels, a StorageClass for Ray data, that admission allows the agent's privileged containers, and that no other Arena agent is installed. It prints a pass/warn/fail table, or one JSON document with --json, and exits non-zero when a check fails.

    arena cluster connect --name NAME --context CONTEXT runs those checks and stops on a failure, then registers the cluster, installs the agent, waits for it to connect and send its health report, prints that report and any resource classes Arena suggests, and exits non-zero on a failing health check.

  • fill and check LLM run settings for bundled environments and catalog context

    agilerl-arena fills an unset network.max_context_length with the catalog model's context window and warns that the run is sized for it. AgentWorldModel and VisualWebArena take their run settings from agilerl.arena.models.bundled_envs. An unset bundled context is the larger of the environment default and the minimum, rounded up to a power of 2 from 1024, then capped at the catalog window. A shorter context is rejected. A text-only catalog model is rejected on VisualWebArena.

    verdict() reports batch-size and context-length option errors on every check, not only at submit. submit_errors takes the raw document as well as the validated manifest.

    Manifest fields carry x-arena-visibility in the published schema. auto fields (algorithm.batch_size, training.evo_steps, vllm_config.gpu_memory_utilization) are left out of templates and accepted when set. When the catalog sets rollout_gpu_memory_utilization for the model, that share replaces vllm_config.gpu_memory_utilization, and verdict() warns when the manifest set a different share. A non-mapping algorithm, network, or replay_buffer section is a validation error. advanced hosting fields are left out of templates and accepted. A value Arena would not choose is a warning, except fields also marked x-arena-platform-written (env_hosts, env_port, cpus_per_env_host, env_host_memory_bytes), which are not warned about. hidden fields are left out of templates. pop_size, hpo, rollout_version_stamp, and LoRA task_type are refused at submit when set to a value Arena would not choose. mutation, tournament_selection, and LoRA target_parameters are marked x-arena-platform-written and stay accepted. A mutation that changes the run is still rejected as HPO.

    default_verdict(..., user_view=True) and arena manifest template return the template without the marked fields. LLM payloads no longer include a no-op mutation, or a tournament_selection when pop_size is 1. The published schema no longer includes a default for algorithm.max_model_len. The network context replaces it.

    SFT default manifests no longer include beta or answer_continuation. A caller can still set beta, and it has to be between 0 and 1. The serialized manifest omits it. DPO default manifests no longer include answer_continuation. beta stays. GRPO and other rollout algorithms still include answer_continuation.

    default_verdict requires network.pretrained_model_name_or_path to name a supported model, a local path (a value starting with ., /, or ~), or a checkout whose directory contains config.json. Any other string fails with one error, Arena does not support the model '<id>'. Omitting the id still reports the required-field errors.

Fixes

  • train SFT turns the chat template rewrites, including inline think blocks

    SFT finds each assistant turn in one tokenization of the chat template render, instead of planting sentinels in the message text. A template that rewrites a turn, including an inline think block, still trains the tokens it renders.

    The turn stops at the template's end-of-turn token, so the next message's opener is not trained as assistant text. A split with no trainable row raises NoValidSamplesError when the rows are invalid, or NoFittingSamplesError when every row is longer than the context limit.

  • cluster register works before BYOC is enabled

    arena cluster register no longer fails with a 404 for an organization that has not enabled BYOC yet. The cluster UID check and the lookup of stored Nebius project ids now treat that 404 as nothing registered yet. Other errors still stop the command.

Documentation

  • L4 and A100 GPUs train GRPO on Arena

    The GSM8K GRPO tutorial and the Arena guide no longer say L4 and A100 GPUs are unavailable for LLM training. The tutorial tells readers to run arena resources list --algorithm GRPO to see the GPU types and counts a GRPO run takes, and shows a memory estimate and submit for Qwen3.5-0.8B on two L4 GPUs. The Arena guide's example resources table matches the current CLI output, including the --num-gpus column.

Full Changelog: agilerl-arena/v1.48.0...agilerl-arena/v1.49.0

v2.72.0: keep the agent token when re-registering a BYOC cluster

Released on 2026-11-25 - GitHub - PyPI

Features

  • show dataset row counts in arena datasets list

    arena datasets list adds a rows column from the training_row_count field of the dataset list response. Servers that do not send the field leave the cell empty. --json output includes training_row_count unchanged.

  • name the cluster on BYOC class update and delete

    ByocApi.update_class, replace_class_availabilities and delete_class take optional cluster and cluster_id to pick a resource class when the same class name exists on more than one cluster. delete_class with a cluster no longer stops when two classes share the name. arena cluster register and register-classes update classes on the cluster being registered, and create the class there when another cluster owns the listed one. Calls without a cluster are unchanged.

  • show agent ClusterRole changes before arena cluster upgrade

    When Arena reports that an agent upgrade changes the agent's ClusterRoles, arena cluster upgrade prints the verbs and resources each ClusterRole gains and loses and asks before applying anything. --yes applies without asking; without a terminal the command stops and asks for --yes. Upgrades that do not change ClusterRoles, and Arena versions that do not report the change, run as before.

  • arena cluster unregister lets the agent clean up first

    arena cluster unregister takes --stop-runs to stop the cluster's experiments and deployments first, and --force to remove a cluster whose agent is offline. While Arena reports the cluster as Deregistering, the CLI waits (--wait-timeout, default 600 s) for the agent to delete its job namespaces, then uninstalls the agent release. The agent prompt defaults to yes; --keep-agent leaves it installed. When the agent did not clean up, the CLI prints a command that removes what it left. helm uninstall waits up to ten minutes for the agent's uninstall hook. arena cluster destroy unregisters with --force.

  • built-in rewards picked in the manifest

    Rollout manifests can set environment.reward instead of a rubric file: exact_match, numeric, regex, json_schema or tool_call. Each scores the turn's final answer (the text after any reasoning) against the row's answer column and gives 1 or 0. numeric reads the last \boxed{...} or the last number, answer_pattern picks the answer out of a longer reply, and tool_call checks a {"name", "arguments"} call. The jsonschema package joins the cpu-llm extra for json_schema.

    The AgileRL Snowflake Native App no longer takes a reward file. It runs the built-in rewards, or type: snowflake_function, which calls a function the buyer binds to the app's reward_function reference.

  • pick the cluster explicitly for BYOC cluster commands and check its identity

    arena cluster register --install, rotate-token, upgrade and unregister take --kubeconfig and --context. Without either, the CLI shows the current context and API server and asks before using it, and in a non-interactive shell it asks for --context instead. All kubectl and Helm calls in a command use that one context.

    The CLI reads the UID of the cluster's kube-system namespace, sends it to Arena when it registers or rotates a token, and checks it against Arena's record before upgrading or uninstalling, so a command pointed at the wrong cluster stops before it changes anything.

Fixes

  • show a missing dataset value as an empty cell

    arena datasets list printed None when a field was null, including hf_dataset_id on an uploaded dataset. The table now leaves null cells empty. --json still returns null.

  • accept a name-only built-in rollout environment

    LLMEnvSpec accepts a rollout named AgentWorldModel or VisualWebArena with no dataset, entrypoint, env_url, or env_image. A name-only built-in submits only the environment fields the manifest sets, and leaves num_envs and strict_chat_template_boundary unset. Any other rollout still needs exactly one source. A built-in that sets a source still needs exactly one, and still receives those defaults.

Breaking Changes

  • keep the agent token when re-registering a BYOC cluster

    arena cluster register on a cluster name that already exists now keeps the cluster's agent token instead of rotating it. Pass --rotate-token to issue a new token; the previous token keeps working for 24 hours. After an update the CLI says whether the token was kept, rotated or issued.

    With --install and a kept token, the CLI leaves the agent's token Secret alone, and stops with a pointer to --rotate-token when the agent namespace has no token Secret yet. arena cluster provision --register-and-install always issues a new token, since the cluster it just provisioned holds none.

    BREAKING CHANGE: re-running arena cluster register no longer rotates the agent token. Use --rotate-token to rotate.

Full Changelog: v2.71.0...v2.72.0

agilerl-arena/v1.48.0: agilerl-arena v1.48.0: keep the agent token when re-registering a BYOC cluster

Released on 2026-11-25 - GitHub - PyPI

Features

  • name the cluster on BYOC class update and delete

    ByocApi.update_class, replace_class_availabilities and delete_class take optional cluster and cluster_id to pick a resource class when the same class name exists on more than one cluster. delete_class with a cluster no longer stops when two classes share the name. arena cluster register and register-classes update classes on the cluster being registered, and create the class there when another cluster owns the listed one. Calls without a cluster are unchanged.

  • show agent ClusterRole changes before arena cluster upgrade

    When Arena reports that an agent upgrade changes the agent's ClusterRoles, arena cluster upgrade prints the verbs and resources each ClusterRole gains and loses and asks before applying anything. --yes applies without asking; without a terminal the command stops and asks for --yes. Upgrades that do not change ClusterRoles, and Arena versions that do not report the change, run as before.

  • arena cluster unregister lets the agent clean up first

    arena cluster unregister takes --stop-runs to stop the cluster's experiments and deployments first, and --force to remove a cluster whose agent is offline. While Arena reports the cluster as Deregistering, the CLI waits (--wait-timeout, default 600 s) for the agent to delete its job namespaces, then uninstalls the agent release. The agent prompt defaults to yes; --keep-agent leaves it installed. When the agent did not clean up, the CLI prints a command that removes what it left. helm uninstall waits up to ten minutes for the agent's uninstall hook. arena cluster destroy unregisters with --force.

  • built-in rewards picked in the manifest

    Rollout manifests can set environment.reward instead of a rubric file: exact_match, numeric, regex, json_schema or tool_call. Each scores the turn's final answer (the text after any reasoning) against the row's answer column and gives 1 or 0. numeric reads the last \boxed{...} or the last number, answer_pattern picks the answer out of a longer reply, and tool_call checks a {"name", "arguments"} call. The jsonschema package joins the cpu-llm extra for json_schema.

    The AgileRL Snowflake Native App no longer takes a reward file. It runs the built-in rewards, or type: snowflake_function, which calls a function the buyer binds to the app's reward_function reference.

  • pick the cluster explicitly for BYOC cluster commands and check its identity

    arena cluster register --install, rotate-token, upgrade and unregister take --kubeconfig and --context. Without either, the CLI shows the current context and API server and asks before using it, and in a non-interactive shell it asks for --context instead. All kubectl and Helm calls in a command use that one context.

    The CLI reads the UID of the cluster's kube-system namespace, sends it to Arena when it registers or rotates a token, and checks it against Arena's record before upgrading or uninstalling, so a command pointed at the wrong cluster stops before it changes anything.

Fixes

  • show a missing dataset value as an empty cell

    arena datasets list printed None when a field was null, including hf_dataset_id on an uploaded dataset. The table now leaves null cells empty. --json still returns null.

  • accept a name-only built-in rollout environment

    LLMEnvSpec accepts a rollout named AgentWorldModel or VisualWebArena with no dataset, entrypoint, env_url, or env_image. A name-only built-in submits only the environment fields the manifest sets, and leaves num_envs and strict_chat_template_boundary unset. Any other rollout still needs exactly one source. A built-in that sets a source still needs exactly one, and still receives those defaults.

Breaking Changes

  • keep the agent token when re-registering a BYOC cluster

    arena cluster register on a cluster name that already exists now keeps the cluster's agent token instead of rotating it. Pass --rotate-token to issue a new token; the previous token keeps working for 24 hours. After an update the CLI says whether the token was kept, rotated or issued.

    With --install and a kept token, the CLI leaves the agent's token Secret alone, and stops with a pointer to --rotate-token when the agent namespace has no token Secret yet. arena cluster provision --register-and-install always issues a new token, since the cluster it just provisioned holds none.

    BREAKING CHANGE: re-running arena cluster register no longer rotates the agent token. Use --rotate-token to rotate.

Full Changelog: agilerl-arena/v1.47.0...agilerl-arena/v1.48.0

agilerl-arena/v1.47.0: agilerl-arena v1.47.0: show dataset row counts in `arena datasets list`

Released on 2026-11-25 - GitHub - PyPI

Features

  • show dataset row counts in arena datasets list

    arena datasets list adds a rows column from the training_row_count field of the dataset list response. Servers that do not send the field leave the cell empty. --json output includes training_row_count unchanged.

Full Changelog: agilerl-arena/v1.46.0...agilerl-arena/v1.47.0

v2.71.0: RolloutHarness accepts max_turns=None for no turn cap

Released on 2026-11-25 - GitHub - PyPI

Features

  • RolloutHarness accepts max_turns=None for no turn cap

    RolloutHarness(max_turns=None) puts no cap on turns: the episode ends when the env terminates or truncates, or when the next prompt no longer fits max_model_len, which must then be set. It cannot be combined with segment_prompt_tokens or segment_max_images. In agilerl-arena, an unset environment.max_turns now means no cap (it was described as probed); it is still required with env_url, and now also with a context-restart setting.

  • load finetuning weights from a separate directory

    A training manifest can set network.weights_path to a local directory or an s3:// prefix. pretrained_model_name_or_path stays the catalog model id that sizes and configures the run. Validation lifts weights_path onto the LLM algorithm. load_path is that directory when it is set, and the model id otherwise. The saved payload keeps weights_path on the network only. Setting weights_path on both the network and the algorithm with different values is an error. A distillation teacher model has the same field. Manifests that omit weights_path still load from the model id.

  • --platform flag for BYOC cluster commands

    arena cluster unregister, rotate-token and upgrade take --platform to manage AgileRL's own platform clusters, which needs AgileRL staff access. Register, register-classes and destroy send the same scope when --byoc-scope platform or the spec's byoc_scope says so. Re-registering a platform cluster with --install keeps the agent's existing token Secret when Arena returns no new token. A refused platform call now says "Only AgileRL staff can manage platform clusters." Behaviour without the flag is unchanged.

  • show the quote's startup time and cost

    arena experiments submit and arena experiments resume print a startup line when the quote includes startup_minutes. The line shows the rounded minutes and startup_cost before the estimated total. --dry-run prints the same lines. A quote with no startup_minutes keeps the hardware, hourly rate, and estimated total lines.

Fixes

  • reward functions always get the whole turn as completion

    A reward function wrapped with reward_fn_to_rubric now always receives the whole generated turn as completion, reasoning and its end marker included, whatever include_reasoning is set to. Before, an env rollout or include_reasoning: false passed only the text after the reasoning.

    prompt_template keys numbered role_index (system_0, user_1, assistant_2) now order the conversation by that index. Numbering only some keys, or repeating an index, raises a ValueError.

    New docs page "Prompts and reward inputs" states how prompt_template is rendered and exactly what the reward function receives, with Qwen3.5 and Qwen2.5 examples.

  • stale default project, checkpoints --project, submit --dry-run, clearer network errors

    • Experiment commands addressed by name (status, logs, checkpoints, metrics, stop) send only the project you pass; the saved default project is used only when the name exists in more than one project.
    • arena experiments checkpoints takes --project.
    • arena experiments submit --dry-run prints the hardware and estimated price and submits nothing.
    • submit and resume no longer skip the price prompt when stdin is not a terminal; pass --yes to submit from a script.
    • A network section with pretrained_model_name_or_path reports only finetuning-spec errors.
  • charge one gathered EP expert layer under expert LoRA without reshard

    The Arena memory estimator now charges a single gathered expert-parallel MoE layer, not every MoE layer, when expert LoRA is on and reshard_after_forward=False. Under the PEFT wrapper each layer's experts are resharded right after use, so the old estimate over-predicted peak memory (69.4 GiB predicted vs 40.9 GiB measured for a 30B-A3B DPO run on 4x A100-80). fsdp_gathered_params gains an expert_lora argument that defaults to the previous behaviour, and ep_gathered_expert_layer_params is a new helper.

  • LoRA modules from the model catalog, reward checks before pricing, env hosting defaults

    • Manifests no longer name LoRA modules. lora_config.target_modules is ignored with a warning; training, vLLM serving and memory sizing use the model catalog's modules for pretrained_model_name_or_path. A model outside the catalog fails with a clear error. Use a catalog id, plus weights_path for other weights; local training now loads weights and tokenizer from weights_path when set.
    • arena experiments submit runs the reward file locally before pricing the run and stops on a syntax error, an undefined name, a missing reward function or a reward with no numeric value, naming the file and line.
    • arena env validate exits 1 when validation checks fail.
    • LLM manifests with training.num_epochs get one consistent message.
    • A dataset rollout's prompt_template may only use {question} and {answer}.
    • An LLM rollout env with an entrypoint that sets cpus_per_env_host, env_host_memory_bytes or env_host_resource defaults to one env host.
  • clearer resume output and max_steps help; target_modules warning once

    arena experiments resume --max-steps is the total number of training steps counted from the start of the original run, and it must be greater than the checkpoint's step. ArenaClient.resume_experiment uses the same meaning for max_steps, and quote_resume prices the steps left between the checkpoint and max_steps.

    arena experiments resume prints one line naming the run being resumed instead of an empty table. --json prints the server's response.

    A manifest that sets lora_config.target_modules gets the "is ignored" warning once: arena manifest validate prints it as a warning line, and validating with TrainingManifest.get_validated logs it once per process.

Documentation

  • list resources for the run's algorithm

    • arena resources list --algorithm and ArenaClient.list_resources(algorithm=...) now document that Arena lists only the GPU counts that algorithm trains on. A GRPO-family run needs at least two GPUs.
    • The README and the Arena docs list resources with --algorithm GRPO.

Full Changelog: v2.70.0...v2.71.0

agilerl-arena/v1.46.0: agilerl-arena v1.46.0: RolloutHarness accepts max_turns=None for no turn cap

Released on 2026-11-25 - GitHub - PyPI

Features

  • RolloutHarness accepts max_turns=None for no turn cap

    RolloutHarness(max_turns=None) puts no cap on turns: the episode ends when the env terminates or truncates, or when the next prompt no longer fits max_model_len, which must then be set. It cannot be combined with segment_prompt_tokens or segment_max_images. In agilerl-arena, an unset environment.max_turns now means no cap (it was described as probed); it is still required with env_url, and now also with a context-restart setting.

  • load finetuning weights from a separate directory

    A training manifest can set network.weights_path to a local directory or an s3:// prefix. pretrained_model_name_or_path stays the catalog model id that sizes and configures the run. Validation lifts weights_path onto the LLM algorithm. load_path is that directory when it is set, and the model id otherwise. The saved payload keeps weights_path on the network only. Setting weights_path on both the network and the algorithm with different values is an error. A distillation teacher model has the same field. Manifests that omit weights_path still load from the model id.

  • --platform flag for BYOC cluster commands

    arena cluster unregister, rotate-token and upgrade take --platform to manage AgileRL's own platform clusters, which needs AgileRL staff access. Register, register-classes and destroy send the same scope when --byoc-scope platform or the spec's byoc_scope says so. Re-registering a platform cluster with --install keeps the agent's existing token Secret when Arena returns no new token. A refused platform call now says "Only AgileRL staff can manage platform clusters." Behaviour without the flag is unchanged.

  • show the quote's startup time and cost

    arena experiments submit and arena experiments resume print a startup line when the quote includes startup_minutes. The line shows the rounded minutes and startup_cost before the estimated total. --dry-run prints the same lines. A quote with no startup_minutes keeps the hardware, hourly rate, and estimated total lines.

Fixes

  • reward functions always get the whole turn as completion

    A reward function wrapped with reward_fn_to_rubric now always receives the whole generated turn as completion, reasoning and its end marker included, whatever include_reasoning is set to. Before, an env rollout or include_reasoning: false passed only the text after the reasoning.

    prompt_template keys numbered role_index (system_0, user_1, assistant_2) now order the conversation by that index. Numbering only some keys, or repeating an index, raises a ValueError.

    New docs page "Prompts and reward inputs" states how prompt_template is rendered and exactly what the reward function receives, with Qwen3.5 and Qwen2.5 examples.

  • stale default project, checkpoints --project, submit --dry-run, clearer network errors

    • Experiment commands addressed by name (status, logs, checkpoints, metrics, stop) send only the project you pass; the saved default project is used only when the name exists in more than one project.
    • arena experiments checkpoints takes --project.
    • arena experiments submit --dry-run prints the hardware and estimated price and submits nothing.
    • submit and resume no longer skip the price prompt when stdin is not a terminal; pass --yes to submit from a script.
    • A network section with pretrained_model_name_or_path reports only finetuning-spec errors.
  • charge one gathered EP expert layer under expert LoRA without reshard

    The Arena memory estimator now charges a single gathered expert-parallel MoE layer, not every MoE layer, when expert LoRA is on and reshard_after_forward=False. Under the PEFT wrapper each layer's experts are resharded right after use, so the old estimate over-predicted peak memory (69.4 GiB predicted vs 40.9 GiB measured for a 30B-A3B DPO run on 4x A100-80). fsdp_gathered_params gains an expert_lora argument that defaults to the previous behaviour, and ep_gathered_expert_layer_params is a new helper.

  • LoRA modules from the model catalog, reward checks before pricing, env hosting defaults

    • Manifests no longer name LoRA modules. lora_config.target_modules is ignored with a warning; training, vLLM serving and memory sizing use the model catalog's modules for pretrained_model_name_or_path. A model outside the catalog fails with a clear error. Use a catalog id, plus weights_path for other weights; local training now loads weights and tokenizer from weights_path when set.
    • arena experiments submit runs the reward file locally before pricing the run and stops on a syntax error, an undefined name, a missing reward function or a reward with no numeric value, naming the file and line.
    • arena env validate exits 1 when validation checks fail.
    • LLM manifests with training.num_epochs get one consistent message.
    • A dataset rollout's prompt_template may only use {question} and {answer}.
    • An LLM rollout env with an entrypoint that sets cpus_per_env_host, env_host_memory_bytes or env_host_resource defaults to one env host.
  • clearer resume output and max_steps help; target_modules warning once

    arena experiments resume --max-steps is the total number of training steps counted from the start of the original run, and it must be greater than the checkpoint's step. ArenaClient.resume_experiment uses the same meaning for max_steps, and quote_resume prices the steps left between the checkpoint and max_steps.

    arena experiments resume prints one line naming the run being resumed instead of an empty table. --json prints the server's response.

    A manifest that sets lora_config.target_modules gets the "is ignored" warning once: arena manifest validate prints it as a warning line, and validating with TrainingManifest.get_validated logs it once per process.

Documentation

  • list resources for the run's algorithm

    • arena resources list --algorithm and ArenaClient.list_resources(algorithm=...) now document that Arena lists only the GPU counts that algorithm trains on. A GRPO-family run needs at least two GPUs.
    • The README and the Arena docs list resources with --algorithm GRPO.

Full Changelog: agilerl-arena/v1.45.0...agilerl-arena/v1.46.0

v2.70.0: size LLM runs in steps, not epochs

Released on 2026-11-24 - GitHub - PyPI

Features

  • size LLM runs in steps, not epochs

    The manifest model rejects training.num_epochs and training.evo_epochs for LLM algorithms; set training.max_steps and training.evo_steps instead. Left unset on a run over dataset rows, max_steps trains one pass over the dataset. The manifest JSON schema drops its LLM num_epochs defaults, and the example LLM configs drop num_epochs: 1. LocalTrainer passes max_steps=None when that field was not set, so a local dataset run trains one pass instead of the million-step default.

  • HSDP dense shard groups under one wider expert-parallel group

    The trainer mesh now accepts an expert-parallel degree that is a multiple of
    shard_group_size. Dense weights FSDP-shard inside each shard group and
    replicate across groups, while each expert group spans whole shard groups and
    holds every expert once per ep ranks. This keeps dense-weight gathers on one
    node when the expert group crosses nodes.

    FSDPConfig accepts the new layouts. The agilerl-arena memory planner
    searches them, trying a wide expert group with one shard group per node first.
    The estimator also prices NCCL all-to-all buffers on L4 for an expert group
    across nodes at a measured 2560 MiB per rank.

  • stochastic-round fp32 LoRA masters to bf16

    Each optimizer step draws one bf16 rounding of the fp32 adapter weights, and every training forward reuses it until the next step. The frozen base stays bf16. Each learn activates the rounding for its own agent. On CUDA the rounding is a single Triton kernel.

Fixes

  • size manifests that leave the rubric to --reward-file

    arena memory estimate and arena memory solve size a dataset-backed rollout manifest that omits environment.rubric_file_path, as arena experiments submit --reward-file does. The rubric does not affect memory, so an unset path is filled with a placeholder and the manifest is sized as written; a manifest that names its rubric is unchanged. A manifest whose top level is not a mapping is reported as a usage error. The reward-file helper is now public as agilerl.arena.client.with_reward_file_path.

    The GSM8K GRPO tutorial notes that Arena accepts an algorithm.batch_size that is a power of 2 from 1 to 1024.

Other

  • keep no repository secrets in Actions

    Tests that read chat templates download ungated checkpoints only, so they run without a Hugging Face token on every platform and on forks instead of skipping. Codecov uploads once per nightly run using OIDC instead of a stored token. The read-only release role ARN is a repository variable. The hub import workflow is removed; imports are picked up on a schedule.

Full Changelog: v2.69.0...v2.70.0

agilerl-arena/v1.45.0: agilerl-arena v1.45.0: size LLM runs in steps, not epochs

Released on 2026-11-24 - GitHub - PyPI

Features

  • size LLM runs in steps, not epochs

    The manifest model rejects training.num_epochs and training.evo_epochs for LLM algorithms; set training.max_steps and training.evo_steps instead. Left unset on a run over dataset rows, max_steps trains one pass over the dataset. The manifest JSON schema drops its LLM num_epochs defaults, and the example LLM configs drop num_epochs: 1. LocalTrainer passes max_steps=None when that field was not set, so a local dataset run trains one pass instead of the million-step default.

  • HSDP dense shard groups under one wider expert-parallel group

    The trainer mesh now accepts an expert-parallel degree that is a multiple of
    shard_group_size. Dense weights FSDP-shard inside each shard group and
    replicate across groups, while each expert group spans whole shard groups and
    holds every expert once per ep ranks. This keeps dense-weight gathers on one
    node when the expert group crosses nodes.

    FSDPConfig accepts the new layouts. The agilerl-arena memory planner
    searches them, trying a wide expert group with one shard group per node first.
    The estimator also prices NCCL all-to-all buffers on L4 for an expert group
    across nodes at a measured 2560 MiB per rank.

  • stochastic-round fp32 LoRA masters to bf16

    Each optimizer step draws one bf16 rounding of the fp32 adapter weights, and every training forward reuses it until the next step. The frozen base stays bf16. Each learn activates the rounding for its own agent. On CUDA the rounding is a single Triton kernel.

Fixes

  • size manifests that leave the rubric to --reward-file

    arena memory estimate and arena memory solve size a dataset-backed rollout manifest that omits environment.rubric_file_path, as arena experiments submit --reward-file does. The rubric does not affect memory, so an unset path is filled with a placeholder and the manifest is sized as written; a manifest that names its rubric is unchanged. A manifest whose top level is not a mapping is reported as a usage error. The reward-file helper is now public as agilerl.arena.client.with_reward_file_path.

    The GSM8K GRPO tutorial notes that Arena accepts an algorithm.batch_size that is a power of 2 from 1 to 1024.

Other

  • keep no repository secrets in Actions

    Tests that read chat templates download ungated checkpoints only, so they run without a Hugging Face token on every platform and on forks instead of skipping. Codecov uploads once per nightly run using OIDC instead of a stored token. The read-only release role ARN is a repository variable. The hub import workflow is removed; imports are picked up on a schedule.

Full Changelog: agilerl-arena/v1.44.0...agilerl-arena/v1.45.0

v2.69.0: move rollout and offload rules out of the memory package

Released on 2026-11-24 - GitHub - PyPI

Features

  • size an omitted OPD teacher engine and count its GPUs in the split

    An OPD manifest with a separate teacher model can leave that teacher's tensor parallel unset. agilerl-arena picks the narrowest width that serves the teacher's sequences, or the narrowest width that fits the GPU memory budget, leaving room for one trainer and one student engine. The student engine and the teacher together stay within one node's GPUs. The automatic trainer and rollout-engine split counts those teacher GPUs. A teacher-model manifest no longer has to set the student tensor parallel, the trainer GPU count, or the rollout engine count. The memory estimate reports the width as teacher_engine_tensor_parallel. An explicit teacher width is kept.

  • reject HPO manifests in validate and submit

    HPO is no longer available in Arena. arena manifest validate now fails, and ArenaClient.submit_experiment raises ArenaValidationError, when a manifest sets training.hpo: true or a mutation section that changes agents. Remove those settings to submit. agilerl.arena.models.verdict.hpo_fields lists the fields that turn HPO on.

  • drop classic RL from the Arena CLI and client; list GPU types

    Arena no longer offers classic (non-LLM) RL, so the arena CLI and ArenaClient drop it: the --gym-env* options on arena manifest template and the gym_env* arguments of get_default_run_spec, arena env profile / profile_environment, env validate --multi-agent/--classic (environment uploads are always GEM), and classic agent inference (Agent.get_action). arena resources list now prints the GPU types you can train on with the GPUs per node each comes in, instead of resource class ids and prices. arena memory estimate and solve need --gpu (a GPU type from arena resources list) or --device-gb; they no longer pick a resource tier. The classic Arena tutorial and docs are removed.

  • export a trained model to a consumer stage

    The Snowflake Native App gets an export_stage reference (a consumer stage, READ and WRITE) and an app_admin procedure export_model(run_id, step). It copies a run's merged checkpoint, the files publish logs to the Model Registry, to <run_id>/checkpoint_<n>/ on that stage with COPY FILES, so a buyer keeps the model after uninstalling the app. It starts no service, records no billable usage, and still works after an unpurchased trial ends.

  • offer to upgrade and re-run when Arena requires a newer agilerl-arena

    When Arena refuses a command because the installed agilerl-arena is below its minimum (HTTP 426), the arena CLI prints Arena's message and, in an interactive terminal, asks whether to upgrade. On yes it runs pip install -U for agilerl-arena, keeping extras already installed and any extras named in that message, then re-runs the same command once. arena snowflake also installs the snowflake extra and says the trainer image updates on arena snowflake setup. If pip fails, the CLI prints the manual command and exits. A non-interactive CLI does not upgrade unless ARENA_AUTO_UPGRADE=1. Calling the Python client directly still raises the error.

  • add agilerl.utils.user_log for messages meant for the person running training

    Adds agilerl.utils.user_log, with log_for_user(event, message, level, stacklevel, **fields) and format_duration(seconds). log_for_user writes to the agilerl.user logger: messages written for the person running training (progress, results, warnings they can act on), kept apart from debug logging. Each record carries the event type and structured fields as user_event and user_fields attributes, so a handler can forward them elsewhere. With no handler attached they are ordinary log lines.

  • Snowflake Native App connects to Arena with a package-delivered claim

    The Snowflake Native App gets app_code.connect_arena(). The app starts a claim with Arena, reads a one-time code Arena writes to a table shared from the application package (only the install in that account and region can read its row), proves the claim, and returns a signup link. Once the admin has created the Arena organisation, the app collects its org key into its own secrets, so no person handles the key. app_code.rotate_arena_key() swaps a key the app collected, and keys over 90 days old rotate automatically when no run is using them. configure() stays for keys issued by hand.

    Run and deployment opens now send snowflakeRegion and the app's purchased flag. The Snowflake license client adds claim start, prove, key collection and key rotation calls, and AuthRejectedError for 401/403 answers.

    After an upgrade, the app's version initializer points the saved profile at the new version's image, so submit no longer fails until set_pools runs again.

  • serve Snowflake Native App models from SQL with no public endpoint

    The Snowflake Native App now serves published models with no public endpoint. Each served model gets a SQL function, app_state.<SERVICE>_CHAT(messages, temperature, max_completion_tokens), that roles holding app_user call from SQL. Those roles can also call the service's own __CALL__ method, which takes every chat option. endpoint returns the function with an example SELECT. unpublish drops the function along with the service. The app manifest no longer requests BIND SERVICE ENDPOINT. PublishSettings and the publish request now carry an ingress flag; arena snowflake publish keeps its public endpoint.

  • add --overwrite to arena experiments metrics

    arena experiments metrics --output-file can now replace an existing file with --overwrite (overwrite=True on ArenaClient.download_experiment_metrics). Without the flag it still refuses, and the error now says how to replace the file instead of printing a traceback.

  • show hardware, hourly rate and estimated total before arena experiments submit

    arena experiments submit now prices the run before submitting: it prints the hardware Arena will use, the hourly rate and an estimated total, then asks to go on. --yes / -y, or a non-interactive terminal, prints the preview and submits without asking. ArenaClient.quote_experiment returns the same quote. Arena servers that cannot price a run yet keep the old behaviour.

  • reject LLM populations in validate and submit

    An LLM manifest with training.pop_size greater than 1 now fails arena manifest validate and ArenaClient.submit_experiment, including a price quote. verdict() reports that failure on training.pop_size with kind hpo_unavailable.

    The message for training.hpo, mutation, and training.pop_size says HPO and populations are not available for LLM training, and to remove training.hpo and the mutation section and set training.pop_size to 1. A mutation section that does not mutate still passes. Other algorithms are not rejected for pop_size alone.

  • experiments list shows the run's status label

    arena experiments list shows the server's status_label in the status column: "Waiting for capacity" while a run waits for GPUs, then the cluster's stage (Scheduled, Deployed, Running) while it starts. A row with no status_label keeps its status. --json output is unchanged.

  • add --project to experiments stop

    arena experiments stop accepts --project so a name that exists in more than one project can be stopped in the one you name. When --project is omitted, ArenaClient.stop_experiment uses the default project from ~/.arena/config.json, the same way metrics does. With no default project, the stop request still sends only the experiment name.

  • reject LoRA target_modules on Arena submit

    Arena chooses LoRA target modules from its model catalog. arena manifest validate and ArenaClient.submit_experiment now refuse a manifest that sets lora_config.target_modules with "LoRA target modules are chosen by Arena; remove target_modules." The check is part of agilerl.arena.models.verdict.submit_errors(); all-linear still passes. The Arena GRPO and LLM-judge tutorial manifests no longer set target_modules; on hybrid models such as Qwen3.5 the old q/k/v/o list adapted only the full-attention layers.

  • price cross-node collectives in the planner's learn-step time

    The Arena memory planner now adds cross-node time to a multi-node learn step. cross_node_seconds prices FSDP weight all-gathers (dense and expert), routed-token exchange, and gradient sync (FSDP reduce-scatter, HSDP replica all-reduce, expert-LoRA all-reduce, DDP all-reduce) as ring collectives. Weight gathers and the hidden share of FSDP reduce-scatter overlap compute; the token exchange, waited gradient sync, and optimizer offload do not.

    StepTiming lets resolve_training_memory rank micro-batch, checkpointing, residency, and DDP vs FSDP by learn seconds when trainers span nodes. One node, non-rollout algorithms, and an unknown peak FLOP stay on the previous learn-work ranking. TrainingMemoryPlan and TrainerCost carry cross_node. least_cross_node_plan takes an optional score so a higher expert degree can win on step time when the first layout moves routed-expert bytes. routed_token_bytes is the shared token term and divides by tensor and context parallel.

    New optional arguments: resolve_training_memory and training_memory_from_manifest take a trailing timing; least_cross_node_plan takes score. H100 and pre-Hopper GPU classes carry measured cross-node gather and exchange rates. The A100 uses the pre-Hopper rates. The byte estimate of resident memory does not change.

  • show accrued cost and a per-job ledger in arena user credits

    arena user credits now shows the spendable balance, the cost running jobs and deployments have accrued but not been charged yet, and the balance after it. arena user credits --ledger lists charges and credits by job and deployment with the balance after each, filterable with --job, --deployment and --limit. The SDK adds ArenaClient.get_credit_balance() and ArenaClient.get_credit_ledger().

  • build a default LLM training manifest from the manifest model

    Every dataset-backed LLM rollout now defaults to one epoch. Adds agilerl.arena.models.defaults.default_verdict, which fills a partial manifest (algorithm, environment, model id) with the manifest model's defaults, the model catalog's context length and the starting training values for LLM runs, and returns it as a verdict. A rollout's reward file may come later: the manifest model takes a reward_file_at_submit validation context that skips only the dataset rollout's rubric-file check. The manifest JSON schema reads the same starting values and no longer defaults rubric_name on dataset rollouts.

  • arena experiments logs and status show training logs and why a run failed

    arena experiments status <name> prints an experiment's status and, when it failed, the reason Arena recorded (for example a Python package that would not install, a cluster that never started, no GPU capacity, or the trainer's own failure message).

    arena experiments logs <name> [--tail N] [--follow] [--level info|warning|error] prints the same training log lines as the web Log view, follows a running experiment until it ends, then prints the failure reason. With --json it prints one JSON object per line and a final status object.

    SDK: ArenaClient.get_experiment_status, ArenaClient.get_experiment_logs and ArenaClient.iter_experiment_logs(follow=...).

  • show the --num-gpus values each GPU type takes in arena resources list

    arena resources list now prints a --num-gpus column with the GPU totals each GPU type accepts on submit, next to GPUs per node. --algorithm NAME lists what a run of that algorithm accepts; without it the list is for LLM training. ArenaClient.list_resources(algorithm=...) takes the same argument. Servers that do not report totals leave the column empty.

  • price preview and confirmation on arena experiments resume

    arena experiments resume now prices the resumed run before starting it: it prints the hardware the run resumes on, the hourly rate and an estimated total, then asks to go on. --yes / -y, or a non-interactive terminal, prints the preview and resumes without asking. ArenaClient.quote_resume returns the same quote. Arena servers that cannot price a resume yet keep the old behaviour.

  • default the async rollout buffer and version stamp in the manifest model

    A manifest for an async rollout algorithm gets the LLM rollout buffer and rollout_version_stamp: oldest_turn when those fields are left unset. Setting rollout_mode: colocated leaves an omitted buffer and stamp unset.

Fixes

  • clean manifest errors, a default async LLM buffer, and one submit path

    The Arena CLI prints an invalid manifest as one line per error, naming the manifest field and what is wrong with it, instead of a pydantic traceback. With --json it emits every validation error record (path, message, kind).

    A manifest that runs async rollout without a replay_buffer section now gets the default LLM rollout buffer instead of being rejected. A classic replay buffer is still rejected for async rollout.

    ArenaClient.submit_experiment now runs its client-side checks and sends the request through two internal methods that subclasses reuse. A subclass that submits to another endpoint gets the same validation, request format and error types. agilerl.arena.config.build_client and arena_client accept an optional client_cls so CLI plugins can build their own ArenaClient subclass.

  • prefer an explicit Arena URL over ARENA_BASE_URL and ARENA_KEYCLOAK_URL

    ArenaClient.configure(base_url=...) and arena --base-url now take precedence over ARENA_BASE_URL. ArenaOAuth2.configure(keycloak_url=...) and arena --keycloak-url now take precedence over ARENA_KEYCLOAK_URL. When the flag or configure argument is omitted, the environment variable still overrides the built-in default.

  • charge the nccl_reshard PACK staging slot at its planned size

    The merged-LoRA nccl_reshard memory estimate now charges one PACK staging slot, sized to the larger local shard of the biggest bulk weight and at least 2 KiB. The trainer estimate adds it to the refit peak. The engine estimate replaces the 2 GiB default slot inside its measured refit-group overhead with the planned slot, so it shrinks for models whose shards are smaller than 2 GiB.

  • keep a JSON-string pair cell as text

    A prompt or completion string is parsed into messages only when it is the JSON of one message object with a string role, or a non-empty list of those objects. Any other text is that message's content as written, including a JSON string such as "hi".

  • a missing or null lora_config trains the catalog default adapter

    A manifest with no lora_config, or with lora_config: null on the network or algorithm section, now trains the model's catalog default LoRA adapter: rank 16, alpha 32, all linear modules, and every packed-expert path on mixture-of-experts catalog models. TrainingManifest.to_payload always sends the resolved network.lora_config. The memory estimate now includes the expert adapter that training uses. FinetuningNetworkSpec.lora_config is no longer optional, and a null no longer selects full finetuning.

  • set rubric_file_path from the reward file on submit

    ArenaClient.submit_experiment fills environment.rubric_file_path when a rollout manifest omits it and a reward file is passed. An omitted env_type counts as rollout when the algorithm is one. The value is the file's basename, or reward.py for raw bytes. A manifest that already names a different basename, or one that is not a mapping, raises ArenaValidationError before the request is sent. The caller's manifest dict is left unchanged.

    The GSM8K GRPO example is a dataset rollout on Qwen/Qwen3.5-0.8B. It sets dataset, prompt_template, and an LLM replay buffer, and leaves rubric_file_path for the reward file to fill.

  • mount Snowflake volumes for the image's non-root user

    The Snowflake service specifications that agilerl-arena renders for the broker, Ray head, GPU workers and the publish job now set uid: 1000 and gid: 100 on the run stage volume, so a container running as a non-root user can write to it. The broker specification sets the same ids on its block volume. Containers running as root are unaffected.

  • refuse remote-code models in the Snowflake Native App

    The Snowflake Native App's submit refuses models whose family loads Python from the checkpoint's Hugging Face repo (trust_remote_code), currently XiaomiMiMo/MiMo-V2.6-Flash-RL, models outside the Arena catalog, and manifests that set algorithm.vllm_engine_args.trust_remote_code to true. Snowflake does not let a Native App run code from outside its package. The CLI, Arena-hosted and BYOC runs are unchanged. agilerl-arena adds REMOTE_CODE_MODEL_TYPES to agilerl.arena.models.model_info.

  • env upload works again; template an environment; metrics --project

    • arena env validate / ArenaClient.validate_environment send multi_agent=false again; the platform requires it.
    • arena manifest template takes --env, --env-version and --env-entrypoint (get_default_run_spec(env_name=, env_version=, env_entrypoint=)) to print a manifest for an uploaded OpenEnv environment.
    • arena experiments metrics takes --project; download_experiment_metrics takes project.
  • preserve circular replay semantics for oversized batches (#709)

  • let expert-parallel groups span nodes when that moves fewer bytes than gathering expert weights

    On trainers spread over several nodes, the memory planner kept expert-parallel groups inside one node, so large MoE models sharded their experts with FSDP across nodes and gathered the frozen expert weights over the network every pass. The planner now also tries expert-parallel degrees that span whole nodes, and among layouts that differ only in expert degree it picks the one that moves the fewest routed-expert bytes between nodes: weight gathers, or routed tokens. Nothing changes on one node. New: cross_node_expert_bytes, least_cross_node_plan, TierCheck.cross_node_expert_bytes; first_fitting_plan takes the byte count as a third argument.

  • use tags in LLM fine-tuning example configs

    The GRPO, GSPO, CISPO, REINFORCE and LLM PPO example configs asked the model to reason inside <redacted_thinking> tags and prefilled that tag, while the tutorials and reward functions expect <think>. All six configs now use <think> </think>. A new pre-commit hook rejects redacted_thinking anywhere under configs/.

  • GRPO GSM8K tutorial runs as written; manifest validate reports submit's checks

    The GSM8K GRPO tutorial manifest names its reward file, sets an explicit prompt that asks for <answer> tags, turns Qwen3.5 thinking off explicitly and sets max_reward: 2.0. Its reward.py scores the text after the last </think> in the completion, so it works the same with thinking on or off, and no longer assumes a <think> prefill. The tutorials download metrics with --overwrite. The tutorial explains which GPUs async GRPO needs.

    arena manifest validate now reports everything arena experiments submit refuses beyond the schema: an algorithm.batch_size that is not a power of 2 from 1 to 1024, a max_context_length outside the model's options, rollout_mode: colocated, and a replay buffer async rollout cannot use. Submit and validate share these checks (agilerl.arena.models.verdict.submit_errors). Errors print as path: message.

  • reject classic RL manifests in the Arena client

    Registered non-LLM algorithms such as PPO and DQN fail Arena manifest validation and experiment submit. arena manifest template for those names fails before Arena is asked for a default manifest. The error says classic RL is no longer supported and points at the AgileRL v2.67.0 release.

    deploy_agent and arena agent deploy --checkpoint take the checkpoint steps value from list_checkpoints, for example 500. The Arena guide and the GSM8K tutorial use that value. Omitting the checkpoint deploys the one with the most steps.

    The PPO custom-environment tutorial is a short retired page that points to the Gymnasium tutorials and the AgileRL v2 release.

  • accept the catalog default LoRA modules on submit

    arena manifest validate and arena experiments submit accept a target_modules list when its names are exactly that model's catalog default modules. all-linear still passes. Any other list, including a subset of the default, is still refused.

Breaking Changes

  • move rollout and offload rules out of the memory package

    Rollout-mode checks and the FSDP CPU-offload check now live in agilerl.arena.models. async_rollout, explicit_colocated_rollout, and validated_run_manifest are on agilerl.arena.models.manifest. async_rollout_algorithm, run_rollout_engines, rollout_engines_blocker, apply_run_rollout_mode, and cpu_offload_blocker are on agilerl.arena.models.manifest_rules.

    These imports no longer resolve:

    • agilerl.arena.memory.manifest.async_rollout
    • agilerl.arena.memory.manifest.explicit_colocated_rollout
    • agilerl.arena.memory.manifest.validated_run_manifest
    • agilerl.arena.memory.resolve.fsdp.cpu_offload_blocker
    • agilerl.arena.memory.resolve.rollout.async_rollout_algorithm
    • agilerl.arena.memory.resolve.rollout.run_rollout_engines
    • agilerl.arena.memory.resolve.rollout.rollout_engines_blocker
    • agilerl.arena.memory.resolve.rollout.apply_run_rollout_mode

    arena memory estimate prints the same report. estimate_manifest sizes a manifest path or document, and json_report returns the --json document and exit code. catalog_only=True rejects a model that is not in SUPPORTED_MODEL_INFO before a local checkpoint or Hugging Face Hub read.

  • long-lived CLI logins; arena login switches user or environment

    arena login now requests the offline_access scope, so a saved login keeps refreshing until the Keycloak offline session goes idle (30 days by default) instead of expiring with the browser session.

    Only one login is saved. arena login always runs the browser sign-in, then ends the previously saved session on the Keycloak that issued it, and prints the signed-in user. Use it to switch user or environment. Saved credentials record their issuer: a client pointed at a different Keycloak ignores them and fails with an error naming both, including when an API key is set. arena logout revokes the saved login on its own Keycloak.

    Breaking changes:

    • arena login --force and ArenaClient.login(force=...) are removed.
    • ArenaClient.login's timeout is no longer keyword-only.
    • agilerl.arena.auth.is_oauth_access_token_valid is removed.
    • arena login no longer reuses a still-valid saved login.

    Also: the Snowflake data export no longer lets a failed temp-file delete on Windows hide the real export error.

  • accept only stored segment rows in traces validation

    The traces validator in agilerl-arena checks stored segment rows only. pair_as_segment, PAIR_COLUMNS, and input_shape are removed. validate_traces_rows and validate_traces_file require messages and no longer convert a prompt/completion row.

    ArenaClient.create_dataset for category traces still rejects a column mapping, raw bytes, and any file that is not JSONL, JSON, or parquet (a directory is still allowed). It uploads the file unchanged and does not check rows.

    Training in agilerl still drops a row that has both prompt and completion, with the same message as before, and still rejects a split that has no segment.

    The traces docs describe prompt/completion pair conversion. Arena turns those columns into messages and trains only the completion. ArenaClient.create_dataset uploads the file unchanged and checks the file type, not the rows.

Documentation

  • document X-Arena-Client-Version on Snowflake head requests

    The Snowflake head sends X-Arena-Client-Version on its Arena licence and usage calls. Arena returns HTTP 426 when the header is missing or older than the oldest release it supports.

    Client and Snowflake licence tests expect that 426 description, including the pip upgrade command.

  • add an Arena tutorial for GRPO with an LLM judge

    Adds a tutorial that trains Qwen3.5-0.8B on GSM8K in Arena with a rubric that combines a correctness check and an LLMJudgeRubric. It covers storing the judge's API key as an organization secret, the rubric_file_path / rubric_name / judge manifest fields, submitting with --reward-file, reading the judge_* metrics and the judge notes in the Completions view, and a RULER variant with LLMGroupJudgeRubric. Example files are in docs/_static/examples/gsm8k-judge/. The environments guide links to it from the LLM judge and RULER sections.

    The GSM8K GRPO example manifest uses batch_size: 8. Arena accepts any batch size of at least 1. A batch of 6 fails only when it does not divide a trainer count that fits in memory, and 8 divides more of those counts.

Other

  • Fix replay LoRA merge for renamed and quantized checkpoints

    export_merged_pretrained(adapter_path=..., base_model_name_or_path=...) now writes the merged weights under the base checkpoint's stored tensor names and files, mapping LoRA deltas onto them with the model's reversed weight conversions. Checkpoints that rename modules at load (for example Nemotron-H backbone.*) and per-expert MoE checkpoints now merge correctly. Quantized checkpoints keep their quantization unless the adapter changes a quantized tensor, which dequantizes the checkpoint and removes quantization_config. The base generation_config.json, processor and tokenizer files are copied, so vision-language merges load in vLLM. BaseWeightStore is removed, and replay ignores max_shard_size. Adds agilerl.distributed.fsdp_meta.convert_checkpoint_route.

  • Add reasoning and visible-text splitting to chat formats

    Adds ChatFormat.reasoning_text and ChatFormat.visible_text, which split one generation's token ids into the reasoning written before the answer and the text the user sees. Each format uses the same parsing it already applies to rollouts: gpt-oss (Harmony) reads the analysis and final channels and falls back to commentary preambles addressed to no function, and Gemma 4 drops its thought channel name. ChatFormat._decode gains a skip_special_tokens option.

Full Changelog: v2.68.0...v2.69.0

agilerl-arena/v1.44.0: agilerl-arena v1.44.0: move rollout and offload rules out of the memory package

Released on 2026-11-24 - GitHub - PyPI

Features

  • reject HPO manifests in validate and submit

    HPO is no longer available in Arena. arena manifest validate now fails, and ArenaClient.submit_experiment raises ArenaValidationError, when a manifest sets training.hpo: true or a mutation section that changes agents. Remove those settings to submit. agilerl.arena.models.verdict.hpo_fields lists the fields that turn HPO on.

  • drop classic RL from the Arena CLI and client; list GPU types

    Arena no longer offers classic (non-LLM) RL, so the arena CLI and ArenaClient drop it: the --gym-env* options on arena manifest template and the gym_env* arguments of get_default_run_spec, arena env profile / profile_environment, env validate --multi-agent/--classic (environment uploads are always GEM), and classic agent inference (Agent.get_action). arena resources list now prints the GPU types you can train on with the GPUs per node each comes in, instead of resource class ids and prices. arena memory estimate and solve need --gpu (a GPU type from arena resources list) or --device-gb; they no longer pick a resource tier. The classic Arena tutorial and docs are removed.

  • export a trained model to a consumer stage

    The Snowflake Native App gets an export_stage reference (a consumer stage, READ and WRITE) and an app_admin procedure export_model(run_id, step). It copies a run's merged checkpoint, the files publish logs to the Model Registry, to <run_id>/checkpoint_<n>/ on that stage with COPY FILES, so a buyer keeps the model after uninstalling the app. It starts no service, records no billable usage, and still works after an unpurchased trial ends.

  • offer to upgrade and re-run when Arena requires a newer agilerl-arena

    When Arena refuses a command because the installed agilerl-arena is below its minimum (HTTP 426), the arena CLI prints Arena's message and, in an interactive terminal, asks whether to upgrade. On yes it runs pip install -U for agilerl-arena, keeping extras already installed and any extras named in that message, then re-runs the same command once. arena snowflake also installs the snowflake extra and says the trainer image updates on arena snowflake setup. If pip fails, the CLI prints the manual command and exits. A non-interactive CLI does not upgrade unless ARENA_AUTO_UPGRADE=1. Calling the Python client directly still raises the error.

  • add agilerl.utils.user_log for messages meant for the person running training

    Adds agilerl.utils.user_log, with log_for_user(event, message, level, stacklevel, **fields) and format_duration(seconds). log_for_user writes to the agilerl.user logger: messages written for the person running training (progress, results, warnings they can act on), kept apart from debug logging. Each record carries the event type and structured fields as user_event and user_fields attributes, so a handler can forward them elsewhere. With no handler attached they are ordinary log lines.

  • Snowflake Native App connects to Arena with a package-delivered claim

    The Snowflake Native App gets app_code.connect_arena(). The app starts a claim with Arena, reads a one-time code Arena writes to a table shared from the application package (only the install in that account and region can read its row), proves the claim, and returns a signup link. Once the admin has created the Arena organisation, the app collects its org key into its own secrets, so no person handles the key. app_code.rotate_arena_key() swaps a key the app collected, and keys over 90 days old rotate automatically when no run is using them. configure() stays for keys issued by hand.

    Run and deployment opens now send snowflakeRegion and the app's purchased flag. The Snowflake license client adds claim start, prove, key collection and key rotation calls, and AuthRejectedError for 401/403 answers.

    After an upgrade, the app's version initializer points the saved profile at the new version's image, so submit no longer fails until set_pools runs again.

  • serve Snowflake Native App models from SQL with no public endpoint

    The Snowflake Native App now serves published models with no public endpoint. Each served model gets a SQL function, app_state.<SERVICE>_CHAT(messages, temperature, max_completion_tokens), that roles holding app_user call from SQL. Those roles can also call the service's own __CALL__ method, which takes every chat option. endpoint returns the function with an example SELECT. unpublish drops the function along with the service. The app manifest no longer requests BIND SERVICE ENDPOINT. PublishSettings and the publish request now carry an ingress flag; arena snowflake publish keeps its public endpoint.

  • add --overwrite to arena experiments metrics

    arena experiments metrics --output-file can now replace an existing file with --overwrite (overwrite=True on ArenaClient.download_experiment_metrics). Without the flag it still refuses, and the error now says how to replace the file instead of printing a traceback.

  • show hardware, hourly rate and estimated total before arena experiments submit

    arena experiments submit now prices the run before submitting: it prints the hardware Arena will use, the hourly rate and an estimated total, then asks to go on. --yes / -y, or a non-interactive terminal, prints the preview and submits without asking. ArenaClient.quote_experiment returns the same quote. Arena servers that cannot price a run yet keep the old behaviour.

  • reject LLM populations in validate and submit

    An LLM manifest with training.pop_size greater than 1 now fails arena manifest validate and ArenaClient.submit_experiment, including a price quote. verdict() reports that failure on training.pop_size with kind hpo_unavailable.

    The message for training.hpo, mutation, and training.pop_size says HPO and populations are not available for LLM training, and to remove training.hpo and the mutation section and set training.pop_size to 1. A mutation section that does not mutate still passes. Other algorithms are not rejected for pop_size alone.

  • experiments list shows the run's status label

    arena experiments list shows the server's status_label in the status column: "Waiting for capacity" while a run waits for GPUs, then the cluster's stage (Scheduled, Deployed, Running) while it starts. A row with no status_label keeps its status. --json output is unchanged.

  • add --project to experiments stop

    arena experiments stop accepts --project so a name that exists in more than one project can be stopped in the one you name. When --project is omitted, ArenaClient.stop_experiment uses the default project from ~/.arena/config.json, the same way metrics does. With no default project, the stop request still sends only the experiment name.

  • reject LoRA target_modules on Arena submit

    Arena chooses LoRA target modules from its model catalog. arena manifest validate and ArenaClient.submit_experiment now refuse a manifest that sets lora_config.target_modules with "LoRA target modules are chosen by Arena; remove target_modules." The check is part of agilerl.arena.models.verdict.submit_errors(); all-linear still passes. The Arena GRPO and LLM-judge tutorial manifests no longer set target_modules; on hybrid models such as Qwen3.5 the old q/k/v/o list adapted only the full-attention layers.

  • price cross-node collectives in the planner's learn-step time

    The Arena memory planner now adds cross-node time to a multi-node learn step. cross_node_seconds prices FSDP weight all-gathers (dense and expert), routed-token exchange, and gradient sync (FSDP reduce-scatter, HSDP replica all-reduce, expert-LoRA all-reduce, DDP all-reduce) as ring collectives. Weight gathers and the hidden share of FSDP reduce-scatter overlap compute; the token exchange, waited gradient sync, and optimizer offload do not.

    StepTiming lets resolve_training_memory rank micro-batch, checkpointing, residency, and DDP vs FSDP by learn seconds when trainers span nodes. One node, non-rollout algorithms, and an unknown peak FLOP stay on the previous learn-work ranking. TrainingMemoryPlan and TrainerCost carry cross_node. least_cross_node_plan takes an optional score so a higher expert degree can win on step time when the first layout moves routed-expert bytes. routed_token_bytes is the shared token term and divides by tensor and context parallel.

    New optional arguments: resolve_training_memory and training_memory_from_manifest take a trailing timing; least_cross_node_plan takes score. H100 and pre-Hopper GPU classes carry measured cross-node gather and exchange rates. The A100 uses the pre-Hopper rates. The byte estimate of resident memory does not change.

  • show accrued cost and a per-job ledger in arena user credits

    arena user credits now shows the spendable balance, the cost running jobs and deployments have accrued but not been charged yet, and the balance after it. arena user credits --ledger lists charges and credits by job and deployment with the balance after each, filterable with --job, --deployment and --limit. The SDK adds ArenaClient.get_credit_balance() and ArenaClient.get_credit_ledger().

  • build a default LLM training manifest from the manifest model

    Every dataset-backed LLM rollout now defaults to one epoch. Adds agilerl.arena.models.defaults.default_verdict, which fills a partial manifest (algorithm, environment, model id) with the manifest model's defaults, the model catalog's context length and the starting training values for LLM runs, and returns it as a verdict. A rollout's reward file may come later: the manifest model takes a reward_file_at_submit validation context that skips only the dataset rollout's rubric-file check. The manifest JSON schema reads the same starting values and no longer defaults rubric_name on dataset rollouts.

  • arena experiments logs and status show training logs and why a run failed

    arena experiments status <name> prints an experiment's status and, when it failed, the reason Arena recorded (for example a Python package that would not install, a cluster that never started, no GPU capacity, or the trainer's own failure message).

    arena experiments logs <name> [--tail N] [--follow] [--level info|warning|error] prints the same training log lines as the web Log view, follows a running experiment until it ends, then prints the failure reason. With --json it prints one JSON object per line and a final status object.

    SDK: ArenaClient.get_experiment_status, ArenaClient.get_experiment_logs and ArenaClient.iter_experiment_logs(follow=...).

  • show the --num-gpus values each GPU type takes in arena resources list

    arena resources list now prints a --num-gpus column with the GPU totals each GPU type accepts on submit, next to GPUs per node. --algorithm NAME lists what a run of that algorithm accepts; without it the list is for LLM training. ArenaClient.list_resources(algorithm=...) takes the same argument. Servers that do not report totals leave the column empty.

  • price preview and confirmation on arena experiments resume

    arena experiments resume now prices the resumed run before starting it: it prints the hardware the run resumes on, the hourly rate and an estimated total, then asks to go on. --yes / -y, or a non-interactive terminal, prints the preview and resumes without asking. ArenaClient.quote_resume returns the same quote. Arena servers that cannot price a resume yet keep the old behaviour.

  • default the async rollout buffer and version stamp in the manifest model

    A manifest for an async rollout algorithm gets the LLM rollout buffer and rollout_version_stamp: oldest_turn when those fields are left unset. Setting rollout_mode: colocated leaves an omitted buffer and stamp unset.

Fixes

  • clean manifest errors, a default async LLM buffer, and one submit path

    The Arena CLI prints an invalid manifest as one line per error, naming the manifest field and what is wrong with it, instead of a pydantic traceback. With --json it emits every validation error record (path, message, kind).

    A manifest that runs async rollout without a replay_buffer section now gets the default LLM rollout buffer instead of being rejected. A classic replay buffer is still rejected for async rollout.

    ArenaClient.submit_experiment now runs its client-side checks and sends the request through two internal methods that subclasses reuse. A subclass that submits to another endpoint gets the same validation, request format and error types. agilerl.arena.config.build_client and arena_client accept an optional client_cls so CLI plugins can build their own ArenaClient subclass.

  • prefer an explicit Arena URL over ARENA_BASE_URL and ARENA_KEYCLOAK_URL

    ArenaClient.configure(base_url=...) and arena --base-url now take precedence over ARENA_BASE_URL. ArenaOAuth2.configure(keycloak_url=...) and arena --keycloak-url now take precedence over ARENA_KEYCLOAK_URL. When the flag or configure argument is omitted, the environment variable still overrides the built-in default.

  • charge the nccl_reshard PACK staging slot at its planned size

    The merged-LoRA nccl_reshard memory estimate now charges one PACK staging slot, sized to the larger local shard of the biggest bulk weight and at least 2 KiB. The trainer estimate adds it to the refit peak. The engine estimate replaces the 2 GiB default slot inside its measured refit-group overhead with the planned slot, so it shrinks for models whose shards are smaller than 2 GiB.

  • keep a JSON-string pair cell as text

    A prompt or completion string is parsed into messages only when it is the JSON of one message object with a string role, or a non-empty list of those objects. Any other text is that message's content as written, including a JSON string such as "hi".

  • a missing or null lora_config trains the catalog default adapter

    A manifest with no lora_config, or with lora_config: null on the network or algorithm section, now trains the model's catalog default LoRA adapter: rank 16, alpha 32, all linear modules, and every packed-expert path on mixture-of-experts catalog models. TrainingManifest.to_payload always sends the resolved network.lora_config. The memory estimate now includes the expert adapter that training uses. FinetuningNetworkSpec.lora_config is no longer optional, and a null no longer selects full finetuning.

  • set rubric_file_path from the reward file on submit

    ArenaClient.submit_experiment fills environment.rubric_file_path when a rollout manifest omits it and a reward file is passed. An omitted env_type counts as rollout when the algorithm is one. The value is the file's basename, or reward.py for raw bytes. A manifest that already names a different basename, or one that is not a mapping, raises ArenaValidationError before the request is sent. The caller's manifest dict is left unchanged.

    The GSM8K GRPO example is a dataset rollout on Qwen/Qwen3.5-0.8B. It sets dataset, prompt_template, and an LLM replay buffer, and leaves rubric_file_path for the reward file to fill.

  • mount Snowflake volumes for the image's non-root user

    The Snowflake service specifications that agilerl-arena renders for the broker, Ray head, GPU workers and the publish job now set uid: 1000 and gid: 100 on the run stage volume, so a container running as a non-root user can write to it. The broker specification sets the same ids on its block volume. Containers running as root are unaffected.

  • refuse remote-code models in the Snowflake Native App

    The Snowflake Native App's submit refuses models whose family loads Python from the checkpoint's Hugging Face repo (trust_remote_code), currently XiaomiMiMo/MiMo-V2.6-Flash-RL, models outside the Arena catalog, and manifests that set algorithm.vllm_engine_args.trust_remote_code to true. Snowflake does not let a Native App run code from outside its package. The CLI, Arena-hosted and BYOC runs are unchanged. agilerl-arena adds REMOTE_CODE_MODEL_TYPES to agilerl.arena.models.model_info.

  • env upload works again; template an environment; metrics --project

    • arena env validate / ArenaClient.validate_environment send multi_agent=false again; the platform requires it.
    • arena manifest template takes --env, --env-version and --env-entrypoint (get_default_run_spec(env_name=, env_version=, env_entrypoint=)) to print a manifest for an uploaded OpenEnv environment.
    • arena experiments metrics takes --project; download_experiment_metrics takes project.
  • preserve circular replay semantics for oversized batches (#709)

  • let expert-parallel groups span nodes when that moves fewer bytes than gathering expert weights

    On trainers spread over several nodes, the memory planner kept expert-parallel groups inside one node, so large MoE models sharded their experts with FSDP across nodes and gathered the frozen expert weights over the network every pass. The planner now also tries expert-parallel degrees that span whole nodes, and among layouts that differ only in expert degree it picks the one that moves the fewest routed-expert bytes between nodes: weight gathers, or routed tokens. Nothing changes on one node. New: cross_node_expert_bytes, least_cross_node_plan, TierCheck.cross_node_expert_bytes; first_fitting_plan takes the byte count as a third argument.

  • use tags in LLM fine-tuning example configs

    The GRPO, GSPO, CISPO, REINFORCE and LLM PPO example configs asked the model to reason inside <redacted_thinking> tags and prefilled that tag, while the tutorials and reward functions expect <think>. All six configs now use <think> </think>. A new pre-commit hook rejects redacted_thinking anywhere under configs/.

  • GRPO GSM8K tutorial runs as written; manifest validate reports submit's checks

    The GSM8K GRPO tutorial manifest names its reward file, sets an explicit prompt that asks for <answer> tags, turns Qwen3.5 thinking off explicitly and sets max_reward: 2.0. Its reward.py scores the text after the last </think> in the completion, so it works the same with thinking on or off, and no longer assumes a <think> prefill. The tutorials download metrics with --overwrite. The tutorial explains which GPUs async GRPO needs.

    arena manifest validate now reports everything arena experiments submit refuses beyond the schema: an algorithm.batch_size that is not a power of 2 from 1 to 1024, a max_context_length outside the model's options, rollout_mode: colocated, and a replay buffer async rollout cannot use. Submit and validate share these checks (agilerl.arena.models.verdict.submit_errors). Errors print as path: message.

  • reject classic RL manifests in the Arena client

    Registered non-LLM algorithms such as PPO and DQN fail Arena manifest validation and experiment submit. arena manifest template for those names fails before Arena is asked for a default manifest. The error says classic RL is no longer supported and points at the AgileRL v2.67.0 release.

    deploy_agent and arena agent deploy --checkpoint take the checkpoint steps value from list_checkpoints, for example 500. The Arena guide and the GSM8K tutorial use that value. Omitting the checkpoint deploys the one with the most steps.

    The PPO custom-environment tutorial is a short retired page that points to the Gymnasium tutorials and the AgileRL v2 release.

  • accept the catalog default LoRA modules on submit

    arena manifest validate and arena experiments submit accept a target_modules list when its names are exactly that model's catalog default modules. all-linear still passes. Any other list, including a subset of the default, is still refused.

Breaking Changes

  • move rollout and offload rules out of the memory package

    Rollout-mode checks and the FSDP CPU-offload check now live in agilerl.arena.models. async_rollout, explicit_colocated_rollout, and validated_run_manifest are on agilerl.arena.models.manifest. async_rollout_algorithm, run_rollout_engines, rollout_engines_blocker, apply_run_rollout_mode, and cpu_offload_blocker are on agilerl.arena.models.manifest_rules.

    These imports no longer resolve:

    • agilerl.arena.memory.manifest.async_rollout
    • agilerl.arena.memory.manifest.explicit_colocated_rollout
    • agilerl.arena.memory.manifest.validated_run_manifest
    • agilerl.arena.memory.resolve.fsdp.cpu_offload_blocker
    • agilerl.arena.memory.resolve.rollout.async_rollout_algorithm
    • agilerl.arena.memory.resolve.rollout.run_rollout_engines
    • agilerl.arena.memory.resolve.rollout.rollout_engines_blocker
    • agilerl.arena.memory.resolve.rollout.apply_run_rollout_mode

    arena memory estimate prints the same report. estimate_manifest sizes a manifest path or document, and json_report returns the --json document and exit code. catalog_only=True rejects a model that is not in SUPPORTED_MODEL_INFO before a local checkpoint or Hugging Face Hub read.

  • long-lived CLI logins; arena login switches user or environment

    arena login now requests the offline_access scope, so a saved login keeps refreshing until the Keycloak offline session goes idle (30 days by default) instead of expiring with the browser session.

    Only one login is saved. arena login always runs the browser sign-in, then ends the previously saved session on the Keycloak that issued it, and prints the signed-in user. Use it to switch user or environment. Saved credentials record their issuer: a client pointed at a different Keycloak ignores them and fails with an error naming both, including when an API key is set. arena logout revokes the saved login on its own Keycloak.

    Breaking changes:

    • arena login --force and ArenaClient.login(force=...) are removed.
    • ArenaClient.login's timeout is no longer keyword-only.
    • agilerl.arena.auth.is_oauth_access_token_valid is removed.
    • arena login no longer reuses a still-valid saved login.

    Also: the Snowflake data export no longer lets a failed temp-file delete on Windows hide the real export error.

  • accept only stored segment rows in traces validation

    The traces validator in agilerl-arena checks stored segment rows only. pair_as_segment, PAIR_COLUMNS, and input_shape are removed. validate_traces_rows and validate_traces_file require messages and no longer convert a prompt/completion row.

    ArenaClient.create_dataset for category traces still rejects a column mapping, raw bytes, and any file that is not JSONL, JSON, or parquet (a directory is still allowed). It uploads the file unchanged and does not check rows.

    Training in agilerl still drops a row that has both prompt and completion, with the same message as before, and still rejects a split that has no segment.

    The traces docs describe prompt/completion pair conversion. Arena turns those columns into messages and trains only the completion. ArenaClient.create_dataset uploads the file unchanged and checks the file type, not the rows.

Documentation

  • add an Arena tutorial for GRPO with an LLM judge

    Adds a tutorial that trains Qwen3.5-0.8B on GSM8K in Arena with a rubric that combines a correctness check and an LLMJudgeRubric. It covers storing the judge's API key as an organization secret, the rubric_file_path / rubric_name / judge manifest fields, submitting with --reward-file, reading the judge_* metrics and the judge notes in the Completions view, and a RULER variant with LLMGroupJudgeRubric. Example files are in docs/_static/examples/gsm8k-judge/. The environments guide links to it from the LLM judge and RULER sections.

    The GSM8K GRPO example manifest uses batch_size: 8. Arena accepts any batch size of at least 1. A batch of 6 fails only when it does not divide a trainer count that fits in memory, and 8 divides more of those counts.

Other

  • Fix replay LoRA merge for renamed and quantized checkpoints

    export_merged_pretrained(adapter_path=..., base_model_name_or_path=...) now writes the merged weights under the base checkpoint's stored tensor names and files, mapping LoRA deltas onto them with the model's reversed weight conversions. Checkpoints that rename modules at load (for example Nemotron-H backbone.*) and per-expert MoE checkpoints now merge correctly. Quantized checkpoints keep their quantization unless the adapter changes a quantized tensor, which dequantizes the checkpoint and removes quantization_config. The base generation_config.json, processor and tokenizer files are copied, so vision-language merges load in vLLM. BaseWeightStore is removed, and replay ignores max_shard_size. Adds agilerl.distributed.fsdp_meta.convert_checkpoint_route.

  • Add reasoning and visible-text splitting to chat formats

    Adds ChatFormat.reasoning_text and ChatFormat.visible_text, which split one generation's token ids into the reasoning written before the answer and the text the user sees. Each format uses the same parsing it already applies to rollouts: gpt-oss (Harmony) reads the analysis and final channels and falls back to commentary preambles addressed to no function, and Gemma 4 drops its thought channel name. ChatFormat._decode gains a skip_special_tokens option.

Full Changelog: agilerl-arena/v1.43.0...agilerl-arena/v1.44.0

agilerl-arena/v1.43.0: agilerl-arena v1.43.0: size an omitted OPD teacher engine and count its GPUs in the split

Released on 2026-11-20 - GitHub - PyPI

Features

  • size an omitted OPD teacher engine and count its GPUs in the split

    An OPD manifest with a separate teacher model can leave that teacher's tensor parallel unset. agilerl-arena picks the narrowest width that serves the teacher's sequences, or the narrowest width that fits the GPU memory budget, leaving room for one trainer and one student engine. The student engine and the teacher together stay within one node's GPUs. The automatic trainer and rollout-engine split counts those teacher GPUs. A teacher-model manifest no longer has to set the student tensor parallel, the trainer GPU count, or the rollout engine count. The memory estimate reports the width as teacher_engine_tensor_parallel. An explicit teacher width is kept.

Full Changelog: agilerl-arena/v1.42.1...agilerl-arena/v1.43.0

agilerl-arena/v1.42.1: agilerl-arena v1.42.1: document X-Arena-Client-Version on Snowflake head requests

Released on 2026-11-19 - GitHub - PyPI

Documentation

  • document X-Arena-Client-Version on Snowflake head requests

    The Snowflake head sends X-Arena-Client-Version on its Arena licence and usage calls. Arena returns HTTP 426 when the header is missing or older than the oldest release it supports.

    Client and Snowflake licence tests expect that 426 description, including the pip upgrade command.

Full Changelog: agilerl-arena/v1.42.0...agilerl-arena/v1.42.1

v2.68.0: reject deprecated models and drop resource class from submit

Released on 2026-11-19 - GitHub - PyPI

Features

  • stop the Snowflake Native App when an unpurchased listing trial ends

    An install of the paid Snowflake Marketplace listing that is still unpurchased
    7 days less one hour after install can no longer submit training runs or
    publish models; each call is refused with a message to purchase the listing.
    The app's hourly task also drops every running training job and inference
    service of such an install, one task interval before the listing's 7-day
    Snowflake trial ends. Purchase is read through a secure function, because
    SYSTEM$IS_LISTING_PURCHASED() called directly from app code returns TRUE during
    a trial. Installs that are not from a listing are never stopped.

Fixes

  • open one Snowflake deployment per served model

    The Snowflake Native App no longer opens two Arena deployments for one served model when the hourly usage task runs while publish is still waiting for the service. Both paths now claim the service's deployment row with a single MERGE and reuse an open deployment, re-sending Arena the same open, so a served model's hours are billed once.

  • draft n-gram by default only when a decode step fits the CUDA-graph ceiling

    agilerl.arena.memory.resolve.rollout.drafts_by_default takes a required max_num_seqs argument. A multi-turn engine drafts by default only when max_num_seqs * (1 + num_speculative_tokens) is at most NGRAM_DRAFT_MAX_DECODE_TOKENS (512, the default CUDA-graph capture ceiling). Wider engines run past the captured graphs and past the rejection-sampler memory reserved at start-up. The memory estimator uses that width. SplitWorkload takes a required slot_group_size, the highest group_size hyperparameter search can reach. When max_num_seqs is omitted, generation timing prices drafting from the prompts on one engine times slot_group_size. A pinned max_num_seqs is kept.

  • use usable B300 memory and SM 10.3 for B300/GB300

    Size B300 at 269 GiB, NVIDIA's full-GPU MIG profile, instead of the 288 GB physical HBM3e, and report compute capability 10.3 for B300 and GB300. Tests cover each Blackwell data-centre GPU and the nvidia.com/gpu.product node labels the NVIDIA GPU Operator sets.

  • use the default Arena URL when the Snowflake app's configure gets a NULL base URL

    The Snowflake Native App's configure procedure now falls back to https://arena.agilerl.com when the base URL is NULL, since Snowflake does not apply a procedure's default argument for an explicit NULL.

  • quiet colocated vLLM init logs and OpenEnv disconnect tracebacks

    Colocated vLLM startup logs its init order, batched-token settings, and how many LoRA slots stayed resident at debug instead of as Python warnings. If LoRA is enabled and no slot could be kept resident, it logs a warning that the rollout adapter may not affect generation.

    Mamba models log a warning when incompatible LoRA target modules or parameters are dropped. CUDA memory snapshots log at debug.

    The OpenEnv server no longer reports a client that closed its session as an ASGI error traceback. That case is one debug line. Other environment errors are still logged.

  • pass trainable expert-parallel params as leaf views

    Expert-parallel training with LoRA on packed experts no longer clones each MoE layer's trainable expert adapters for the local kernel. The kernel receives detached views of the local shards, and a post-accumulate hook moves each leaf's grad onto the sharded parameter and clears the leaf's own grad. This removes two adapter-sized copies per layer per forward that stayed on the GPU until backward; on a 30B-class MoE DPO run on 8x L4 peak memory fell from 20.2 GiB to 17.7 GiB.

Breaking Changes

  • reject deprecated models and drop resource class from submit

    Submitting a deprecated catalog model fails, the same as a preview model. arena manifest validate still warns.

    to_payload keeps the model id, context length, and lora_config only under network. A LoRA config written only on the algorithm is moved to network.lora_config. An explicit null on the algorithm is left off the payload, the same as omitting the key. That algorithm copy is checked against the catalog (rank, module names, tower modules, and expert paths) before the two sections are compared. Catalog defaults, including packed-MoE target_parameters, are applied as part of that check.

    ArenaClient.submit_experiment and ArenaTrainer.train no longer accept resource_id or num_nodes. train takes num_gpus and gpu_type. arena experiments submit no longer has --resource-id or --num-nodes. With no GPU flags, Arena picks the cheapest layout that fits. With --num-gpus and --gpu-type, it keeps only a layout the memory estimate fits.

Other

  • Snowflake Native App: no background activity while idle, and clearer GPU-family errors

    The Snowflake Native App no longer runs anything in the background while no jobs or served models exist: its hourly billing task suspends itself after the last run is billed and resumes on the next submit or serve, and GPU pools left with no work are suspended. A new app_code.gpu_families() procedure lists the GPU families usable in your account, and set_pools and submit accept only GPU families whose per-node GPU count in your region matches Arena's sizing, naming the usable families when one isn't.

Full Changelog: v2.67.0...v2.68.0

agilerl-arena/v1.42.0: agilerl-arena v1.42.0: reject deprecated models and drop resource class from submit

Released on 2026-11-19 - GitHub - PyPI

Fixes

  • draft n-gram by default only when a decode step fits the CUDA-graph ceiling

    agilerl.arena.memory.resolve.rollout.drafts_by_default takes a required max_num_seqs argument. A multi-turn engine drafts by default only when max_num_seqs * (1 + num_speculative_tokens) is at most NGRAM_DRAFT_MAX_DECODE_TOKENS (512, the default CUDA-graph capture ceiling). Wider engines run past the captured graphs and past the rejection-sampler memory reserved at start-up. The memory estimator uses that width. SplitWorkload takes a required slot_group_size, the highest group_size hyperparameter search can reach. When max_num_seqs is omitted, generation timing prices drafting from the prompts on one engine times slot_group_size. A pinned max_num_seqs is kept.

  • use usable B300 memory and SM 10.3 for B300/GB300

    Size B300 at 269 GiB, NVIDIA's full-GPU MIG profile, instead of the 288 GB physical HBM3e, and report compute capability 10.3 for B300 and GB300. Tests cover each Blackwell data-centre GPU and the nvidia.com/gpu.product node labels the NVIDIA GPU Operator sets.

  • use the default Arena URL when the Snowflake app's configure gets a NULL base URL

    The Snowflake Native App's configure procedure now falls back to https://arena.agilerl.com when the base URL is NULL, since Snowflake does not apply a procedure's default argument for an explicit NULL.

  • quiet colocated vLLM init logs and OpenEnv disconnect tracebacks

    Colocated vLLM startup logs its init order, batched-token settings, and how many LoRA slots stayed resident at debug instead of as Python warnings. If LoRA is enabled and no slot could be kept resident, it logs a warning that the rollout adapter may not affect generation.

    Mamba models log a warning when incompatible LoRA target modules or parameters are dropped. CUDA memory snapshots log at debug.

    The OpenEnv server no longer reports a client that closed its session as an ASGI error traceback. That case is one debug line. Other environment errors are still logged.

  • pass trainable expert-parallel params as leaf views

    Expert-parallel training with LoRA on packed experts no longer clones each MoE layer's trainable expert adapters for the local kernel. The kernel receives detached views of the local shards, and a post-accumulate hook moves each leaf's grad onto the sharded parameter and clears the leaf's own grad. This removes two adapter-sized copies per layer per forward that stayed on the GPU until backward; on a 30B-class MoE DPO run on 8x L4 peak memory fell from 20.2 GiB to 17.7 GiB.

Breaking Changes

  • reject deprecated models and drop resource class from submit

    Submitting a deprecated catalog model fails, the same as a preview model. arena manifest validate still warns.

    to_payload keeps the model id, context length, and lora_config only under network. A LoRA config written only on the algorithm is moved to network.lora_config. An explicit null on the algorithm is left off the payload, the same as omitting the key. That algorithm copy is checked against the catalog (rank, module names, tower modules, and expert paths) before the two sections are compared. Catalog defaults, including packed-MoE target_parameters, are applied as part of that check.

    ArenaClient.submit_experiment and ArenaTrainer.train no longer accept resource_id or num_nodes. train takes num_gpus and gpu_type. arena experiments submit no longer has --resource-id or --num-nodes. With no GPU flags, Arena picks the cheapest layout that fits. With --num-gpus and --gpu-type, it keeps only a layout the memory estimate fits.

Full Changelog: agilerl-arena/v1.41.0...agilerl-arena/v1.42.0

agilerl-arena/v1.41.0: agilerl-arena v1.41.0: stop the Snowflake Native App when an unpurchased listing trial ends

Released on 2026-11-18 - GitHub - PyPI

Features

  • stop the Snowflake Native App when an unpurchased listing trial ends

    An install of the paid Snowflake Marketplace listing that is still unpurchased
    7 days less one hour after install can no longer submit training runs or
    publish models; each call is refused with a message to purchase the listing.
    The app's hourly task also drops every running training job and inference
    service of such an install, one task interval before the listing's 7-day
    Snowflake trial ends. Purchase is read through a secure function, because
    SYSTEM$IS_LISTING_PURCHASED() called directly from app code returns TRUE during
    a trial. Installs that are not from a listing are never stopped.

Fixes

  • open one Snowflake deployment per served model

    The Snowflake Native App no longer opens two Arena deployments for one served model when the hourly usage task runs while publish is still waiting for the service. Both paths now claim the service's deployment row with a single MERGE and reuse an open deployment, re-sending Arena the same open, so a served model's hours are billed once.

Other

  • Snowflake Native App: no background activity while idle, and clearer GPU-family errors

    The Snowflake Native App no longer runs anything in the background while no jobs or served models exist: its hourly billing task suspends itself after the last run is billed and resumes on the next submit or serve, and GPU pools left with no work are suspended. A new app_code.gpu_families() procedure lists the GPU families usable in your account, and set_pools and submit accept only GPU families whose per-node GPU count in your region matches Arena's sizing, naming the usable families when one isn't.

Full Changelog: agilerl-arena/v1.40.0...agilerl-arena/v1.41.0

v2.67.0: messages segment rows for the traces dataset format

Released on 2026-11-18 - GitHub - PyPI

Features

  • messages segment rows for the traces dataset format

    A traces row is one append-only stretch of a session in messages. An assistant message is a training target unless it has weight: 0 (OpenAI chat fine-tuning semantics; a missing weight means 1), which marks context such as an inserted or inherited message. call_ids is lineage only. A turn whose finish_reasons entry is length is not a target. Each assistant message's tool calls must be answered before the next one, except the final message's. Two assistant messages in a row are allowed only when the later one has weight: 0.

    Training expands a segment into one prompt and completion per target turn, in memory. OPD and OPSD roll out each turn, and the self-distillation reference is that turn's message. SFT trains a segment in one render with the loss on every target turn. When the chat template renders earlier turns differently once later ones follow, SFT trains the expanded turns instead and warns once.

    completion_token_ids and completion_logprobs hold optional per-turn sampled tokens and logprobs, null on weight-0 turns, and training ignores them. Every nested column may be JSON text or a native value. encode_sft_row takes a skipped argument, and an optional skipped_turns column lists a row's assistant messages that do not train, so generic SFT still trains every assistant turn.

    A prompt/completion pair is an upload shape that Arena converts to a segment on import. The trainer drops pair rows and raises when no row of the split is a segment. validate_traces_rows checks a pair as the segment it becomes, see pair_as_segment, which marks the prompt's assistant messages weight: 0 and drops any call_ids or finish_reasons already on the pair row; it reports every bad row, including rows in neither shape. Expansion strips weight before a rollout serves the messages. traces_format.WEIGHT names the key. agilerl.arena.traces_format defines the segment columns, PAIR_COLUMNS, input_shape, SNAPSHOT_SEGMENTS_FILE and the snapshot manifest's turn_count. TracesRow and TracesMessagesRow are removed in favour of TracesSegmentRow.

Fixes

  • show consumers a procedure's error message without the app's stack

    The Snowflake Native App's procedures now return a refused call's message to the consumer without the Python traceback and app file paths around it.

Other

  • Speed up LLM memory estimates

    The training-memory search probes fewer micro-batch sizes, skips speed settings that cannot beat a plan already found, stops early when host RAM cannot hold the fixed trainer bytes with the safety buffer at any layout, and caches parallel layouts and LoRA and FSDP sizes. Predicted fit and step time are unchanged.

  • Snowflake Native App: log each billing run's summary, and let app admins trigger a billing run with app_code.reconcile_now()

    Each billing run logs one INFO summary, including a run that bills nothing and a run that does nothing because Arena is not configured. The summary includes a skipped count for usage items held until their next daily read.

    app_admin calls app_code.reconcile_now() to queue the billing task. The queued run starts after any run already in progress. app_code.reconcile_usage() stays callable only from that task.

  • Name the Snowflake Native App's account objects per install

    Two installs of the Snowflake Native App in one account no longer collide. The app's warehouse, external access integrations and compute pools are now named after the application (AGILERL_APP_<APP>_...), so a second install or a reinstall before the old app is dropped sets up cleanly. Upgraded installs keep their previous objects until the app is dropped; see the app README.

Full Changelog: v2.66.0...v2.67.0

agilerl-arena/v1.40.0: agilerl-arena v1.40.0: messages segment rows for the traces dataset format

Released on 2026-11-18 - GitHub - PyPI

Features

  • messages segment rows for the traces dataset format

    A traces row is one append-only stretch of a session in messages. An assistant message is a training target unless it has weight: 0 (OpenAI chat fine-tuning semantics; a missing weight means 1), which marks context such as an inserted or inherited message. call_ids is lineage only. A turn whose finish_reasons entry is length is not a target. Each assistant message's tool calls must be answered before the next one, except the final message's. Two assistant messages in a row are allowed only when the later one has weight: 0.

    Training expands a segment into one prompt and completion per target turn, in memory. OPD and OPSD roll out each turn, and the self-distillation reference is that turn's message. SFT trains a segment in one render with the loss on every target turn. When the chat template renders earlier turns differently once later ones follow, SFT trains the expanded turns instead and warns once.

    completion_token_ids and completion_logprobs hold optional per-turn sampled tokens and logprobs, null on weight-0 turns, and training ignores them. Every nested column may be JSON text or a native value. encode_sft_row takes a skipped argument, and an optional skipped_turns column lists a row's assistant messages that do not train, so generic SFT still trains every assistant turn.

    A prompt/completion pair is an upload shape that Arena converts to a segment on import. The trainer drops pair rows and raises when no row of the split is a segment. validate_traces_rows checks a pair as the segment it becomes, see pair_as_segment, which marks the prompt's assistant messages weight: 0 and drops any call_ids or finish_reasons already on the pair row; it reports every bad row, including rows in neither shape. Expansion strips weight before a rollout serves the messages. traces_format.WEIGHT names the key. agilerl.arena.traces_format defines the segment columns, PAIR_COLUMNS, input_shape, SNAPSHOT_SEGMENTS_FILE and the snapshot manifest's turn_count. TracesRow and TracesMessagesRow are removed in favour of TracesSegmentRow.

Other

  • Snowflake Native App: log each billing run's summary, and let app admins trigger a billing run with app_code.reconcile_now()

    Each billing run logs one INFO summary, including a run that bills nothing and a run that does nothing because Arena is not configured. The summary includes a skipped count for usage items held until their next daily read.

    app_admin calls app_code.reconcile_now() to queue the billing task. The queued run starts after any run already in progress. app_code.reconcile_usage() stays callable only from that task.

  • Name the Snowflake Native App's account objects per install

    Two installs of the Snowflake Native App in one account no longer collide. The app's warehouse, external access integrations and compute pools are now named after the application (AGILERL_APP_<APP>_...), so a second install or a reinstall before the old app is dropped sets up cleanly. Upgraded installs keep their previous objects until the app is dropped; see the app README.

Full Changelog: agilerl-arena/v1.39.2...agilerl-arena/v1.40.0

agilerl-arena/v1.39.2: agilerl-arena v1.39.2: Speed up LLM memory estimates

Released on 2026-11-18 - GitHub - PyPI

Other

  • Speed up LLM memory estimates

    The training-memory search probes fewer micro-batch sizes, skips speed settings that cannot beat a plan already found, stops early when host RAM cannot hold the fixed trainer bytes with the safety buffer at any layout, and caches parallel layouts and LoRA and FSDP sizes. Predicted fit and step time are unchanged.

Full Changelog: agilerl-arena/v1.39.1...agilerl-arena/v1.39.2

agilerl-arena/v1.39.1: agilerl-arena v1.39.1: show consumers a procedure’s error message without the app’s stack

Released on 2026-11-17 - GitHub - PyPI

Fixes

  • show consumers a procedure's error message without the app's stack

    The Snowflake Native App's procedures now return a refused call's message to the consumer without the Python traceback and app file paths around it.

Full Changelog: agilerl-arena/v1.39.0...agilerl-arena/v1.39.1

v2.66.0: size vLLM serving engines from the memory estimator

Released on 2026-11-17 - GitHub - PyPI

Features

  • add the Arena Snowflake Native App and bill runs and served models

    Add a Snowflake Native App for training, publishing, and serving in the buyer's account, and bill that usage through Snowflake.

    The manifest requests compute pool, warehouse, service endpoint, external access, and task privileges. It declares two read-only references, one table and one view, and the trainer image. The setup script creates the application roles, the stateful app_state schema, Hugging Face and Arena egress, and the agilerl_app_ integrations. Setup fails if either integration name is already in the account and the app does not own it.

    Procedures configure Arena credentials, create compute pools, and submit, inspect, cancel, publish, and unpublish runs. A run is recorded for billing before its services start. The head opens the Arena run with channel native_app.

    An hourly task reads Arena billable hours and emits one ARENA_USAGE event per charged hour. Served models are metered as Arena deployments: a heartbeat while the service is running, a close when it is suspended or dropped, and a new deployment when it resumes. A refused open drops the service.

    agilerl-arena can target those app objects. Secret, service, and profile calls take a schema. secret_statements takes the schema as its first argument.

  • refuse unpriced GPU families before a Native App run starts

    The Snowflake Native App's submit now reads features.snowflakePricedGpuFamilies from Arena's capabilities and refuses a GPU family Arena has no price for before any service starts; with no family named it picks only from priced pools. configure lists the priced families. Adds agilerl.arena.snowflake.license.snowflake_priced_families.

Fixes

  • missing Snowflake budget, broker memory limit, and leftover GPU pools

    Snowflake setup continues on a fresh account when the GPU budget is missing. Snowflake reports that call as "unknown user-defined function", and Arena treats that phrase as a missing object. Privilege errors still raise.

    The Pulsar broker sizes its heap and caches from /sys/fs/cgroup/memory.max when the file is a byte count. A missing file, or text that is not a number (including the literal max), uses the broker pool family recorded on the job. That is the family setup chose. CPU_X64_L is 116 GiB. A smaller family, such as CPU_X64_S at 13 GiB, gets that node's share of the same split.

    Teardown of an Arena database also drops compute pools whose names start with ARENA_GPU_ when setup.json does not list them, including an older ARENA_GPU_POOL. Other pool names stay. When the database named arena is not an Arena account, those extra GPU pools stay too.

  • load embedding LoRA and tied lm_head tensors in replay merge

    Replay merge from a PEFT adapter directory now maps embedding ParameterDict keys (lora_embedding_A without a trailing .weight) and consumes a tied lm_head.base_layer.weight. Checkpoints that adapt embed_tokens and lm_head no longer fail with leftover adapter tensors. Unknown leftover keys still raise with the adapter path in the message.

  • join traces text parts and train SFT after the rollout prompt

    A list of text content parts is joined with newlines before the chat template runs. Non-text parts raise. Assistant and tool content must be a string; system, developer, and user messages may still use parts.

    For a prompt/completion row, the SFT context is that prompt rendered with the generation prompt, which is the text a rollout samples the completion after. A template that rewrites earlier turns once a later turn is present no longer trains against that rewrite. Encoding raises when the trained turn does not start where the generation prompt ends.

    A chat template that reads no reasoning key drops assistant reasoning from the trained turn and from the reference, and warns once. The reference keeps an open <think> opener when the generation prompt prefills one.

    check_traces_render checks a sample of rows. It raises when a completion has reasoning but the generation prompt closes the thinking block, when a tool call's arguments are rendered as an escaped JSON string, or when the prompt render is not a token prefix of the SFT context.

  • price cross-node weight sync at the measured TCP rate and keep merged weights off TCP

    The memory planner's cross-node tcp weight-sync rate (LINK_EGRESS_BYTES_PER_SECOND["tcp"]) moves from 0.4 to 6.8 GB/s, measured for NIXL READs through 8 parallel streams with 2 MB UCX TCP segments between two 8x H100 nodes. Over tcp, weight_sync_modes now prices the adapter only: merged-weight sync over TCP has not been measured, and at the new rate the planner would otherwise pick it for several models.

  • price optimizer-on-CPU in seconds and measure the H100 routed-chunk cost

    The memory planner's learn-step time model now charges fsdp.optim_cpu_offload 0.157 s per GiB of each rank's AdamW state per optimizer step on Hopper GPUs, measured on H100 with Qwen3.6-35B-A3B and Nemotron-3.5-Lightning-30B-A3B. The cost is added in seconds to the predicted learn time of each GPU split. Small routed-expert chunks on Hopper now cost 7.3 token-equivalents each, measured on Nemotron-3.5-Super-VL-120B, where 64 MiB chunks learn about 20% slower than 512 MiB.

  • read the Nemotron Omni projector's text width from text_config or llm_config

    ModelArch.from_hf_config parsed the Nemotron Omni (RADIO) vision tower's projector width from llm_config only. A loaded model's config.to_dict() names that section text_config, so parsing a live model's config raised KeyError: 'llm_config'. It now reads text_config, else llm_config.

  • grant served-model endpoint access, refuse non-listing billing, and log procedures

    A served model returned 401 when requesting an endpoint token, because only the application could use the service endpoints. After a publish that starts a service, the app grants that service's ALL_ENDPOINTS_USAGE role to the application role app_user, then opens the deployment. Each hourly run grants the same role on every live served service, and skips a service that run just dropped.

    An application that is not installed from a listing (Snowflake error 090898) is a documented billing refusal. The hours are deleted, the reason is stored on the usage item, and the hourly summary does not count them as unconfirmed.

    Procedure log records from agilerl.arena propagate to the root logger, so Snowflake writes them to the active event table at the manifest log level.

Breaking Changes

  • size vLLM serving engines from the memory estimator

    size_serving_engine returns the widest vLLM tensor-parallel width up to the node's GPU count that attention, Mamba and (for Qwen3.5) vision heads split over. The result says whether that engine fits, how many full-context sequences it holds, and why it misses.

    arena agent deploy takes --num-gpus and --gpu-type for LLM agents. ArenaClient.deploy_agent sends them as numGpus and gpuType.

    arena memory keeps estimate and solve max_model_len.

    BREAKING CHANGE: removed arena memory solve --inference and its options, arena memory solve max_num_seqs, --gen-gpu / --gen-device-gb, solve_inference, the gen_device parameter of run_config_from_manifest and estimate_manifest, and python -m agilerl.arena.memory.

  • train GLM-5.3 and MiMo-V2.6 with images; vision towers stay frozen

    GLM-5.3 and MiMo-V2.6 train with images. LoRA targets the language model on every vision-language family, and the vision towers stay frozen. lora_tower_target_modules on the LLM algorithms and tower_target_modules in the Arena LoRA config are removed.

    GLM image features take one patch-grid row per image. On a rank with no images, the filler tower's output is multiplied by zero and added to the decoder inputs. MiMo loads as a vision-language model, including its processor.

    Each architecture family is a subpackage of agilerl.architectures and declares FAMILY. An unknown model_type raises ValueError. The old per-family module paths and *_RUNTIME_CONFIG names are gone.

    The memory estimator in agilerl-arena sizes both towers, tensor-parallel splits, and the GLM token-budget resize, and drops its tower LoRA terms.

Other

  • Log learn-step phase progress at debug level

    PhaseTimer now writes debug log lines while a timing window is open: when the window starts, the first time each phase is marked, then at most once every 30 seconds of host time, and the total host time when the window closes. A long LLM learn step now shows which phase it last finished instead of staying silent until it ends. The per-phase seconds it returns are unchanged.

  • run affected tests per push and the full matrix before merge

    Hub dispatches choose a scope. affected runs only the test files the diff reaches, using the last full run's per-test coverage map, on Linux 3.13 CPU and GPU plus ty. full runs Linux, macOS, Windows, ty and CodeQL with more, shorter shards. A nightly run covers GPU and macOS on every Python. Fork pull requests skip the self-hosted GPU job. The coverage combine runs only after the CPU and GPU jobs both succeed.

Full Changelog: v2.65.0...v2.66.0

agilerl-arena/v1.39.0: agilerl-arena v1.39.0: size vLLM serving engines from the memory estimator

Released on 2026-11-17 - GitHub - PyPI

Features

  • add the Arena Snowflake Native App and bill runs and served models

    Add a Snowflake Native App for training, publishing, and serving in the buyer's account, and bill that usage through Snowflake.

    The manifest requests compute pool, warehouse, service endpoint, external access, and task privileges. It declares two read-only references, one table and one view, and the trainer image. The setup script creates the application roles, the stateful app_state schema, Hugging Face and Arena egress, and the agilerl_app_ integrations. Setup fails if either integration name is already in the account and the app does not own it.

    Procedures configure Arena credentials, create compute pools, and submit, inspect, cancel, publish, and unpublish runs. A run is recorded for billing before its services start. The head opens the Arena run with channel native_app.

    An hourly task reads Arena billable hours and emits one ARENA_USAGE event per charged hour. Served models are metered as Arena deployments: a heartbeat while the service is running, a close when it is suspended or dropped, and a new deployment when it resumes. A refused open drops the service.

    agilerl-arena can target those app objects. Secret, service, and profile calls take a schema. secret_statements takes the schema as its first argument.

  • refuse unpriced GPU families before a Native App run starts

    The Snowflake Native App's submit now reads features.snowflakePricedGpuFamilies from Arena's capabilities and refuses a GPU family Arena has no price for before any service starts; with no family named it picks only from priced pools. configure lists the priced families. Adds agilerl.arena.snowflake.license.snowflake_priced_families.

Fixes

  • missing Snowflake budget, broker memory limit, and leftover GPU pools

    Snowflake setup continues on a fresh account when the GPU budget is missing. Snowflake reports that call as "unknown user-defined function", and Arena treats that phrase as a missing object. Privilege errors still raise.

    The Pulsar broker sizes its heap and caches from /sys/fs/cgroup/memory.max when the file is a byte count. A missing file, or text that is not a number (including the literal max), uses the broker pool family recorded on the job. That is the family setup chose. CPU_X64_L is 116 GiB. A smaller family, such as CPU_X64_S at 13 GiB, gets that node's share of the same split.

    Teardown of an Arena database also drops compute pools whose names start with ARENA_GPU_ when setup.json does not list them, including an older ARENA_GPU_POOL. Other pool names stay. When the database named arena is not an Arena account, those extra GPU pools stay too.

  • load embedding LoRA and tied lm_head tensors in replay merge

    Replay merge from a PEFT adapter directory now maps embedding ParameterDict keys (lora_embedding_A without a trailing .weight) and consumes a tied lm_head.base_layer.weight. Checkpoints that adapt embed_tokens and lm_head no longer fail with leftover adapter tensors. Unknown leftover keys still raise with the adapter path in the message.

  • join traces text parts and train SFT after the rollout prompt

    A list of text content parts is joined with newlines before the chat template runs. Non-text parts raise. Assistant and tool content must be a string; system, developer, and user messages may still use parts.

    For a prompt/completion row, the SFT context is that prompt rendered with the generation prompt, which is the text a rollout samples the completion after. A template that rewrites earlier turns once a later turn is present no longer trains against that rewrite. Encoding raises when the trained turn does not start where the generation prompt ends.

    A chat template that reads no reasoning key drops assistant reasoning from the trained turn and from the reference, and warns once. The reference keeps an open <think> opener when the generation prompt prefills one.

    check_traces_render checks a sample of rows. It raises when a completion has reasoning but the generation prompt closes the thinking block, when a tool call's arguments are rendered as an escaped JSON string, or when the prompt render is not a token prefix of the SFT context.

  • price cross-node weight sync at the measured TCP rate and keep merged weights off TCP

    The memory planner's cross-node tcp weight-sync rate (LINK_EGRESS_BYTES_PER_SECOND["tcp"]) moves from 0.4 to 6.8 GB/s, measured for NIXL READs through 8 parallel streams with 2 MB UCX TCP segments between two 8x H100 nodes. Over tcp, weight_sync_modes now prices the adapter only: merged-weight sync over TCP has not been measured, and at the new rate the planner would otherwise pick it for several models.

  • price optimizer-on-CPU in seconds and measure the H100 routed-chunk cost

    The memory planner's learn-step time model now charges fsdp.optim_cpu_offload 0.157 s per GiB of each rank's AdamW state per optimizer step on Hopper GPUs, measured on H100 with Qwen3.6-35B-A3B and Nemotron-3.5-Lightning-30B-A3B. The cost is added in seconds to the predicted learn time of each GPU split. Small routed-expert chunks on Hopper now cost 7.3 token-equivalents each, measured on Nemotron-3.5-Super-VL-120B, where 64 MiB chunks learn about 20% slower than 512 MiB.

  • read the Nemotron Omni projector's text width from text_config or llm_config

    ModelArch.from_hf_config parsed the Nemotron Omni (RADIO) vision tower's projector width from llm_config only. A loaded model's config.to_dict() names that section text_config, so parsing a live model's config raised KeyError: 'llm_config'. It now reads text_config, else llm_config.

  • grant served-model endpoint access, refuse non-listing billing, and log procedures

    A served model returned 401 when requesting an endpoint token, because only the application could use the service endpoints. After a publish that starts a service, the app grants that service's ALL_ENDPOINTS_USAGE role to the application role app_user, then opens the deployment. Each hourly run grants the same role on every live served service, and skips a service that run just dropped.

    An application that is not installed from a listing (Snowflake error 090898) is a documented billing refusal. The hours are deleted, the reason is stored on the usage item, and the hourly summary does not count them as unconfirmed.

    Procedure log records from agilerl.arena propagate to the root logger, so Snowflake writes them to the active event table at the manifest log level.

Breaking Changes

  • size vLLM serving engines from the memory estimator

    size_serving_engine returns the widest vLLM tensor-parallel width up to the node's GPU count that attention, Mamba and (for Qwen3.5) vision heads split over. The result says whether that engine fits, how many full-context sequences it holds, and why it misses.

    arena agent deploy takes --num-gpus and --gpu-type for LLM agents. ArenaClient.deploy_agent sends them as numGpus and gpuType.

    arena memory keeps estimate and solve max_model_len.

    BREAKING CHANGE: removed arena memory solve --inference and its options, arena memory solve max_num_seqs, --gen-gpu / --gen-device-gb, solve_inference, the gen_device parameter of run_config_from_manifest and estimate_manifest, and python -m agilerl.arena.memory.

  • train GLM-5.3 and MiMo-V2.6 with images; vision towers stay frozen

    GLM-5.3 and MiMo-V2.6 train with images. LoRA targets the language model on every vision-language family, and the vision towers stay frozen. lora_tower_target_modules on the LLM algorithms and tower_target_modules in the Arena LoRA config are removed.

    GLM image features take one patch-grid row per image. On a rank with no images, the filler tower's output is multiplied by zero and added to the decoder inputs. MiMo loads as a vision-language model, including its processor.

    Each architecture family is a subpackage of agilerl.architectures and declares FAMILY. An unknown model_type raises ValueError. The old per-family module paths and *_RUNTIME_CONFIG names are gone.

    The memory estimator in agilerl-arena sizes both towers, tensor-parallel splits, and the GLM token-budget resize, and drops its tower LoRA terms.

Other

  • Log learn-step phase progress at debug level

    PhaseTimer now writes debug log lines while a timing window is open: when the window starts, the first time each phase is marked, then at most once every 30 seconds of host time, and the total host time when the window closes. A long LLM learn step now shows which phase it last finished instead of staying silent until it ends. The per-phase seconds it returns are unchanged.

  • run affected tests per push and the full matrix before merge

    Hub dispatches choose a scope. affected runs only the test files the diff reaches, using the last full run's per-test coverage map, on Linux 3.13 CPU and GPU plus ty. full runs Linux, macOS, Windows, ty and CodeQL with more, shorter shards. A nightly run covers GPU and macOS on every Python. Fork pull requests skip the self-hosted GPU job. The coverage combine runs only after the CPU and GPU jobs both succeed.

Full Changelog: agilerl-arena/v1.38.0...agilerl-arena/v1.39.0

v2.65.0: train chat-format preference rows

Released on 2026-11-16 - GitHub - PyPI

Features

  • add Nebius catalog credentials and keep recovered project ids out of Terraform

    The Nebius cluster module creates a catalog service account, an inline access key, and a tenant editors group. Register stores the access key id, secret, and group id together, and arena cluster status redacts the secret. When an install package includes both catalog env files, register applies the arena-byoc-catalog-credentials Secret before the agent chart.

    Project, storage-project, and subnet ids loaded from the stored cluster config are not written to Terraform variables. Ids set in the spec still are, so a later plan does not destroy projects the module created.

  • let OPD train over dataset rows without a reward file

    An OPD manifest over dataset rows may now leave environment.rubric_file_path unset; every turn then scores 0 and the update is the teacher's per-token gap alone.

    • agilerl.llm_envs.rubrics.ZeroReward: a rubric that scores every turn 0.
    • TrainingManifest requires rubric_file_path for a dataset-backed rollout unless the algorithm is OPD. LLMEnvSpec on its own no longer checks it.
    • LLMEnvSpec rejects rubric_name / reward_fn_name without rubric_file_path.
    • arena snowflake submit requires --reward-file when the manifest names a rubric. OPD may omit it only when no rubric is named; every turn then scores 0.
  • traces dataset format for SFT and on-policy distillation

    Adds a traces dataset format: recorded model calls as OpenAI Chat Completions messages in TRL prompt-completion rows (prompt, a one-message completion, optional tools). One dataset trains both SFT (loss on the completion only) and on-policy distillation, including self-distillation where the teacher's reference is the row's completion rendered with the student's chat template.

    • agilerl.arena.models.traces: pydantic row models and a validator for JSONL and parquet files that reports bad rows by number.
    • agilerl.arena.traces_format: the shared column, score and snapshot manifest names, with read_manifest / write_manifest.
    • ArenaClient.create_dataset(category="traces") and arena datasets create --category traces need no column mapping and validate the file before upload.
    • Manifest environment.dataset_format: traces for rollout and SFT dataset environments.
    • agilerl.llm_envs.traces: render a row's prompt and reference; DatasetEnv(completion_only_loss=True).
    • agilerl requires agilerl-arena>=1.37.0.
  • upgrade a BYOC agent chart without rotating credentials

    arena cluster upgrade upgrades the agent chart Arena would ship now on a registered cluster. It finds the agent Helm release already installed, fetches Helm values, downloads the install package, and runs helm upgrade on that release. It does not install a second agent. Credential Secrets shipped in that package are not applied, and the storage chart is not installed or upgraded. When the chart will not recreate the object-storage Secret, storage.endpoint is copied into that Secret.

  • report why a memory tier misses and when host RAM limited it

    TierCheck gains failure and host_limited.

    failure is gpu_memory, host_memory, or other, and is None when the tier fits. host_limited is true when training missed the host share or only fitted after re-pricing for it, including on a fit. The reason string, fits, and predicted bytes are unchanged.

    A split search that finds no layout raises SplitSearchError, a ValueError, with that same kind. TrainingMemoryUnfitError.failure is gpu_memory or host_memory when nothing fits at the lightest settings.

Breaking Changes

  • train chat-format preference rows

    DPO can train preference rows whose prompt, chosen, and rejected fields are chat messages, with an optional tools column. Each side is encoded as the shared prompt plus that side. The loss mask is that side's assistant tokens after the prompt, so reasoning and tool calls are trained. Tool results, and assistant turns inside the prompt, stay context.

    When a chat pair exceeds max_context_length, shared leading messages move into the prompt, then whole prompt messages are dropped from the front. System messages and the first user message stay. The oldest tool results go first, then the oldest turns. Completions are not cut. A pair is left out only when a completion alone does not fit.

    PreferencePrompts.prompt_lengths is removed. Batches carry chosen_loss_mask and rejected_loss_mask. String rows still mask the completion after the prompt. Training reports chosen_length, rejected_length, and length_margin.

    The chat-transcript encoder shared by SFT and DPO moves from agilerl.llm_envs.dataset_env to agilerl.llm_envs.chat_transcript.

    An earlier assistant turn that only calls a tool, with a user message after it, is now encoded correctly. Before, such SFT and DPO rows were dropped as invalid when the generation prompt opened a think block. End-of-training completion samples now work for chat preference rows.

  • skip unneeded no-grad rows and require rollout log-probs in LLMPPO and LLMREINFORCE

    LLMPPO and LLMREINFORCE now take the old policy from rollout sampling log-probs and run only the learn-start no-grad rows the update reads: reference rows when beta != 0 and critic rows for LLMPPO. Both raise ValueError on every rank when any row lacks a sampling log-prob on an action token. GRPO keeps its per-row fallback.

    The agilerl-arena GPU split resolver prices learn passes per algorithm and scales update passes with update_epochs, and the memory estimate drops the LLMREINFORCE no-grad pass at beta=0. At beta=0, the kl metric is NaN for both algorithms.

Full Changelog: v2.64.0...v2.65.0

agilerl-arena/v1.38.0: agilerl-arena v1.38.0: train chat-format preference rows

Released on 2026-11-16 - GitHub - PyPI

Features

  • add Nebius catalog credentials and keep recovered project ids out of Terraform

    The Nebius cluster module creates a catalog service account, an inline access key, and a tenant editors group. Register stores the access key id, secret, and group id together, and arena cluster status redacts the secret. When an install package includes both catalog env files, register applies the arena-byoc-catalog-credentials Secret before the agent chart.

    Project, storage-project, and subnet ids loaded from the stored cluster config are not written to Terraform variables. Ids set in the spec still are, so a later plan does not destroy projects the module created.

  • let OPD train over dataset rows without a reward file

    An OPD manifest over dataset rows may now leave environment.rubric_file_path unset; every turn then scores 0 and the update is the teacher's per-token gap alone.

    • agilerl.llm_envs.rubrics.ZeroReward: a rubric that scores every turn 0.
    • TrainingManifest requires rubric_file_path for a dataset-backed rollout unless the algorithm is OPD. LLMEnvSpec on its own no longer checks it.
    • LLMEnvSpec rejects rubric_name / reward_fn_name without rubric_file_path.
    • arena snowflake submit requires --reward-file when the manifest names a rubric. OPD may omit it only when no rubric is named; every turn then scores 0.
  • traces dataset format for SFT and on-policy distillation

    Adds a traces dataset format: recorded model calls as OpenAI Chat Completions messages in TRL prompt-completion rows (prompt, a one-message completion, optional tools). One dataset trains both SFT (loss on the completion only) and on-policy distillation, including self-distillation where the teacher's reference is the row's completion rendered with the student's chat template.

    • agilerl.arena.models.traces: pydantic row models and a validator for JSONL and parquet files that reports bad rows by number.
    • agilerl.arena.traces_format: the shared column, score and snapshot manifest names, with read_manifest / write_manifest.
    • ArenaClient.create_dataset(category="traces") and arena datasets create --category traces need no column mapping and validate the file before upload.
    • Manifest environment.dataset_format: traces for rollout and SFT dataset environments.
    • agilerl.llm_envs.traces: render a row's prompt and reference; DatasetEnv(completion_only_loss=True).
    • agilerl requires agilerl-arena>=1.37.0.
  • upgrade a BYOC agent chart without rotating credentials

    arena cluster upgrade upgrades the agent chart Arena would ship now on a registered cluster. It finds the agent Helm release already installed, fetches Helm values, downloads the install package, and runs helm upgrade on that release. It does not install a second agent. Credential Secrets shipped in that package are not applied, and the storage chart is not installed or upgraded. When the chart will not recreate the object-storage Secret, storage.endpoint is copied into that Secret.

  • report why a memory tier misses and when host RAM limited it

    TierCheck gains failure and host_limited.

    failure is gpu_memory, host_memory, or other, and is None when the tier fits. host_limited is true when training missed the host share or only fitted after re-pricing for it, including on a fit. The reason string, fits, and predicted bytes are unchanged.

    A split search that finds no layout raises SplitSearchError, a ValueError, with that same kind. TrainingMemoryUnfitError.failure is gpu_memory or host_memory when nothing fits at the lightest settings.

Breaking Changes

  • train chat-format preference rows

    DPO can train preference rows whose prompt, chosen, and rejected fields are chat messages, with an optional tools column. Each side is encoded as the shared prompt plus that side. The loss mask is that side's assistant tokens after the prompt, so reasoning and tool calls are trained. Tool results, and assistant turns inside the prompt, stay context.

    When a chat pair exceeds max_context_length, shared leading messages move into the prompt, then whole prompt messages are dropped from the front. System messages and the first user message stay. The oldest tool results go first, then the oldest turns. Completions are not cut. A pair is left out only when a completion alone does not fit.

    PreferencePrompts.prompt_lengths is removed. Batches carry chosen_loss_mask and rejected_loss_mask. String rows still mask the completion after the prompt. Training reports chosen_length, rejected_length, and length_margin.

    The chat-transcript encoder shared by SFT and DPO moves from agilerl.llm_envs.dataset_env to agilerl.llm_envs.chat_transcript.

    An earlier assistant turn that only calls a tool, with a user message after it, is now encoded correctly. Before, such SFT and DPO rows were dropped as invalid when the generation prompt opened a think block. End-of-training completion samples now work for chat preference rows.

  • skip unneeded no-grad rows and require rollout log-probs in LLMPPO and LLMREINFORCE

    LLMPPO and LLMREINFORCE now take the old policy from rollout sampling log-probs and run only the learn-start no-grad rows the update reads: reference rows when beta != 0 and critic rows for LLMPPO. Both raise ValueError on every rank when any row lacks a sampling log-prob on an action token. GRPO keeps its per-row fallback.

    The agilerl-arena GPU split resolver prices learn passes per algorithm and scales update passes with update_epochs, and the memory estimate drops the LLMREINFORCE no-grad pass at beta=0. At beta=0, the kl metric is NaN for both algorithms.

Full Changelog: agilerl-arena/v1.37.0...agilerl-arena/v1.38.0

v2.64.0: run Snowflake training from an in-account broker

Released on 2026-11-13 - GitHub - PyPI

Fixes

  • reject hyperparameter mutation ranges outside the field limits

    Algorithm hyperparameters that live in a real range publish a minimum and a maximum on the training-manifest schema. Temperature and top-p must be above 0. Tau and learning rates must be above 0, and tau is at most 1. Presence and frequency penalties run from -2 to 2. A completion cap must be at least 1 and less than the model context length. LLM update epochs are at most 10. On-policy distillation temperature stays at 1. Ornstein-Uhlenbeck noise is rejected when theta times the timestep is above 1. An HPO mutation window that leaves those field limits is rejected. Counts, context length, and trainer settings with no enforced ceiling stay open on that side.

  • reshard FSDP units before exporting or importing optimizer state

    With reshard_after_forward=False, a forward pass with no backward (for example an LLM algorithm's test(), which runs learn under no_grad) leaves FSDP2 units unsharded. named_parameters() then returns the gathered tensors rather than the sharded parameters the optimizer holds, so get_optimizer_state_dict raised KeyError: 0 when saving a checkpoint with optimizer state, and optimizer resume failed the same lookup.

    FSDPRuntime.export_optimizer_state and FSDPRuntime.import_optimizer_state now reshard the actor first. A new multi-process test covers export and resume after a no-grad forward under FSDP with tensor parallelism and LoRA.

Breaking Changes

  • run Snowflake training from an in-account broker

    arena snowflake setup creates the account objects, copies the trainer image, and checks the GPU driver. The pools are arena_pulsar_pool, arena_head_pool, and one GPU pool per family. Setup removes the Pulsar external access integration, stores the Arena org key and external user id as Snowflake secrets, and opens arena_api_eai to one Arena host. Hugging Face egress stays.

    arena snowflake check records the image tag. invite grants arena_trainer. join writes a local login. pools lists pools or sets a GPU cap.

    arena snowflake submit starts three job services only when Arena reports Snowflake training: a Pulsar broker, a CPU Ray head, and GPU workers. --gpus is required. With no --gpu-family, submit picks the smallest GPU memory whose GPUs per node divide --gpus and that fits the manifest.

    These submit flags are removed: --compute-pool, --nodes, --pulsar-url, --pulsar-topic-prefix, and --pulsar-host. status and logs take a run id.

  • token-mean turn loss for LLMPPO and LLMREINFORCE

    LLMPPO and LLMREINFORCE share one turn surrogate. Each turn's importance ratio is the geometric mean of its action-token ratios, copied onto every token of that turn. The clip binds per token, and the policy loss is the mean over action tokens.

    LLMPPO reads the turn's state value at the first action position (the last query token on the shifted critic grid). Token-level GAE puts the turn reward on the last action token and steps from one action token to the next, skipping environment tokens between turns. Advantages are whitened over the action tokens the loss averages, with one mean and variance for the batch across ranks. The critic loss is mean squared error, with no value clip. Defaults are now gae_lambda=1.0, lr_actor=1e-5, and lr_critic=1e-4. create_population uses those learning rates when the hyperparameter dict omits them.

    LLMREINFORCE uses that same surrogate. Return batch normalization z-scores the broadcast turn returns over action tokens, so a longer turn weighs more, matching the token-mean loss. Default lr is 1e-5.

    GRPO always divides the importance ratio by the rollout engine's sampling log-probs. A row missing sampling log-probs on any action token uses the learn-start policy for that row. The extra truncated importance-sampling weight is removed from the loss, because the ratio is already against the sampling policy. vllm_importance_sampling_cap only sets the clip threshold on the mismatch metrics. create_population does not pass vllm_importance_sampling_correction to GRPO, CISPO, or GSPO.

    LLMPPO and LLMREINFORCE also divide the importance ratio by the rollout engine's sampling log-probs, with the same learn-start fallback for rows missing them. Their capped engine weight is removed. A new off_policy_token_mask_bounds (default (0.5, 5.0)) zeroes the policy gradient on tokens whose ratio to the sampling policy leaves that band.

    These removals have no compatibility shims:

    • LLMPPO: turn_ratio_pooling and turn_value_reduction
    • LLMREINFORCE: turn_ratio_pooling
    • LLMPPO, LLMREINFORCE: vllm_importance_sampling_correction
    • GRPO: old_logprobs_source and vllm_importance_sampling_correction
    • agilerl.utils.llm_utils: clipped_min_surrogate, clipped_is_surrogate, and the turn_reduction argument of pool_log_ratio_by_level and value_fit. pool_by_turns no longer accepts reduction="final_value". New helpers are broadcast_log_ratio_by_level, clipped_token_surrogate, turn_state_values, and global_masked_whiten.

    LLMPPOSpec and LLMREINFORCESpec drop the same fields and take the new defaults.

Full Changelog: v2.63.0...v2.64.0

agilerl-arena/v1.37.0: agilerl-arena v1.37.0: run Snowflake training from an in-account broker

Released on 2026-11-13 - GitHub - PyPI

Fixes

  • reject hyperparameter mutation ranges outside the field limits

    Algorithm hyperparameters that live in a real range publish a minimum and a maximum on the training-manifest schema. Temperature and top-p must be above 0. Tau and learning rates must be above 0, and tau is at most 1. Presence and frequency penalties run from -2 to 2. A completion cap must be at least 1 and less than the model context length. LLM update epochs are at most 10. On-policy distillation temperature stays at 1. Ornstein-Uhlenbeck noise is rejected when theta times the timestep is above 1. An HPO mutation window that leaves those field limits is rejected. Counts, context length, and trainer settings with no enforced ceiling stay open on that side.

  • reshard FSDP units before exporting or importing optimizer state

    With reshard_after_forward=False, a forward pass with no backward (for example an LLM algorithm's test(), which runs learn under no_grad) leaves FSDP2 units unsharded. named_parameters() then returns the gathered tensors rather than the sharded parameters the optimizer holds, so get_optimizer_state_dict raised KeyError: 0 when saving a checkpoint with optimizer state, and optimizer resume failed the same lookup.

    FSDPRuntime.export_optimizer_state and FSDPRuntime.import_optimizer_state now reshard the actor first. A new multi-process test covers export and resume after a no-grad forward under FSDP with tensor parallelism and LoRA.

Breaking Changes

  • run Snowflake training from an in-account broker

    arena snowflake setup creates the account objects, copies the trainer image, and checks the GPU driver. The pools are arena_pulsar_pool, arena_head_pool, and one GPU pool per family. Setup removes the Pulsar external access integration, stores the Arena org key and external user id as Snowflake secrets, and opens arena_api_eai to one Arena host. Hugging Face egress stays.

    arena snowflake check records the image tag. invite grants arena_trainer. join writes a local login. pools lists pools or sets a GPU cap.

    arena snowflake submit starts three job services only when Arena reports Snowflake training: a Pulsar broker, a CPU Ray head, and GPU workers. --gpus is required. With no --gpu-family, submit picks the smallest GPU memory whose GPUs per node divide --gpus and that fits the manifest.

    These submit flags are removed: --compute-pool, --nodes, --pulsar-url, --pulsar-topic-prefix, and --pulsar-host. status and logs take a run id.

  • token-mean turn loss for LLMPPO and LLMREINFORCE

    LLMPPO and LLMREINFORCE share one turn surrogate. Each turn's importance ratio is the geometric mean of its action-token ratios, copied onto every token of that turn. The clip binds per token, and the policy loss is the mean over action tokens.

    LLMPPO reads the turn's state value at the first action position (the last query token on the shifted critic grid). Token-level GAE puts the turn reward on the last action token and steps from one action token to the next, skipping environment tokens between turns. Advantages are whitened over the action tokens the loss averages, with one mean and variance for the batch across ranks. The critic loss is mean squared error, with no value clip. Defaults are now gae_lambda=1.0, lr_actor=1e-5, and lr_critic=1e-4. create_population uses those learning rates when the hyperparameter dict omits them.

    LLMREINFORCE uses that same surrogate. Return batch normalization z-scores the broadcast turn returns over action tokens, so a longer turn weighs more, matching the token-mean loss. Default lr is 1e-5.

    GRPO always divides the importance ratio by the rollout engine's sampling log-probs. A row missing sampling log-probs on any action token uses the learn-start policy for that row. The extra truncated importance-sampling weight is removed from the loss, because the ratio is already against the sampling policy. vllm_importance_sampling_cap only sets the clip threshold on the mismatch metrics. create_population does not pass vllm_importance_sampling_correction to GRPO, CISPO, or GSPO.

    LLMPPO and LLMREINFORCE also divide the importance ratio by the rollout engine's sampling log-probs, with the same learn-start fallback for rows missing them. Their capped engine weight is removed. A new off_policy_token_mask_bounds (default (0.5, 5.0)) zeroes the policy gradient on tokens whose ratio to the sampling policy leaves that band.

    These removals have no compatibility shims:

    • LLMPPO: turn_ratio_pooling and turn_value_reduction
    • LLMREINFORCE: turn_ratio_pooling
    • LLMPPO, LLMREINFORCE: vllm_importance_sampling_correction
    • GRPO: old_logprobs_source and vllm_importance_sampling_correction
    • agilerl.utils.llm_utils: clipped_min_surrogate, clipped_is_surrogate, and the turn_reduction argument of pool_log_ratio_by_level and value_fit. pool_by_turns no longer accepts reduction="final_value". New helpers are broadcast_log_ratio_by_level, clipped_token_surrogate, turn_state_values, and global_masked_whiten.

    LLMPPOSpec and LLMREINFORCESpec drop the same fields and take the new defaults.

Full Changelog: agilerl-arena/v1.36.0...agilerl-arena/v1.37.0

v2.63.0: always train reasoning in agent traces

Released on 2026-11-12 - GitHub - PyPI

Features

  • auto-select weight sync and price Qwen3.5 activations from measurements

    The planner writes the weight-sync transport. The manifest has no weight_sync field. On one node, an async dense run with trainer parallel at 1 prices merged nccl_reshard beside merged NIXL and adapter NIXL, and keeps the fastest merged step when it is within 10% of adapter. Hopper and newer GPUs with no measured row use the H100 rates. PCIe, mixture-of-experts, and excluded layouts stay on NIXL.

    The NIXL send buffer is allocated before kernel warmup. gramPerGpu cannot raise a catalogued GPU above the catalogue. Qwen3.5 gated-delta and gated-attention layers are priced from the measured saved set, one stored layer at a time.

  • on-policy distillation (OPD) with self, adapter or model teachers

    Adds OPD, an on-policy distillation algorithm built on GRPO. The student samples rollouts; a teacher scores every sampled token, and each token's advantage gains teacher_coef * (teacher_logp - sampling_logp), bounded to teacher_gap_clip nats. Task rewards are optional and add the group-relative advantage on top.

    • agilerl.algorithms.OPD: defaults to unmodified sampling (temperature 1, top_k 0), beta 0 and group size 4, allows a group of one, and rejects settings that change the scored distribution. Logs teacher_reverse_kl, teacher_gap_clip_frac, response_length and response_repeat_4gram_frac, and warns once when over half of the responses' 4-grams repeat.
    • GRPO.learn takes token_advantages, per-token terms added to the group advantages. A row whose term count differs from its action tokens warns and gets no term; the hook is rejected with filter_zero_adv.
    • Trajectory.teacher_logps. QADatasetEnv(metadata_columns=...) and RolloutHarness.from_dataset(metadata_columns=...) copy dataset columns into reset info. OpenEnv remote reset merges observation metadata into info.
    • agilerl-arena: OPDSpec (name: OPD) with a teacher block. The teacher is the live policy given a reference trace from reset info (context_key, template, max_context_tokens), a frozen LoRA adapter of the student's base model (teacher.adapter), the student's base weights (teacher.base), or a separate model of the same vocabulary (teacher.model). coef and max_token_gap set the term.
    • agilerl-arena memory estimator: sizes the separate teacher engine and counts its GPUs, prices prompt-scoring buffers, the longer engine context for a reference, and the second LoRA slot of a teacher adapter; a teacher adapter or base-weights teacher rules out merged weight sync.
    • agilerl-arena CLI: running cli.py under -m keeps plugin manifest groups registered.
  • SFT on agent traces can skip reasoning, reads reasoning aliases, reports cut traces

    SFT over multi-turn messages rows gains three things. DatasetEnv(train_on_reasoning=False) (manifest environment.train_on_reasoning, passed through by make_llm_env) leaves the reasoning text the chat template interpolates out of the loss, including a structured value the template stringifies, while the answer, tool calls and reasoning markers stay trained. The encoded transcript follows that template's render of the conversation through the last assistant turn, so earlier turns omit reasoning the template omits. Between assistant turns, trailing whitespace of the generation prompt that the completed turn does not continue stays in the gap and outside the assistant mask. An assistant message's reasoning under reasoning_content, thinking or reasoning is moved to the key the tokenizer's chat template reads, including a key read with message.get, so one dataset renders across model families; two different values raise. A trace cut back to an earlier assistant turn at max_context_length now warns with the count of such rows. encode_sft_training_row returns the loss mask beside the assistant mask, and template_reasoning_key reports which reasoning key a template reads.

  • size GB300, B300, and RTX 6000, and share one GPU plan across host RAM

    The memory estimator resolves NVIDIA GB300 (279 GiB, SM 10.0), NVIDIA B300 (288 GiB, SM 10.0), NVIDIA RTX 6000 Blackwell Server Edition (96 GiB, SM 12.0), and NVIDIA RTX 6000 Ada Generation (48 GiB, SM 8.9). Quadro RTX 6000 (24 GiB, SM 7.5) is below SM 8.0, so LLM training is refused. The RTX PRO 6000 row is unchanged.

    A trainer plan is cached for the GPU and layout without a host RAM share. Another tier reuses that plan when its share can hold the plan's host bytes. A share that cannot is priced once and stored for that share only.

  • add arena secrets commands for organization secrets

    Adds arena secrets list, arena secrets set NAME and arena secrets delete NAME, plus ArenaClient.list_secrets, set_secret and delete_secret. A manifest's judge.api_key_env names one of these secrets, and Arena passes it to the training job as an environment variable of that name. set reads the value from a hidden prompt, piped stdin or --from-env VAR, never from an argument, and no command shows any part of a value: rows carry only the name, the created/updated timestamps and who last updated it. Documents the commands in the Arena guide and the LLM judge section. Also makes scripts/run-tests.sh work on macOS bash 3.2.

Fixes

  • reject max_context_length values Arena does not offer

    submit_experiment raises ArenaValidationError when a catalog model's network.max_context_length is outside the options Arena accepts, before the submit request is sent. Those options are powers of two from 1024 up to the model's context window, plus the window itself when it is not a power of two. A window below 1024 is the only accepted value. The check applies to catalog models. TrainingManifest still accepts any context length of at least 1, so local training limits stay as they are. The GSM8K GRPO example and the trainer network example use 1024.

  • all-gather frozen FSDP expert weights again in backward

    Expert-parallel MoE no longer copies each layer's gathered FSDP expert weights into the autograd graph. The kernel keeps views of the unsharded parameters. Backward all-gathers that block before those views are read and frees it once the gradients that use it are finished, including when the block input does not require grad and only adapter weights do. Without activation checkpointing, those gathered experts are not kept for the whole graph.

Breaking Changes

  • always train reasoning in agent traces

    SFT on agent traces trains every assistant token the chat template renders, including reasoning. train_on_reasoning is removed from the Arena LLM environment spec and from DatasetEnv. encode_sft_training_row is removed. encode_sft_row and encode_chat_transcript encode the row, and the SFT loss mask is the assistant mask.

    Reasoning aliases (reasoning_content, thinking, and reasoning) still move onto the key the template reads. A trace cut to fit the context length still warns. A manifest that sets train_on_reasoning fails validation.

Documentation

  • name the GSM8K GRPO example reward reward_fn

    The GSM8K GRPO example in the docs now defines reward_fn(question, answer, completion), and the tutorial names that function. A reasoning job that does not set rubric_name loads reward_fn. Scoring is unchanged: answer match plus format, at most 2.0. RUBRIC in the same file is unchanged.

Full Changelog: v2.62.0...v2.63.0

agilerl-arena/v1.36.0: agilerl-arena v1.36.0: always train reasoning in agent traces

Released on 2026-11-12 - GitHub - PyPI

Features

  • auto-select weight sync and price Qwen3.5 activations from measurements

    The planner writes the weight-sync transport. The manifest has no weight_sync field. On one node, an async dense run with trainer parallel at 1 prices merged nccl_reshard beside merged NIXL and adapter NIXL, and keeps the fastest merged step when it is within 10% of adapter. Hopper and newer GPUs with no measured row use the H100 rates. PCIe, mixture-of-experts, and excluded layouts stay on NIXL.

    The NIXL send buffer is allocated before kernel warmup. gramPerGpu cannot raise a catalogued GPU above the catalogue. Qwen3.5 gated-delta and gated-attention layers are priced from the measured saved set, one stored layer at a time.

  • on-policy distillation (OPD) with self, adapter or model teachers

    Adds OPD, an on-policy distillation algorithm built on GRPO. The student samples rollouts; a teacher scores every sampled token, and each token's advantage gains teacher_coef * (teacher_logp - sampling_logp), bounded to teacher_gap_clip nats. Task rewards are optional and add the group-relative advantage on top.

    • agilerl.algorithms.OPD: defaults to unmodified sampling (temperature 1, top_k 0), beta 0 and group size 4, allows a group of one, and rejects settings that change the scored distribution. Logs teacher_reverse_kl, teacher_gap_clip_frac, response_length and response_repeat_4gram_frac, and warns once when over half of the responses' 4-grams repeat.
    • GRPO.learn takes token_advantages, per-token terms added to the group advantages. A row whose term count differs from its action tokens warns and gets no term; the hook is rejected with filter_zero_adv.
    • Trajectory.teacher_logps. QADatasetEnv(metadata_columns=...) and RolloutHarness.from_dataset(metadata_columns=...) copy dataset columns into reset info. OpenEnv remote reset merges observation metadata into info.
    • agilerl-arena: OPDSpec (name: OPD) with a teacher block. The teacher is the live policy given a reference trace from reset info (context_key, template, max_context_tokens), a frozen LoRA adapter of the student's base model (teacher.adapter), the student's base weights (teacher.base), or a separate model of the same vocabulary (teacher.model). coef and max_token_gap set the term.
    • agilerl-arena memory estimator: sizes the separate teacher engine and counts its GPUs, prices prompt-scoring buffers, the longer engine context for a reference, and the second LoRA slot of a teacher adapter; a teacher adapter or base-weights teacher rules out merged weight sync.
    • agilerl-arena CLI: running cli.py under -m keeps plugin manifest groups registered.
  • SFT on agent traces can skip reasoning, reads reasoning aliases, reports cut traces

    SFT over multi-turn messages rows gains three things. DatasetEnv(train_on_reasoning=False) (manifest environment.train_on_reasoning, passed through by make_llm_env) leaves the reasoning text the chat template interpolates out of the loss, including a structured value the template stringifies, while the answer, tool calls and reasoning markers stay trained. The encoded transcript follows that template's render of the conversation through the last assistant turn, so earlier turns omit reasoning the template omits. Between assistant turns, trailing whitespace of the generation prompt that the completed turn does not continue stays in the gap and outside the assistant mask. An assistant message's reasoning under reasoning_content, thinking or reasoning is moved to the key the tokenizer's chat template reads, including a key read with message.get, so one dataset renders across model families; two different values raise. A trace cut back to an earlier assistant turn at max_context_length now warns with the count of such rows. encode_sft_training_row returns the loss mask beside the assistant mask, and template_reasoning_key reports which reasoning key a template reads.

  • size GB300, B300, and RTX 6000, and share one GPU plan across host RAM

    The memory estimator resolves NVIDIA GB300 (279 GiB, SM 10.0), NVIDIA B300 (288 GiB, SM 10.0), NVIDIA RTX 6000 Blackwell Server Edition (96 GiB, SM 12.0), and NVIDIA RTX 6000 Ada Generation (48 GiB, SM 8.9). Quadro RTX 6000 (24 GiB, SM 7.5) is below SM 8.0, so LLM training is refused. The RTX PRO 6000 row is unchanged.

    A trainer plan is cached for the GPU and layout without a host RAM share. Another tier reuses that plan when its share can hold the plan's host bytes. A share that cannot is priced once and stored for that share only.

  • add arena secrets commands for organization secrets

    Adds arena secrets list, arena secrets set NAME and arena secrets delete NAME, plus ArenaClient.list_secrets, set_secret and delete_secret. A manifest's judge.api_key_env names one of these secrets, and Arena passes it to the training job as an environment variable of that name. set reads the value from a hidden prompt, piped stdin or --from-env VAR, never from an argument, and no command shows any part of a value: rows carry only the name, the created/updated timestamps and who last updated it. Documents the commands in the Arena guide and the LLM judge section. Also makes scripts/run-tests.sh work on macOS bash 3.2.

Fixes

  • reject max_context_length values Arena does not offer

    submit_experiment raises ArenaValidationError when a catalog model's network.max_context_length is outside the options Arena accepts, before the submit request is sent. Those options are powers of two from 1024 up to the model's context window, plus the window itself when it is not a power of two. A window below 1024 is the only accepted value. The check applies to catalog models. TrainingManifest still accepts any context length of at least 1, so local training limits stay as they are. The GSM8K GRPO example and the trainer network example use 1024.

  • all-gather frozen FSDP expert weights again in backward

    Expert-parallel MoE no longer copies each layer's gathered FSDP expert weights into the autograd graph. The kernel keeps views of the unsharded parameters. Backward all-gathers that block before those views are read and frees it once the gradients that use it are finished, including when the block input does not require grad and only adapter weights do. Without activation checkpointing, those gathered experts are not kept for the whole graph.

Breaking Changes

  • always train reasoning in agent traces

    SFT on agent traces trains every assistant token the chat template renders, including reasoning. train_on_reasoning is removed from the Arena LLM environment spec and from DatasetEnv. encode_sft_training_row is removed. encode_sft_row and encode_chat_transcript encode the row, and the SFT loss mask is the assistant mask.

    Reasoning aliases (reasoning_content, thinking, and reasoning) still move onto the key the template reads. A trace cut to fit the context length still warns. A manifest that sets train_on_reasoning fails validation.

Documentation

  • name the GSM8K GRPO example reward reward_fn

    The GSM8K GRPO example in the docs now defines reward_fn(question, answer, completion), and the tutorial names that function. A reasoning job that does not set rubric_name loads reward_fn. Scoring is unchanged: answer match plus format, at most 2.0. RUBRIC in the same file is unchanged.

Full Changelog: agilerl-arena/v1.35.0...agilerl-arena/v1.36.0

v2.62.0: isolate Nebius region projects per cluster and add BYOC scope

Released on 2026-11-11 - GitHub - PyPI

Features

  • isolate Nebius region projects per cluster and add BYOC scope

    Ephemeral Nebius clusters each get {cluster}-{region} projects. Register accepts customer or platform. Platform scope shares the Arena catalog and bucket and defaults to ephemeral placement.

    Destroy deletes leftover compute disks and buckets, and continues when a disk, bucket, or the state bucket is already gone, including destroy by cluster name. If local Terraform state still lists resources, destroy uses that file instead of stopping. A compute or storage project is removed on the name path only when its name is the one Terraform creates. The shared provisioners group stays while another cluster still has a region project. GPU registration skips an unknown platform. The storage project uses the object-storage region, and its standard storage quota covers the data bucket plus state.

    Experiment submit accepts an idempotency key. Resume accepts a checkpoint, a new name, and a project. Environment profile can override the multi-agent flag. Deployments can be renamed, enabled, or archived. Install writes credential Secrets from the install package before the agent chart.

  • record held-out dataset completions

    A completion record can describe a held-out dataset row. It has no reward. It carries the row's reference answer, the rejected answer for a preference row, and whether the completion came from the model without the trained adapter.

    select_dataset_prompts samples held-out rows that leave room for a completion. An SFT row's prompt tokens are the chat-template prefix training uses, including when the split also has a chosen column. dataset_completion_record builds the record from one row and its generated text.

    sample_eval_prompts picks chosen/rejected for a preference env and response_column for an SFT env.

  • load local JSONL shards for LLM dataset training

    Local JSONL files and shard directories load into a Hugging Face Dataset the same way parquet already does, including train/eval split directories. SFT and DPO keep the column rules they already have. A verifiers event-loop thread that dies with SystemExit records that failure on its waiters and does not raise it out of the thread.

  • add weight_sync transport to the training manifest

    TrainingSpec.weight_sync.transport accepts nixl (the default), nccl, or nccl_reshard. An unknown transport fails validation. WeightSyncSpec and WeightSyncTransport are exported from agilerl.arena.models. A manifest payload omits weight_sync when that field was not set, and keeps an explicit network.lora_config null so a full finetune is not rewritten as the default adapter.

  • generate GRPO, PPO, and REINFORCE completions with colocated vLLM only

    GRPO, CISPO, GSPO, LLMPPO, and LLMREINFORCE no longer call HuggingFace actor.generate(). Completions go through colocated vLLM. The hf_generate_chunk_size constructor argument is rejected. Unused HuggingFace generate helpers are removed. When vllm_config is unset at generate time, VLLMConfig() defaults start colocated vLLM. A dense trainer is offloaded to CPU first; an already sharded trainer is not. An unset GRPO old_logprobs_source becomes trainer once that engine is running. Debugging LLM demos write a tiny Llama checkpoint and target Llama LoRA modules.

  • submit Snowflake training as an SPCS job service

    arena snowflake submit trains on a Snowflake table or query, or against an RL environment at env_url. It uploads the run to a stage and starts an SPCS job service on a caller-supplied image. The container starts Ray, writes checkpoints back to the stage, and merges metrics into a table. Status and logs read the service. Docs and setup SQL cover the grants and GPU instance families. The memory catalogue adds RTX PRO 6000 (96 GiB, compute capability 12.0) without changing estimates for other GPUs.

  • group rubric and RULER

    GroupRubric scores a finished group of completions together, for ranking-style rewards. score_group(episodes) returns one score per episode, and each score is added to that episode's final-turn reward. RolloutCollector takes it as group_rubric, and train_llm_rollout forwards it.

    LLMGroupJudgeRubric is RULER: one LLM judge call compares the whole group against criteria you write and returns {"scores": [...]}, each clamped to [0, 1]. The judge sees no reasoning unless include_reasoning=True. An unreadable reply scores the group 0 and counts in judge_parse_failure_rate.

    Set group_rubric_name in the environment spec to name a GroupRubric in rubric_file_path. Leave rubric_name unset to keep the environment's own turn reward. With judge set, the group rubric must be a class whose __init__ takes judge, and a turn rubric named alongside it only gets the judge if it asks for it. Training logs the score as reward_<component_name>. Every harness under a group rubric needs a rubric of its own, because that is what keeps the transcript; EnvReward keeps the environment's reward. Two rubrics reporting one component name raise ValueError.

  • train in a Snowflake account and publish the checkpoint

    arena snowflake submit runs a training manifest as a Snowpark Container Services job on a GPU compute pool. It reads a table, query, or env-backed rollout in the account, writes checkpoints to a stage, and loads metric rows into a table. arena snowflake status and arena snowflake logs read that job. RL rollouts send prompts and completions to the Pulsar broker named with --pulsar-url.

    arena snowflake publish logs a merged checkpoint from that run to the Snowflake Model Registry. With --serve, it starts a vLLM service on the same pool. The newest complete checkpoint is used unless --step is set. The version defaults to the checkpoint name and the service to <model-name>_<version>. The command fails if that version or service already exists. --gpu-count above 1 sets vLLM --tensor-parallel-size. LoRA adapters without a merged export are not supported.

    The GPU catalogue includes the NVIDIA RTX PRO 6000 Blackwell Server Edition. The Snowflake extras do not install on s390x; agilerl and agilerl-arena still do.

Optimizations

  • speed up the memory planner

    agilerl-arena's memory planner caches work it repeats with the same inputs, and its estimates stay the same. Bundled model configs are parsed once per model, and model specs are built once per model. Each GPU-split search prices every trainer count and engine cycle once. Parameter counts, FSDP prefetch windows, trainer memory plans and training breakdowns are cached in bounded caches, sized so a long-lived process keeps the plans of several recent requests. Each layout the planner tries copies only the FSDP settings it changes. Callers get their own copy of each cached plan and breakdown.

Fixes

  • size colocated memory estimates on each member's GPUs

    Colocated runs (DPO, SFT, and any run that does not generate on async rollout engines) are sized on every GPU a population member owns. The tier check and arena memory estimate --num-gpus set training_gpus_per_agent to the member's GPUs (num_gpus // pop_size, at least 1) before placement and before the memory plan. The layout search uses that trainer count, and an authored training_gpus_per_agent is replaced. Async rollout splits are unchanged. Memory formulas are unchanged; a multi-GPU colocated plan shards weights across those ranks.

Tests

  • check SFT offloads activations when the memory plan asks for it

    Adds a test that SFT's gradient forward runs inside the activation offload context exactly when activation_offload is set.

Other

  • Mark DeepSeek-V4-Flash, GLM-5.3-Flash, and MiMo-V2.6-Flash live

    These catalog models use the default live status, so training jobs can select and submit them.

  • pin verifiers 0.4.2.dev6

    The verifiers extra now requires verifiers 0.4.2.dev6 on Python 3.11 and newer. The lockfile moves that extra's mcp dependency to 2.2.0, updates prime-sandboxes to 0.5.8 and prime-tunnel to 0.1.17, and drops prime-runs and prime-traces. A trace verifiers marks dropped raises from the env instead of returning reward 0.

Full Changelog: v2.61.0...v2.62.0

agilerl-arena/v1.35.0: agilerl-arena v1.35.0: isolate Nebius region projects per cluster and add BYOC scope

Released on 2026-11-11 - GitHub - PyPI

Features

  • isolate Nebius region projects per cluster and add BYOC scope

    Ephemeral Nebius clusters each get {cluster}-{region} projects. Register accepts customer or platform. Platform scope shares the Arena catalog and bucket and defaults to ephemeral placement.

    Destroy deletes leftover compute disks and buckets, and continues when a disk, bucket, or the state bucket is already gone, including destroy by cluster name. If local Terraform state still lists resources, destroy uses that file instead of stopping. A compute or storage project is removed on the name path only when its name is the one Terraform creates. The shared provisioners group stays while another cluster still has a region project. GPU registration skips an unknown platform. The storage project uses the object-storage region, and its standard storage quota covers the data bucket plus state.

    Experiment submit accepts an idempotency key. Resume accepts a checkpoint, a new name, and a project. Environment profile can override the multi-agent flag. Deployments can be renamed, enabled, or archived. Install writes credential Secrets from the install package before the agent chart.

  • record held-out dataset completions

    A completion record can describe a held-out dataset row. It has no reward. It carries the row's reference answer, the rejected answer for a preference row, and whether the completion came from the model without the trained adapter.

    select_dataset_prompts samples held-out rows that leave room for a completion. An SFT row's prompt tokens are the chat-template prefix training uses, including when the split also has a chosen column. dataset_completion_record builds the record from one row and its generated text.

    sample_eval_prompts picks chosen/rejected for a preference env and response_column for an SFT env.

  • load local JSONL shards for LLM dataset training

    Local JSONL files and shard directories load into a Hugging Face Dataset the same way parquet already does, including train/eval split directories. SFT and DPO keep the column rules they already have. A verifiers event-loop thread that dies with SystemExit records that failure on its waiters and does not raise it out of the thread.

  • add weight_sync transport to the training manifest

    TrainingSpec.weight_sync.transport accepts nixl (the default), nccl, or nccl_reshard. An unknown transport fails validation. WeightSyncSpec and WeightSyncTransport are exported from agilerl.arena.models. A manifest payload omits weight_sync when that field was not set, and keeps an explicit network.lora_config null so a full finetune is not rewritten as the default adapter.

  • generate GRPO, PPO, and REINFORCE completions with colocated vLLM only

    GRPO, CISPO, GSPO, LLMPPO, and LLMREINFORCE no longer call HuggingFace actor.generate(). Completions go through colocated vLLM. The hf_generate_chunk_size constructor argument is rejected. Unused HuggingFace generate helpers are removed. When vllm_config is unset at generate time, VLLMConfig() defaults start colocated vLLM. A dense trainer is offloaded to CPU first; an already sharded trainer is not. An unset GRPO old_logprobs_source becomes trainer once that engine is running. Debugging LLM demos write a tiny Llama checkpoint and target Llama LoRA modules.

  • submit Snowflake training as an SPCS job service

    arena snowflake submit trains on a Snowflake table or query, or against an RL environment at env_url. It uploads the run to a stage and starts an SPCS job service on a caller-supplied image. The container starts Ray, writes checkpoints back to the stage, and merges metrics into a table. Status and logs read the service. Docs and setup SQL cover the grants and GPU instance families. The memory catalogue adds RTX PRO 6000 (96 GiB, compute capability 12.0) without changing estimates for other GPUs.

  • group rubric and RULER

    GroupRubric scores a finished group of completions together, for ranking-style rewards. score_group(episodes) returns one score per episode, and each score is added to that episode's final-turn reward. RolloutCollector takes it as group_rubric, and train_llm_rollout forwards it.

    LLMGroupJudgeRubric is RULER: one LLM judge call compares the whole group against criteria you write and returns {"scores": [...]}, each clamped to [0, 1]. The judge sees no reasoning unless include_reasoning=True. An unreadable reply scores the group 0 and counts in judge_parse_failure_rate.

    Set group_rubric_name in the environment spec to name a GroupRubric in rubric_file_path. Leave rubric_name unset to keep the environment's own turn reward. With judge set, the group rubric must be a class whose __init__ takes judge, and a turn rubric named alongside it only gets the judge if it asks for it. Training logs the score as reward_<component_name>. Every harness under a group rubric needs a rubric of its own, because that is what keeps the transcript; EnvReward keeps the environment's reward. Two rubrics reporting one component name raise ValueError.

  • train in a Snowflake account and publish the checkpoint

    arena snowflake submit runs a training manifest as a Snowpark Container Services job on a GPU compute pool. It reads a table, query, or env-backed rollout in the account, writes checkpoints to a stage, and loads metric rows into a table. arena snowflake status and arena snowflake logs read that job. RL rollouts send prompts and completions to the Pulsar broker named with --pulsar-url.

    arena snowflake publish logs a merged checkpoint from that run to the Snowflake Model Registry. With --serve, it starts a vLLM service on the same pool. The newest complete checkpoint is used unless --step is set. The version defaults to the checkpoint name and the service to <model-name>_<version>. The command fails if that version or service already exists. --gpu-count above 1 sets vLLM --tensor-parallel-size. LoRA adapters without a merged export are not supported.

    The GPU catalogue includes the NVIDIA RTX PRO 6000 Blackwell Server Edition. The Snowflake extras do not install on s390x; agilerl and agilerl-arena still do.

Fixes

  • size colocated memory estimates on each member's GPUs

    Colocated runs (DPO, SFT, and any run that does not generate on async rollout engines) are sized on every GPU a population member owns. The tier check and arena memory estimate --num-gpus set training_gpus_per_agent to the member's GPUs (num_gpus // pop_size, at least 1) before placement and before the memory plan. The layout search uses that trainer count, and an authored training_gpus_per_agent is replaced. Async rollout splits are unchanged. Memory formulas are unchanged; a multi-GPU colocated plan shards weights across those ranks.

Tests

  • check SFT offloads activations when the memory plan asks for it

    Adds a test that SFT's gradient forward runs inside the activation offload context exactly when activation_offload is set.

Other

  • pin verifiers 0.4.2.dev6

    The verifiers extra now requires verifiers 0.4.2.dev6 on Python 3.11 and newer. The lockfile moves that extra's mcp dependency to 2.2.0, updates prime-sandboxes to 0.5.8 and prime-tunnel to 0.1.17, and drops prime-runs and prime-traces. A trace verifiers marks dropped raises from the env instead of returning reward 0.

Full Changelog: agilerl-arena/v1.34.0...agilerl-arena/v1.35.0

agilerl-arena/v1.34.0: agilerl-arena v1.34.0: speed up the memory planner

Released on 2026-11-09 - GitHub - PyPI

Optimizations

  • speed up the memory planner

    agilerl-arena's memory planner caches work it repeats with the same inputs, and its estimates stay the same. Bundled model configs are parsed once per model, and model specs are built once per model. Each GPU-split search prices every trainer count and engine cycle once. Parameter counts, FSDP prefetch windows, trainer memory plans and training breakdowns are cached in bounded caches, sized so a long-lived process keeps the plans of several recent requests. Each layout the planner tries copies only the FSDP settings it changes. Callers get their own copy of each cached plan and breakdown.

Other

  • Mark DeepSeek-V4-Flash, GLM-5.3-Flash, and MiMo-V2.6-Flash live

    These catalog models use the default live status, so training jobs can select and submit them.

Full Changelog: agilerl-arena/v1.33.0...agilerl-arena/v1.34.0

v2.61.0: score any rollout env with a rubric

Released on 2026-11-09 - GitHub - PyPI

Features

  • score any rollout env with a rubric

    RolloutHarness takes an optional OpenEnv Rubric that scores every turn of any rollout environment, replacing the env's reward for that turn. Rubrics receive a TurnAction (the text the env received, the full completion with reasoning, parsed tool calls) and a TurnObservation (the env's reward, whether the env ran, whether the episode is done, the prompt, and any question / answer labels). EnvReward brings the env's own reward in as a component, so it can be combined with format or other checks using OpenEnv's WeightedSum, Gate and Sequential.

    rubric_file_path / rubric_name now work with entrypoint, env_url and env_image sources as well as dataset rows.

    Breaking: QADatasetEnv no longer takes a rubric or scores completions; it serves rows and puts question / answer on the terminal observation, and the harness rubric scores them. RolloutHarness.from_dataset(rows, rubric, ...) is unchanged.

  • reject manifests that set both num_epochs and max_steps

    Arena validation now raises when training.num_epochs and training.max_steps are both set. Pick one: epochs for an epoch-driven run, steps for a step-driven run. An unset max_steps is omitted from the submitted payload, so the default is not treated as an authored step cap. Dataset-backed GRPO schema defaults set max_steps to null when they default num_epochs to 1. SFT and DPO example configs keep num_epochs only.

  • LLM-as-judge rubric

    LLMJudgeRubric scores an episode with an LLM judge against criteria you write. It builds on OpenEnv's LLMJudge: the judge reads the prompt, each turn's text after its reasoning, and the environment's replies (include_reasoning=True adds the reasoning), and returns a {"score": ...} verdict in [0, 1]. On dataset rows it reads the row's question and is shown the row's answer as REFERENCE ANSWER. It scores the episode's last turn unless every_turn=True; an unreadable verdict scores 0.

    Configure the judge with judge next to rubric_file_path in the environment spec: provider (openai or anthropic), model, optional base_url for any OpenAI-compatible endpoint (a URL with a path, such as https://openrouter.ai/api/v1, is used as given; a bare host gets /v1), api_key_env (the name of the variable holding the key, required for a hosted API), max_concurrency, timeout_s (per request attempt; the provider SDK retries), temperature and max_tokens. A Rubric class whose __init__ takes judge is built with one shared client per process, so judge calls from every rollout slot share a concurrency cap.

    Rubrics with an async forward now run in RolloutHarness, which also passes each rubric the episode transcript on TurnObservation.transcript. Rubrics score a turn after the harness applies it, so TurnObservation.done is true on any episode ending, and reset() reaches child rubrics. LLM training logs each rubric component's mean score as reward_<component>, counting an episode a Gate or Sequential skipped as 0, plus judge_calls, judge_parse_failure_rate and judge_mean_latency_s. Anthropic judges work with anthropic>=1, whose Messages API takes no temperature, so setting one on an Anthropic judge is rejected.

    Breaking: get_rubric is removed; use get_rubric_factory(name, path)(). Two rubric leaves reporting one component name now raise ValueError.

  • SFT on multi-turn tool conversations, laid out as rollouts build them

    SFT now trains on chat transcripts that match what RolloutHarness builds during a rollout, for every supported chat template family.

    • DatasetEnv accepts a messages column (OpenAI chat format) with an optional tools column. prompt/response rows become one user and one assistant message and use the same encoder, so single-turn SFT now trains the chat-template text instead of raw prompt + response + EOS.
    • encode_chat_transcript renders the prompt once. Each assistant turn is the text the model samples, through its stop token. Messages between turns are the tokens the harness splices in: the chat format's tool-result blocks (Gemma 4, gpt-oss) or the template's feedback frame. Only assistant tokens are trained (loss_mask).
    • Each rendered assistant turn must parse, with the model's ChatFormat, to the trace's tool calls, so SFT cannot train calls a rollout would not run.
    • DatasetEnv checks every SFT row at startup. Rows that cannot be encoded, or whose first assistant turn does not fit max_context_length, are dropped with a warning. Longer transcripts are cut at a complete assistant turn rather than truncated mid-turn.
    • An SFT DatasetEnv raises at startup if the tokenizer has no pad token.
    • None keys Arrow fills into struct tool arguments and schemas are removed. Unnamed tool results are named by tool_call_id, then by the calls left unanswered.
    • sample_eval_prompts reads messages rows.
    • ChatFormat.format_tool_calls writes calls for templates that drop structured tool_calls (Granite 3).
    • HarmonyFormat parses a call that opens the turn after the <|start|>assistant generation prompt.
    • ChatFormat.token_ids keeps a delimiter that is the tokenizer's unk token, so Granite 3.1 calls end at <|end_of_text|>.
    • SFT batches carry loss_mask; SFTPrompts changes shape.
  • context and tensor parallel for language model training

    Add FSDPConfig.cp. Ulysses shards the sequence for attention and gathers log-probs before the loss. Mamba and Qwen3.5 Gated DeltaNet context parallel compose with tensor parallel. Add tensor-parallel plans for gpt-oss, Qwen2, Qwen3, Qwen3.5, Gemma 4, Granite 3.1, Granite 4, and Nemotron, including tied embeddings split over tensor parallel, and expert parallel for gpt-oss and the Granite MoE models. Padded, packed, and context-parallel forwards share one sequence layout. gpt-oss and Granite 4 hybrid stay off flex-attention sequence packing. The memory estimator prices context-parallel activations, tensor-parallel plans, and FSDP weights on the data-parallel shard group.

  • sync merged LoRA weights to rollout engines with LoRA off

    Async rollout engines without quantization, vision-tower LoRA or MTP drafting can now run with vLLM's LoRA path off. The trainer merges W + scale * B @ A in fp32 for every weight the adapter changes, packed routed experts included, and the framework's agilerl.utils.lora_merge lists those weights and writes each merged tensor into a send buffer.

    The Arena memory estimator prices those engines without adapter slots or dual-stream LoRA memory, plus a two-round merged send buffer in the trainer and a one-round receive buffer in each engine. Its split planner prices merged and adapter sync over the probed link (NVLink on one node, else RDMA or TCP). Over NVLink it keeps merged sync while its step is within 10% of the adapter's; over RDMA or TCP it picks the faster mode. When merged-sync trainers don't fit, it falls back to adapter sync. For Qwen3.6-35B-A3B on 8x A100-80 with unset engine width, the max-context solve fits at tensor parallel 2.

  • train MiMo-V2.6-Flash, GLM-5.3-Flash and DeepSeek-V4-Flash with tensor, context and expert parallelism

    Train XiaomiMiMo/MiMo-V2.6-Flash-RL, zai-org/GLM-5.3-Flash and deepseek-ai/DeepSeek-V4-Flash-0731 with LoRA and FSDP2 under tensor parallel (fsdp.tp), context parallel (fsdp.cp), expert parallel (fsdp.ep), or any mix of them. MoE models need ep >= tp.

    • Each family has a runtime config with its chat format, reasoning parser, LoRA exclusions and a tensor-parallel plan. Routed experts stay on expert parallel.
    • DeepSeek-V4 and GLM-5.3 have context-parallel plans that keep queries on the local sequence shard and gather the keys with the new agilerl.distributed.context_parallel.gather_sequence_for_cp. MiMo-V2 uses Ulysses over flex attention. Context-parallel validation checks the TP-local head counts against cp.
    • MiMo-V2 loads natively from its FP8 / MXFP4 checkpoint and runs flex attention with sinks. DeepSeek-V4 trains on flex attention with sequence packing. GLM-5.3 skips its sparse-attention indexer when top-k covers every key. DeepSeek-V4 and GLM-5.3 share a compiled hyper-connection Sinkhorn; GLM-5.3 and MiMo-V2 use Liger RMSNorm and SwiGLU.
    • New chat formats Glm47Format and DsmlFormat (DeepSeek-V4). A tokenizer without a chat template gets its family's template.
    • fsdp.cpu_offload with ep > 1 raises; use optim_cpu_offload.
    • agilerl-arena: catalogue entries for the three models, and memory estimates that cover tensor-parallel splits less the parameters each plan keeps whole, attention sinks, per-layer-kind KV with v_head_dim, context-parallel padding to cp * 64 tokens and key gathers, compressed KV entries, hyper-connection streams, and vLLM's expert LoRA copy. These models default the rollout engine's gpu_memory_utilization to 0.85, and their pre-quantized checkpoints keep adapter LoRA sync.

    Breaking: checkpoint_key_candidates requires base_model_prefix, tensor_parallel_params requires tensor_parallel, engine_weight_bytes takes arch first, and resolve_gpu_memory_utilization requires hub_id.

  • size merged and fp8 inference in arena memory solve --inference

    arena memory solve --inference sizes a vLLM engine with LoRA off, for serving a merged LoRA model: no adapter slot and no dual-stream LoRA memory. It reuses GenerationSettings.merged_lora_sync; training estimates are unchanged. --quantization fp8 sizes vLLM fp8 engine weights at one byte per parameter; it needs a catalogued GPU with native fp8 (compute capability 8.9+) and is rejected for training manifests, which set vllm_config.quantization instead. agilerl.utils.lora_merge.merged_export_is_complete(path) reports whether export_merged_pretrained finished writing a directory.

  • resolve training parallelism and node count in the memory estimate

    The memory estimator chooses a training layout and a node count when the manifest does not pin them. Layouts run from least parallel to most: data parallel or fully sharded, then HSDP across one node's GPUs, then one raised axis (expert, context, then tensor parallel), then two, then all three. The first layout that fits is kept. A tp, ep, cp, or shard_group_size set on the manifest stays as written. Searched expert groups and tensor x context groups stay within one node, an expert-parallel degree must divide the expert count, and tensor and context degrees must split the model's heads. Expert parallel is only searched for models the trainer shards over experts, context parallel only where the trainer splits the model's sequences, and a searched mixture-of-experts layout keeps ep at or above tp.

    Node counts are tried fewest first, then tiers by price. The first fit locks the layout and the node count. A tier with at least as many GPUs per node, and GPU memory within 512 MiB of the lock, is priced again at that same layout and node count. node_counts limits the counts that are searched. Without it, num_gpus is the whole allocation and gpus_per_node is the node size.

    At each layout the run picks merged-LoRA or adapter weight sync; a mode that fits with the memory buffer wins over one that fits only without it.

    arena memory --json reports parallelism (tp, ep, cp, shard_group_size) and num_nodes. A tier that fits also reports trainers, engines, and engine tensor parallel. The engine-width search prefers a width that keeps every requested sequence resident. If a pinned max_num_seqs does not fit in the KV pool, that tier's generation bar warns that sequences may queue.

    The context-length solver sizes the run the same way the memory check does, so its answer matches the check. It prices only the phases it checks, and stops once a larger value cannot fit.

    A dumped fsdp section writes only the tp, ep, cp, and shard_group_size the manifest set, so fsdp: {} is still searched after the manifest is reloaded.

    arena experiments submit and ArenaClient.submit_experiment accept a GPU count and a short GPU name (h100-80, b200, l4). Arena picks the fewest nodes. With no resource flags, Arena picks the cheapest fit.

  • clearer arena CLI output for agents and scripts

    • arena --json (or ARENA_JSON) prints results as JSON on stdout and errors as JSON on stderr. Logs now go to stderr.
    • Piped tables are no longer truncated.
    • New arena manifest template ALGORITHM prints a starter manifest.
    • arena memory estimate uses the catalog's parameter count, which corrects a large underestimate for openai/gpt-oss-20b. Catalog models with a count no longer need the Hub, and an unreachable Hub falls back to the analytic count.
    • arena manifest validate warns when an LLM manifest's model is outside the Arena catalog, deprecated, or in preview, and suggests the closest name. A relative checkout that already has config.json is local: no warning, and no Hub id suggestion. The exit code is unchanged; --json gains a warnings list.
    • The unknown-algorithm error lists aliases once (Recurrent PPO / RecurrentPPO) and suggests the closest name.
    • arena memory estimate and solve read the bundled config.json for catalog models, so they work offline without huggingface_hub or --config.
    • arena models list shows model, parameter count, max context and status instead of raw LoRA JSON; use arena models info for LoRA detail.
    • --help shows option defaults.
    • arena experiments list, arena experiments checkpoints and arena agent list say when there is nothing to show and suggest the next command.
  • train on verifiers (Prime Intellect Hub) envs

    Serve a verifiers v1 environment behind the factory/entrypoint seam (agilerl.llm_envs.verifiers_env:make, new agilerl[verifiers] extra). The adapter points the env's model endpoint at a local server and holds each request open until step() supplies the reply, so the verifiers episode loop advances one model call per step; the rollout harness still tokenises and masks, so training uses our own tokens. Tasksets without tools are served as text envs; a taskset whose tasks bring tools is served as an MCP environment, with each episode's tools from reset under the new episode_tools info key that the harness renders and parses against. Every call the harness steps carries its whole turn on CallToolAction.metadata (turn_tool_calls, turn_tool_call_index); a turn without a call reaches verifiers as prose through the verifiers_reply answer tool. A remote MCP environment counts as taking tool calls when it answers a tool listing, even an empty one. Single-agent envs whose transcript only grows are served, and infinite tasksets need num_tasks; anything else raises instead of guessing. verifiers keeps event-loop-bound state per process, so all envs in a process share one loop. The verifiers extra pins verifiers 0.4.1.dev63 and adds openenv. Linux GPU CI retries the flash-attn wheel download when that host returns 504.

Optimizations

  • fuse Qwen GDN gated RMSNorm and Triton expert LoRA

    Qwen3.5 and Qwen3.6 GatedDeltaNet now run fla's fused gated RMSNorm when flash-linear-attention imports, and pass grouped query and key heads into fla's scans. The PyTorch scan fallback still repeats those heads out to the value-head count.

    On the Triton expert backend, one unmasked expert LoRA is added in the base grouped GEMM's accumulator, router weights scale rows inside the scatter, and a gated SiLU runs as one SwiGLU kernel. Mixed-adapter routing and the recompute path still add LoRA deltas after the base projection.

    The activation estimate charges GDN query and key at the key-head width and uses the fused norm's saved set. For Qwen3.6-35B-A3B at 32k tokens that GDN saved set is 1924 MiB, and the solved engine width for that model on 8x A100-80 with unset engine width needs tensor parallel 4.

  • bump tensordict to 0.15

    TensorDict 0.15.1. ReplayBuffer._normalize_dims uses td.apply so the caller is not reshaped. share_encoder_parameters writes detached encoder leaves without keeping Parameter slots. Expert-parallel checkpoint replay compares routed counts on host lists. to_agent_tensors and EvolvableAlgorithm.to_device use bulk TensorDict.to. Experience helpers use TensorDict.cat, TensorDict.stack, batch reshape, and TensorDict indexing. Unlocked TensorDicts still clone in maybe_to_device. td.pack() is unused: replay and MARL leaves mix ranks and dtypes.

Fixes

  • import core algorithms without the LLM extras (#706)

  • count offloaded activations against host RAM

    The memory estimator now counts as host RAM the tensors fsdp.activation_offload moves off the GPU, the FSDP parameter shard fsdp.cpu_offload pins on host, and a fixed trainer-process baseline. DeviceSpec.host_bytes_per_gpu gives each GPU's share of its node's RAM (less an 8 GiB node reserve). A training plan over that share no longer fits, so the resolver picks gradient checkpointing or a smaller micro-batch. Resource tiers with ram_gb set the share; without it the host check is off.

  • include num_params in arena models supported

    ModelInfo.num_params is a computed field, so arena models supported includes each model's parameter count.

Other

  • build GitHub Release notes from first-parent history

    Release notes list first-parent commits between tags. A merge that lands an import PR is one changelog entry with that PR title, not the commits on the pull request branch.

Full Changelog: v2.60.0...v2.61.0

agilerl-arena/v1.33.0: agilerl-arena v1.33.0: reject manifests that set both num_epochs and max_steps

Released on 2026-11-09 - GitHub - PyPI

Features

  • reject manifests that set both num_epochs and max_steps

    Arena validation now raises when training.num_epochs and training.max_steps are both set. Pick one: epochs for an epoch-driven run, steps for a step-driven run. An unset max_steps is omitted from the submitted payload, so the default is not treated as an authored step cap. Dataset-backed GRPO schema defaults set max_steps to null when they default num_epochs to 1. SFT and DPO example configs keep num_epochs only.

  • LLM-as-judge rubric

    LLMJudgeRubric scores an episode with an LLM judge against criteria you write. It builds on OpenEnv's LLMJudge: the judge reads the prompt, each turn's text after its reasoning, and the environment's replies (include_reasoning=True adds the reasoning), and returns a {"score": ...} verdict in [0, 1]. On dataset rows it reads the row's question and is shown the row's answer as REFERENCE ANSWER. It scores the episode's last turn unless every_turn=True; an unreadable verdict scores 0.

    Configure the judge with judge next to rubric_file_path in the environment spec: provider (openai or anthropic), model, optional base_url for any OpenAI-compatible endpoint (a URL with a path, such as https://openrouter.ai/api/v1, is used as given; a bare host gets /v1), api_key_env (the name of the variable holding the key, required for a hosted API), max_concurrency, timeout_s (per request attempt; the provider SDK retries), temperature and max_tokens. A Rubric class whose __init__ takes judge is built with one shared client per process, so judge calls from every rollout slot share a concurrency cap.

    Rubrics with an async forward now run in RolloutHarness, which also passes each rubric the episode transcript on TurnObservation.transcript. Rubrics score a turn after the harness applies it, so TurnObservation.done is true on any episode ending, and reset() reaches child rubrics. LLM training logs each rubric component's mean score as reward_<component>, counting an episode a Gate or Sequential skipped as 0, plus judge_calls, judge_parse_failure_rate and judge_mean_latency_s. Anthropic judges work with anthropic>=1, whose Messages API takes no temperature, so setting one on an Anthropic judge is rejected.

    Breaking: get_rubric is removed; use get_rubric_factory(name, path)(). Two rubric leaves reporting one component name now raise ValueError.

  • SFT on multi-turn tool conversations, laid out as rollouts build them

    SFT now trains on chat transcripts that match what RolloutHarness builds during a rollout, for every supported chat template family.

    • DatasetEnv accepts a messages column (OpenAI chat format) with an optional tools column. prompt/response rows become one user and one assistant message and use the same encoder, so single-turn SFT now trains the chat-template text instead of raw prompt + response + EOS.
    • encode_chat_transcript renders the prompt once. Each assistant turn is the text the model samples, through its stop token. Messages between turns are the tokens the harness splices in: the chat format's tool-result blocks (Gemma 4, gpt-oss) or the template's feedback frame. Only assistant tokens are trained (loss_mask).
    • Each rendered assistant turn must parse, with the model's ChatFormat, to the trace's tool calls, so SFT cannot train calls a rollout would not run.
    • DatasetEnv checks every SFT row at startup. Rows that cannot be encoded, or whose first assistant turn does not fit max_context_length, are dropped with a warning. Longer transcripts are cut at a complete assistant turn rather than truncated mid-turn.
    • An SFT DatasetEnv raises at startup if the tokenizer has no pad token.
    • None keys Arrow fills into struct tool arguments and schemas are removed. Unnamed tool results are named by tool_call_id, then by the calls left unanswered.
    • sample_eval_prompts reads messages rows.
    • ChatFormat.format_tool_calls writes calls for templates that drop structured tool_calls (Granite 3).
    • HarmonyFormat parses a call that opens the turn after the <|start|>assistant generation prompt.
    • ChatFormat.token_ids keeps a delimiter that is the tokenizer's unk token, so Granite 3.1 calls end at <|end_of_text|>.
    • SFT batches carry loss_mask; SFTPrompts changes shape.
  • context and tensor parallel for language model training

    Add FSDPConfig.cp. Ulysses shards the sequence for attention and gathers log-probs before the loss. Mamba and Qwen3.5 Gated DeltaNet context parallel compose with tensor parallel. Add tensor-parallel plans for gpt-oss, Qwen2, Qwen3, Qwen3.5, Gemma 4, Granite 3.1, Granite 4, and Nemotron, including tied embeddings split over tensor parallel, and expert parallel for gpt-oss and the Granite MoE models. Padded, packed, and context-parallel forwards share one sequence layout. gpt-oss and Granite 4 hybrid stay off flex-attention sequence packing. The memory estimator prices context-parallel activations, tensor-parallel plans, and FSDP weights on the data-parallel shard group.

  • sync merged LoRA weights to rollout engines with LoRA off

    Async rollout engines without quantization, vision-tower LoRA or MTP drafting can now run with vLLM's LoRA path off. The trainer merges W + scale * B @ A in fp32 for every weight the adapter changes, packed routed experts included, and the framework's agilerl.utils.lora_merge lists those weights and writes each merged tensor into a send buffer.

    The Arena memory estimator prices those engines without adapter slots or dual-stream LoRA memory, plus a two-round merged send buffer in the trainer and a one-round receive buffer in each engine. Its split planner prices merged and adapter sync over the probed link (NVLink on one node, else RDMA or TCP). Over NVLink it keeps merged sync while its step is within 10% of the adapter's; over RDMA or TCP it picks the faster mode. When merged-sync trainers don't fit, it falls back to adapter sync. For Qwen3.6-35B-A3B on 8x A100-80 with unset engine width, the max-context solve fits at tensor parallel 2.

  • train MiMo-V2.6-Flash, GLM-5.3-Flash and DeepSeek-V4-Flash with tensor, context and expert parallelism

    Train XiaomiMiMo/MiMo-V2.6-Flash-RL, zai-org/GLM-5.3-Flash and deepseek-ai/DeepSeek-V4-Flash-0731 with LoRA and FSDP2 under tensor parallel (fsdp.tp), context parallel (fsdp.cp), expert parallel (fsdp.ep), or any mix of them. MoE models need ep >= tp.

    • Each family has a runtime config with its chat format, reasoning parser, LoRA exclusions and a tensor-parallel plan. Routed experts stay on expert parallel.
    • DeepSeek-V4 and GLM-5.3 have context-parallel plans that keep queries on the local sequence shard and gather the keys with the new agilerl.distributed.context_parallel.gather_sequence_for_cp. MiMo-V2 uses Ulysses over flex attention. Context-parallel validation checks the TP-local head counts against cp.
    • MiMo-V2 loads natively from its FP8 / MXFP4 checkpoint and runs flex attention with sinks. DeepSeek-V4 trains on flex attention with sequence packing. GLM-5.3 skips its sparse-attention indexer when top-k covers every key. DeepSeek-V4 and GLM-5.3 share a compiled hyper-connection Sinkhorn; GLM-5.3 and MiMo-V2 use Liger RMSNorm and SwiGLU.
    • New chat formats Glm47Format and DsmlFormat (DeepSeek-V4). A tokenizer without a chat template gets its family's template.
    • fsdp.cpu_offload with ep > 1 raises; use optim_cpu_offload.
    • agilerl-arena: catalogue entries for the three models, and memory estimates that cover tensor-parallel splits less the parameters each plan keeps whole, attention sinks, per-layer-kind KV with v_head_dim, context-parallel padding to cp * 64 tokens and key gathers, compressed KV entries, hyper-connection streams, and vLLM's expert LoRA copy. These models default the rollout engine's gpu_memory_utilization to 0.85, and their pre-quantized checkpoints keep adapter LoRA sync.

    Breaking: checkpoint_key_candidates requires base_model_prefix, tensor_parallel_params requires tensor_parallel, engine_weight_bytes takes arch first, and resolve_gpu_memory_utilization requires hub_id.

  • size merged and fp8 inference in arena memory solve --inference

    arena memory solve --inference sizes a vLLM engine with LoRA off, for serving a merged LoRA model: no adapter slot and no dual-stream LoRA memory. It reuses GenerationSettings.merged_lora_sync; training estimates are unchanged. --quantization fp8 sizes vLLM fp8 engine weights at one byte per parameter; it needs a catalogued GPU with native fp8 (compute capability 8.9+) and is rejected for training manifests, which set vllm_config.quantization instead. agilerl.utils.lora_merge.merged_export_is_complete(path) reports whether export_merged_pretrained finished writing a directory.

  • resolve training parallelism and node count in the memory estimate

    The memory estimator chooses a training layout and a node count when the manifest does not pin them. Layouts run from least parallel to most: data parallel or fully sharded, then HSDP across one node's GPUs, then one raised axis (expert, context, then tensor parallel), then two, then all three. The first layout that fits is kept. A tp, ep, cp, or shard_group_size set on the manifest stays as written. Searched expert groups and tensor x context groups stay within one node, an expert-parallel degree must divide the expert count, and tensor and context degrees must split the model's heads. Expert parallel is only searched for models the trainer shards over experts, context parallel only where the trainer splits the model's sequences, and a searched mixture-of-experts layout keeps ep at or above tp.

    Node counts are tried fewest first, then tiers by price. The first fit locks the layout and the node count. A tier with at least as many GPUs per node, and GPU memory within 512 MiB of the lock, is priced again at that same layout and node count. node_counts limits the counts that are searched. Without it, num_gpus is the whole allocation and gpus_per_node is the node size.

    At each layout the run picks merged-LoRA or adapter weight sync; a mode that fits with the memory buffer wins over one that fits only without it.

    arena memory --json reports parallelism (tp, ep, cp, shard_group_size) and num_nodes. A tier that fits also reports trainers, engines, and engine tensor parallel. The engine-width search prefers a width that keeps every requested sequence resident. If a pinned max_num_seqs does not fit in the KV pool, that tier's generation bar warns that sequences may queue.

    The context-length solver sizes the run the same way the memory check does, so its answer matches the check. It prices only the phases it checks, and stops once a larger value cannot fit.

    A dumped fsdp section writes only the tp, ep, cp, and shard_group_size the manifest set, so fsdp: {} is still searched after the manifest is reloaded.

    arena experiments submit and ArenaClient.submit_experiment accept a GPU count and a short GPU name (h100-80, b200, l4). Arena picks the fewest nodes. With no resource flags, Arena picks the cheapest fit.

  • clearer arena CLI output for agents and scripts

    • arena --json (or ARENA_JSON) prints results as JSON on stdout and errors as JSON on stderr. Logs now go to stderr.
    • Piped tables are no longer truncated.
    • New arena manifest template ALGORITHM prints a starter manifest.
    • arena memory estimate uses the catalog's parameter count, which corrects a large underestimate for openai/gpt-oss-20b. Catalog models with a count no longer need the Hub, and an unreachable Hub falls back to the analytic count.
    • arena manifest validate warns when an LLM manifest's model is outside the Arena catalog, deprecated, or in preview, and suggests the closest name. A relative checkout that already has config.json is local: no warning, and no Hub id suggestion. The exit code is unchanged; --json gains a warnings list.
    • The unknown-algorithm error lists aliases once (Recurrent PPO / RecurrentPPO) and suggests the closest name.
    • arena memory estimate and solve read the bundled config.json for catalog models, so they work offline without huggingface_hub or --config.
    • arena models list shows model, parameter count, max context and status instead of raw LoRA JSON; use arena models info for LoRA detail.
    • --help shows option defaults.
    • arena experiments list, arena experiments checkpoints and arena agent list say when there is nothing to show and suggest the next command.
  • train on verifiers (Prime Intellect Hub) envs

    Serve a verifiers v1 environment behind the factory/entrypoint seam (agilerl.llm_envs.verifiers_env:make, new agilerl[verifiers] extra). The adapter points the env's model endpoint at a local server and holds each request open until step() supplies the reply, so the verifiers episode loop advances one model call per step; the rollout harness still tokenises and masks, so training uses our own tokens. Tasksets without tools are served as text envs; a taskset whose tasks bring tools is served as an MCP environment, with each episode's tools from reset under the new episode_tools info key that the harness renders and parses against. Every call the harness steps carries its whole turn on CallToolAction.metadata (turn_tool_calls, turn_tool_call_index); a turn without a call reaches verifiers as prose through the verifiers_reply answer tool. A remote MCP environment counts as taking tool calls when it answers a tool listing, even an empty one. Single-agent envs whose transcript only grows are served, and infinite tasksets need num_tasks; anything else raises instead of guessing. verifiers keeps event-loop-bound state per process, so all envs in a process share one loop. The verifiers extra pins verifiers 0.4.1.dev63 and adds openenv. Linux GPU CI retries the flash-attn wheel download when that host returns 504.

Optimizations

  • bump tensordict to 0.15

    TensorDict 0.15.1. ReplayBuffer._normalize_dims uses td.apply so the caller is not reshaped. share_encoder_parameters writes detached encoder leaves without keeping Parameter slots. Expert-parallel checkpoint replay compares routed counts on host lists. to_agent_tensors and EvolvableAlgorithm.to_device use bulk TensorDict.to. Experience helpers use TensorDict.cat, TensorDict.stack, batch reshape, and TensorDict indexing. Unlocked TensorDicts still clone in maybe_to_device. td.pack() is unused: replay and MARL leaves mix ranks and dtypes.

Fixes

  • include num_params in arena models supported

    ModelInfo.num_params is a computed field, so arena models supported includes each model's parameter count.

Full Changelog: agilerl-arena/v1.32.0...agilerl-arena/v1.33.0

agilerl-arena/v1.32.0: agilerl-arena v1.32.0: score any rollout env with a rubric

Released on 2026-11-09 - GitHub - PyPI

Features

  • score any rollout env with a rubric

    RolloutHarness takes an optional OpenEnv Rubric that scores every turn of any rollout environment, replacing the env's reward for that turn. Rubrics receive a TurnAction (the text the env received, the full completion with reasoning, parsed tool calls) and a TurnObservation (the env's reward, whether the env ran, whether the episode is done, the prompt, and any question / answer labels). EnvReward brings the env's own reward in as a component, so it can be combined with format or other checks using OpenEnv's WeightedSum, Gate and Sequential.

    rubric_file_path / rubric_name now work with entrypoint, env_url and env_image sources as well as dataset rows.

    Breaking: QADatasetEnv no longer takes a rubric or scores completions; it serves rows and puts question / answer on the terminal observation, and the harness rubric scores them. RolloutHarness.from_dataset(rows, rubric, ...) is unchanged.

Optimizations

  • fuse Qwen GDN gated RMSNorm and Triton expert LoRA

    Qwen3.5 and Qwen3.6 GatedDeltaNet now run fla's fused gated RMSNorm when flash-linear-attention imports, and pass grouped query and key heads into fla's scans. The PyTorch scan fallback still repeats those heads out to the value-head count.

    On the Triton expert backend, one unmasked expert LoRA is added in the base grouped GEMM's accumulator, router weights scale rows inside the scatter, and a gated SiLU runs as one SwiGLU kernel. Mixed-adapter routing and the recompute path still add LoRA deltas after the base projection.

    The activation estimate charges GDN query and key at the key-head width and uses the fused norm's saved set. For Qwen3.6-35B-A3B at 32k tokens that GDN saved set is 1924 MiB, and the solved engine width for that model on 8x A100-80 with unset engine width needs tensor parallel 4.

Fixes

  • import core algorithms without the LLM extras (#706)

  • count offloaded activations against host RAM

    The memory estimator now counts as host RAM the tensors fsdp.activation_offload moves off the GPU, the FSDP parameter shard fsdp.cpu_offload pins on host, and a fixed trainer-process baseline. DeviceSpec.host_bytes_per_gpu gives each GPU's share of its node's RAM (less an 8 GiB node reserve). A training plan over that share no longer fits, so the resolver picks gradient checkpointing or a smaller micro-batch. Resource tiers with ram_gb set the share; without it the host check is off.

Other

  • build GitHub Release notes from first-parent history

    Release notes list first-parent commits between tags. A merge that lands an import PR is one changelog entry with that PR title, not the commits on the pull request branch.

Full Changelog: agilerl-arena/v1.31.0...agilerl-arena/v1.32.0

v2.60.0: reasoning parser for every supported LLM, and include_reasoning on LLM envs

Released on 2026-11-02 - GitHub - PyPI

Features

  • reasoning parser for every supported LLM, and include_reasoning on LLM envs

    • agilerl-arena: REASONING_PARSERS maps each thinking model_type to its vLLM 0.32 reasoning parser (Qwen3 family, Gemma 4, Nemotron, gpt-oss). NON_REASONING_MODEL_TYPES lists Qwen2.5 and Granite. A test fails when a supported model is in neither list.
    • A thinking_token_budget is rejected at manifest validation and in LocalTrainer when the model's reasoning parser cannot force the end of reasoning (gpt-oss). An unknown vllm_engine_args.reasoning_parser is rejected.
    • The architecture catalog sets ModelRuntimeConfig.reasoning_parser per family, next to tool_call_parser. It is not passed to the colocated vLLM engine.
    • The rollout harness finds each turn's reasoning end by token id (</think>, Gemma's <channel|>, the gpt-oss final-channel header). An env that runs the action receives only the text after it.
    • New LLMEnvSpec.include_reasoning. Unset: dataset rollouts scored by a reward file receive the whole turn, reasoning markers included. Entrypoint and URL envs receive only the action. true or false overrides. Documented in docs/llm_finetuning/environments.rst.

    Behavior change: reward functions on dataset rollouts now see reasoning and its markers by default, so format rewards that check for </think> can score. Set include_reasoning: false to score only the answer.

  • provision Nebius and AWS clusters from the Arena CLI

    Enterprise cluster commands are now arena cluster (replacing arena on-prem). The CLI can provision a Kubernetes cluster on Nebius or AWS from a YAML spec, pin a Terraform module release, store Terraform state in a dedicated bucket, and register GPU resource classes. On Nebius, a class records the preset CPU count and decimal GB, plus a description. The default worker is an Intel L40S. A node group is created only when requested. A stored size such as 59.6 GiB is left unchanged when it is the same byte count as 64 GB, including GPU memory. AWS clusters run Cilium without kube-proxy, expose inference through a Cilium Gateway on an NLB, and scale GPU worker groups from zero with the cluster autoscaler. Re-running from another directory, including register-classes, loads stored project ids from Arena and opens that remote state instead of creating a second cluster. arena cluster destroy accepts --name when you do not have the spec file. --all also deletes that cluster's buckets, IAM, and Nebius projects the CLI created, even after stored ids are filled in. arena cluster status hides Terraform secrets. --install deploys the agent chart; --install-storage and --lab install bundled MinIO only.

  • faster LLM RL training: bf16 LM head, planned DDP/FSDP, token-budget micro-batches

    • LM head: bf16 GEMMs with fp32 output, on scored tokens only. One log-prob and loss path for GRPO, CISPO, LLMPPO, REINFORCE, SFT and DPO. The Liger fused loss is removed; Liger layer kernels stay, now also for granitemoe and granitemoehybrid.
    • The training-memory planner in agilerl.arena.memory.resolve picks the fastest plan that fits: DDP or FSDP, the packed micro-batch token budget, the checkpoint stride, the FSDP frozen-base residency and the routed-expert chunk. Learn and decode costs are per GPU. resolve.split picks the trainer / rollout-engine GPU split. Manifests cannot set planner-owned fields.
    • DDP LoRA computes in bf16 with fp32 master weights.
    • Sequence packing covers SFT, DPO, LLMPPO with FlashAttention-2, and Granite hybrid models. No-grad passes pack. Hybrid models warm their packed kernels before the first learn step.
    • MoE routed experts run Triton on sm80 and sm90 and grouped_mm on sm100; they raise if no kernel can run.
    • Every weight sync starts a fresh prefix cache. Multi-turn rollout engines on attention-only models draft with n-gram speculation by default.
    • At beta: 0, rows with zero advantage skip forward and backward. Exactly tied reward groups get advantage 0 in every normalisation mode; whitening keeps zeros at zero and leaves them out of its statistics.
    • Async LLM rollouts drop tied reward groups, replay a stored completion into tied groups (group_replay_max_age 20) and draw tasks by their recent rate of differing rewards, all by default. RolloutCollector samples adaptively by default. The GPU split prices the extra generation.
    • max_rollout_version_lag defaults to 2 and rejects null. LoRA dropout defaults to 0. GPUs below sm80 are rejected for LLM training.
    • export_merged_pretrained merges routed-expert LoRA into packed expert weights and writes an untied lm_head.
    • Learn rows and async rollout groups are dealt by tokens, so ranks that wait on each other every micro-batch train about the same tokens.
    • The memory estimator follows all of the above.
    • Breaking: removed agilerl.algorithms.core.llm_ops.fused_loss, agilerl.arena.memory.resolve.liger, resolve.checkpointing, fp32_lm_head_operands, scored_position_index and broadcast_fsdp_memory_pick; resolve_fsdp_memory is now resolve.fsdp.resolve_training_memory and the manifest-level resolver is resolve.split.resolve_run_memory; renamed VLLM_ENGINE_MAX_NUM_BATCHED_TOKENS to ROLLOUT_ENGINE_MAX_NUM_BATCHED_TOKENS and grouped_mm_supported to device_expert_backend; an omitted algorithm.fsdp no longer means DDP; training.reuse_prefix_cache_across_syncs removed.
  • opt-in reference adapter refresh every N optimizer steps

    LLM algorithms can refresh the KL reference adapter on a fixed optimizer-step schedule. The reference stays fixed by default.

    • New reference_update_interval (default None) on GRPO, PPO (LLM), REINFORCE and DPO, and on the Arena manifest (algorithm.reference_update_interval). When set, every trainer copies the actor onto the reference every N optimizer steps.
    • set_reference_policy() takes no arguments. Dataset-backed runs no longer refresh the reference once per epoch.
    • LLMAlgorithm.optimizer_steps counts optimizer steps and is saved with checkpoints.
  • format parser owns the reasoning end

    agilerl.llm_envs.tool_parsers becomes agilerl.llm_envs.chat_formats: ToolParser is now ChatFormat (with ToolCallTagFormat, Granite3Format, Gemma4Format, HarmonyFormat), extract is extract_tool_calls, format_responses is format_tool_results, and the tool_call_parser argument is chat_format. Each chat format declares where its reasoning ends: </think> for the tag format, <channel|> for Gemma 4, and <|channel|>final<|message|> for gpt-oss. action_text() splits a turn on those token ids, with a plain-text </think> fallback for prompt-taught formats. The harness and the rollout env factories read this one definition.

    gpt-oss tool results are formatted by HarmonyFormat.format_tool_results, since its chat template only renders a tool result after a structured tool call. A sampled <|return|> or <|call|> now closes the message, so the feedback frame's <|end|> is not duplicated.

    Breaking: the renames above, and action_span moves from agilerl.llm_envs.harness to agilerl.llm_envs.chat_formats. Also removes the unreleased RolloutHarness(reasoning_end_ids=...) and make_rollout_env_factory(reasoning_parser=...), since the parser is resolved from the model family, and renames the unreleased REASONING_END_MARKERS in agilerl.arena.models.model_info to KNOWN_REASONING_PARSERS.

    Adds frame-fidelity tests against eight real chat templates at pinned Hub revisions. They need a Hugging Face token (HF_TOKEN) and skip without one; Gemma 4 is gated.

Fixes

  • bound support logprob chunks to one vocab tile

    Scoring logprobs over a vLLM sampling support gathered at least chunk_rows tokens of lm_head rows per chunk. A support as wide as the vocabulary then gathered a (chunk_rows, V, H) tensor and ran out of GPU memory. A chunk is now the most tokens whose gathered lm_head rows fit in one (chunk_rows, V) tile, with a floor of one token so a single support is never split. The agilerl-arena memory estimate uses the same count.

  • one rule per LLM training decision, shared by training and memory estimates

    Training, serving, and the memory estimator each decided kernels, sizing, and rollout layout on their own, with silent fallbacks when they disagreed. Options that only picked an implementation multiplied the untested paths.

    LLMPPO always fuses actor and critic. Each implementation choice (Liger loss and kernels, attention backend, packing, gradient checkpointing, MoE kernels, rollout engines, FSDP and batch sizing, and more) is one function in agilerl.arena.memory.resolve that training, the estimator, and submit validation all call. The user options for those choices are removed. Memory trade-offs are resolved by the estimator to the fastest setting that fits.

  • allow root CLI help without valid auth

    Treat capabilities HTTP 404/401/403 as unavailable so arena --help does not raise when credentials are missing or rejected.

  • call dataset reward functions by argument name

    reward_fn_to_rubric calls the wrapped scorer with completion, answer, and question by keyword. Parameter order no longer decides which value each argument receives. A scorer has to accept those three names.

    The countdown finetuning tutorials use those parameter names.

  • keep Nebius project ids and listed preset regions

    Re-registering a cluster copies Nebius project_id and storage_project_id from Terraform outputs when the spec leaves them unset.

    Preset registration keeps a resource class enabled in every region that lists the preset, including regions with no free VMs, and disables the class only when no region offers it. gpu-gb300 is recorded as 279 GB per GPU.

    The Arena client retries an HTTP 429, waiting for Retry-After (at most 60 seconds) for up to five retries.

  • Granite 3 tool calls with a stop token, reject gpt-oss expert parallel, and FSDP cpu_offload without a colocated engine

    Granite3Format ends the call array at <|end_of_text|>. Generated token ids keep the stop token after the array, so every Granite 3 tool call parsed as invalid JSON.

    ModelInfo.supports_expert_parallel is False for openai/gpt-oss-20b. Expert parallelism shards routed and sorted expert stacks; gpt-oss stores its experts transposed with per-expert biases, which it rejects at init.

    FSDPRuntime.prepare_actor and DPRuntime.prepare_actor drop the unused colocated argument. SFT and DPO can offload parameters without a colocated vLLM engine. HuggingFace generate still rejects cpu_offload. With cpu_offload, non-FSDP-managed parameters (embeddings, tiny replicated params) and buffers move to the compute device after load instead of staying on CPU.

    Expert-parallel fused adapter routing now covers nested LoRA wrapper chains: a token block whose local rows use one adapter no longer strands chain members on the global mixed routing.

    The cpu_offload device move keeps each parameter in place, so tied embeddings stay tied. cpu_offload with expert parallelism spanning the whole shard group now raises, because those experts sit outside FSDP and would stay on CPU.

    agilerl.arena.memory.manifest.marlin_pads_non_gated_experts reports when vLLM 0.32's Marlin FP8 MoE prep would fail on non-gated (relu2) experts: an fp8 engine on moe_backend='marlin' whose per-GPU expert width is not a multiple of 64. run_config_from_manifest sizes such an engine in bf16 on Triton.

  • say why no trainer / rollout-engine split fits

    When agilerl.arena.memory.resolve.split.resolve_run_memory finds no GPU split, the ValueError names the cause: training over memory at every FSDP-legal trainer count, a batch size or pinned rollout batch size no fitting trainer count divides, a micro_batch_size_per_gpu or mini_batch_size no sharded rank divides, an FSDP tensor-parallel, expert-parallel, or shard-group width wider than the trainers, or no room for a trainer beside a rollout engine. Each message says what to change instead of asking for training_gpus_per_agent and rollout_engines_per_agent. TrainingMemoryUnfitError now suggests more or larger GPUs per agent or a shorter context length.

Other

  • Write merged LoRA export keys under checkpoint names

    The merged LoRA export now writes canonical parameter names (no activation-checkpoint wrapper segments) and skips non-persistent buffers, so the output loads as a Hugging Face checkpoint.

Full Changelog: v2.59.0...v2.60.0

agilerl-arena/v1.31.0: agilerl-arena v1.31.0: reasoning parser for every supported LLM, and include_reasoning on LLM envs

Released on 2026-11-02 - GitHub - PyPI

Features

  • reasoning parser for every supported LLM, and include_reasoning on LLM envs

    • agilerl-arena: REASONING_PARSERS maps each thinking model_type to its vLLM 0.32 reasoning parser (Qwen3 family, Gemma 4, Nemotron, gpt-oss). NON_REASONING_MODEL_TYPES lists Qwen2.5 and Granite. A test fails when a supported model is in neither list.
    • A thinking_token_budget is rejected at manifest validation and in LocalTrainer when the model's reasoning parser cannot force the end of reasoning (gpt-oss). An unknown vllm_engine_args.reasoning_parser is rejected.
    • The architecture catalog sets ModelRuntimeConfig.reasoning_parser per family, next to tool_call_parser. It is not passed to the colocated vLLM engine.
    • The rollout harness finds each turn's reasoning end by token id (</think>, Gemma's <channel|>, the gpt-oss final-channel header). An env that runs the action receives only the text after it.
    • New LLMEnvSpec.include_reasoning. Unset: dataset rollouts scored by a reward file receive the whole turn, reasoning markers included. Entrypoint and URL envs receive only the action. true or false overrides. Documented in docs/llm_finetuning/environments.rst.

    Behavior change: reward functions on dataset rollouts now see reasoning and its markers by default, so format rewards that check for </think> can score. Set include_reasoning: false to score only the answer.

  • provision Nebius and AWS clusters from the Arena CLI

    Enterprise cluster commands are now arena cluster (replacing arena on-prem). The CLI can provision a Kubernetes cluster on Nebius or AWS from a YAML spec, pin a Terraform module release, store Terraform state in a dedicated bucket, and register GPU resource classes. On Nebius, a class records the preset CPU count and decimal GB, plus a description. The default worker is an Intel L40S. A node group is created only when requested. A stored size such as 59.6 GiB is left unchanged when it is the same byte count as 64 GB, including GPU memory. AWS clusters run Cilium without kube-proxy, expose inference through a Cilium Gateway on an NLB, and scale GPU worker groups from zero with the cluster autoscaler. Re-running from another directory, including register-classes, loads stored project ids from Arena and opens that remote state instead of creating a second cluster. arena cluster destroy accepts --name when you do not have the spec file. --all also deletes that cluster's buckets, IAM, and Nebius projects the CLI created, even after stored ids are filled in. arena cluster status hides Terraform secrets. --install deploys the agent chart; --install-storage and --lab install bundled MinIO only.

  • faster LLM RL training: bf16 LM head, planned DDP/FSDP, token-budget micro-batches

    • LM head: bf16 GEMMs with fp32 output, on scored tokens only. One log-prob and loss path for GRPO, CISPO, LLMPPO, REINFORCE, SFT and DPO. The Liger fused loss is removed; Liger layer kernels stay, now also for granitemoe and granitemoehybrid.
    • The training-memory planner in agilerl.arena.memory.resolve picks the fastest plan that fits: DDP or FSDP, the packed micro-batch token budget, the checkpoint stride, the FSDP frozen-base residency and the routed-expert chunk. Learn and decode costs are per GPU. resolve.split picks the trainer / rollout-engine GPU split. Manifests cannot set planner-owned fields.
    • DDP LoRA computes in bf16 with fp32 master weights.
    • Sequence packing covers SFT, DPO, LLMPPO with FlashAttention-2, and Granite hybrid models. No-grad passes pack. Hybrid models warm their packed kernels before the first learn step.
    • MoE routed experts run Triton on sm80 and sm90 and grouped_mm on sm100; they raise if no kernel can run.
    • Every weight sync starts a fresh prefix cache. Multi-turn rollout engines on attention-only models draft with n-gram speculation by default.
    • At beta: 0, rows with zero advantage skip forward and backward. Exactly tied reward groups get advantage 0 in every normalisation mode; whitening keeps zeros at zero and leaves them out of its statistics.
    • Async LLM rollouts drop tied reward groups, replay a stored completion into tied groups (group_replay_max_age 20) and draw tasks by their recent rate of differing rewards, all by default. RolloutCollector samples adaptively by default. The GPU split prices the extra generation.
    • max_rollout_version_lag defaults to 2 and rejects null. LoRA dropout defaults to 0. GPUs below sm80 are rejected for LLM training.
    • export_merged_pretrained merges routed-expert LoRA into packed expert weights and writes an untied lm_head.
    • Learn rows and async rollout groups are dealt by tokens, so ranks that wait on each other every micro-batch train about the same tokens.
    • The memory estimator follows all of the above.
    • Breaking: removed agilerl.algorithms.core.llm_ops.fused_loss, agilerl.arena.memory.resolve.liger, resolve.checkpointing, fp32_lm_head_operands, scored_position_index and broadcast_fsdp_memory_pick; resolve_fsdp_memory is now resolve.fsdp.resolve_training_memory and the manifest-level resolver is resolve.split.resolve_run_memory; renamed VLLM_ENGINE_MAX_NUM_BATCHED_TOKENS to ROLLOUT_ENGINE_MAX_NUM_BATCHED_TOKENS and grouped_mm_supported to device_expert_backend; an omitted algorithm.fsdp no longer means DDP; training.reuse_prefix_cache_across_syncs removed.
  • opt-in reference adapter refresh every N optimizer steps

    LLM algorithms can refresh the KL reference adapter on a fixed optimizer-step schedule. The reference stays fixed by default.

    • New reference_update_interval (default None) on GRPO, PPO (LLM), REINFORCE and DPO, and on the Arena manifest (algorithm.reference_update_interval). When set, every trainer copies the actor onto the reference every N optimizer steps.
    • set_reference_policy() takes no arguments. Dataset-backed runs no longer refresh the reference once per epoch.
    • LLMAlgorithm.optimizer_steps counts optimizer steps and is saved with checkpoints.
  • format parser owns the reasoning end

    agilerl.llm_envs.tool_parsers becomes agilerl.llm_envs.chat_formats: ToolParser is now ChatFormat (with ToolCallTagFormat, Granite3Format, Gemma4Format, HarmonyFormat), extract is extract_tool_calls, format_responses is format_tool_results, and the tool_call_parser argument is chat_format. Each chat format declares where its reasoning ends: </think> for the tag format, <channel|> for Gemma 4, and <|channel|>final<|message|> for gpt-oss. action_text() splits a turn on those token ids, with a plain-text </think> fallback for prompt-taught formats. The harness and the rollout env factories read this one definition.

    gpt-oss tool results are formatted by HarmonyFormat.format_tool_results, since its chat template only renders a tool result after a structured tool call. A sampled <|return|> or <|call|> now closes the message, so the feedback frame's <|end|> is not duplicated.

    Breaking: the renames above, and action_span moves from agilerl.llm_envs.harness to agilerl.llm_envs.chat_formats. Also removes the unreleased RolloutHarness(reasoning_end_ids=...) and make_rollout_env_factory(reasoning_parser=...), since the parser is resolved from the model family, and renames the unreleased REASONING_END_MARKERS in agilerl.arena.models.model_info to KNOWN_REASONING_PARSERS.

    Adds frame-fidelity tests against eight real chat templates at pinned Hub revisions. They need a Hugging Face token (HF_TOKEN) and skip without one; Gemma 4 is gated.

Fixes

  • bound support logprob chunks to one vocab tile

    Scoring logprobs over a vLLM sampling support gathered at least chunk_rows tokens of lm_head rows per chunk. A support as wide as the vocabulary then gathered a (chunk_rows, V, H) tensor and ran out of GPU memory. A chunk is now the most tokens whose gathered lm_head rows fit in one (chunk_rows, V) tile, with a floor of one token so a single support is never split. The agilerl-arena memory estimate uses the same count.

  • one rule per LLM training decision, shared by training and memory estimates

    Training, serving, and the memory estimator each decided kernels, sizing, and rollout layout on their own, with silent fallbacks when they disagreed. Options that only picked an implementation multiplied the untested paths.

    LLMPPO always fuses actor and critic. Each implementation choice (Liger loss and kernels, attention backend, packing, gradient checkpointing, MoE kernels, rollout engines, FSDP and batch sizing, and more) is one function in agilerl.arena.memory.resolve that training, the estimator, and submit validation all call. The user options for those choices are removed. Memory trade-offs are resolved by the estimator to the fastest setting that fits.

  • allow root CLI help without valid auth

    Treat capabilities HTTP 404/401/403 as unavailable so arena --help does not raise when credentials are missing or rejected.

  • call dataset reward functions by argument name

    reward_fn_to_rubric calls the wrapped scorer with completion, answer, and question by keyword. Parameter order no longer decides which value each argument receives. A scorer has to accept those three names.

    The countdown finetuning tutorials use those parameter names.

  • keep Nebius project ids and listed preset regions

    Re-registering a cluster copies Nebius project_id and storage_project_id from Terraform outputs when the spec leaves them unset.

    Preset registration keeps a resource class enabled in every region that lists the preset, including regions with no free VMs, and disables the class only when no region offers it. gpu-gb300 is recorded as 279 GB per GPU.

    The Arena client retries an HTTP 429, waiting for Retry-After (at most 60 seconds) for up to five retries.

  • Granite 3 tool calls with a stop token, reject gpt-oss expert parallel, and FSDP cpu_offload without a colocated engine

    Granite3Format ends the call array at <|end_of_text|>. Generated token ids keep the stop token after the array, so every Granite 3 tool call parsed as invalid JSON.

    ModelInfo.supports_expert_parallel is False for openai/gpt-oss-20b. Expert parallelism shards routed and sorted expert stacks; gpt-oss stores its experts transposed with per-expert biases, which it rejects at init.

    FSDPRuntime.prepare_actor and DPRuntime.prepare_actor drop the unused colocated argument. SFT and DPO can offload parameters without a colocated vLLM engine. HuggingFace generate still rejects cpu_offload. With cpu_offload, non-FSDP-managed parameters (embeddings, tiny replicated params) and buffers move to the compute device after load instead of staying on CPU.

    Expert-parallel fused adapter routing now covers nested LoRA wrapper chains: a token block whose local rows use one adapter no longer strands chain members on the global mixed routing.

    The cpu_offload device move keeps each parameter in place, so tied embeddings stay tied. cpu_offload with expert parallelism spanning the whole shard group now raises, because those experts sit outside FSDP and would stay on CPU.

    agilerl.arena.memory.manifest.marlin_pads_non_gated_experts reports when vLLM 0.32's Marlin FP8 MoE prep would fail on non-gated (relu2) experts: an fp8 engine on moe_backend='marlin' whose per-GPU expert width is not a multiple of 64. run_config_from_manifest sizes such an engine in bf16 on Triton.

  • say why no trainer / rollout-engine split fits

    When agilerl.arena.memory.resolve.split.resolve_run_memory finds no GPU split, the ValueError names the cause: training over memory at every FSDP-legal trainer count, a batch size or pinned rollout batch size no fitting trainer count divides, a micro_batch_size_per_gpu or mini_batch_size no sharded rank divides, an FSDP tensor-parallel, expert-parallel, or shard-group width wider than the trainers, or no room for a trainer beside a rollout engine. Each message says what to change instead of asking for training_gpus_per_agent and rollout_engines_per_agent. TrainingMemoryUnfitError now suggests more or larger GPUs per agent or a shorter context length.

Other

  • Write merged LoRA export keys under checkpoint names

    The merged LoRA export now writes canonical parameter names (no activation-checkpoint wrapper segments) and skips non-persistent buffers, so the output loads as a Hugging Face checkpoint.

Full Changelog: agilerl-arena/v1.30.0...agilerl-arena/v1.31.0

v2.59.0: train vision-language checkpoints with their own architecture

Released on 2026-10-28 - GitHub - PyPI

Features

  • support Qwen3.5 models in agilerl-arena, deprecate Qwen3

    Adds Qwen/Qwen3.5-0.8B, Qwen/Qwen3.5-2B, Qwen/Qwen3.5-4B, and Qwen/Qwen3.5-9B to SUPPORTED_MODEL_INFO with their LoRA targets, allowed ranks, and bundled config.json. Marks Qwen/Qwen3-1.7B and Qwen/Qwen3-4B deprecated. The memory estimator now counts the fp32 query upcast from Qwen3.5 attention QK norms. The Qwen3.5 language-tower weight mapper also covers the adapter-form language_model infix vLLM sees when loading LoRA, so text adapters sync onto tower engines.

  • pin library workarounds to the releases they were checked against

    Add agilerl.utils.patching.library_shim, a decorator that records which release range of vLLM, transformers, peft, liger-kernel or torch a workaround was checked against. Calling a decorated shim with an installed release outside that range raises UnsupportedLibraryVersionError, naming the shim, the range and the installed version. Shims are listed in agilerl.utils.patching.LIBRARY_SHIMS. The vLLM, transformers, peft, Liger and torch workarounds in agilerl.architectures, agilerl.lora.fused, agilerl.distributed.fsdp_blocks and the colocated vLLM helpers now carry their ranges.

  • expose expert-parallel support and routed expert count

    ModelInfo reports supports_expert_parallel and num_routed_experts. The flag is true when the model has packed expert modules. The count is read from the language config (n_routed_experts, num_experts, or num_local_experts) and is null when the model has no packed experts.

  • load CLI plugins from the agilerl.arena.cli entry-point group

    Installed packages can add commands to the arena CLI by declaring an entry point in the agilerl.arena.cli group that names a callable taking the root click group, e.g. [project.entry-points."agilerl.arena.cli"] my = "pkg.cli:register". With no plugins installed the CLI is unchanged.

  • price tensor parallel, expert parallel and NCCL process groups, and tighten LLM training and vLLM engine estimates

    The agilerl-arena memory estimator now sizes fsdp.tp and fsdp.ep. Under tensor parallel an untied lm_head sits at 1/tp outside the FSDP gather; families with a training tensor-parallel plan (nemotron_h) also shard their decoder linears and per-layer activations. Under expert parallel each rank keeps its share of the routed experts and their LoRA, each MoE backward adds token-exchange buffers, and tensor-parallel ranks route a share of the tokens each. NCCL memory is charged per process group, by size and by whether the group spans nodes.

    Training estimates now cover HF's unfused Mamba path on compute capability 8.9 GPUs, hybrids that run one mixer per layer (Granite 4), gpt-oss's expert intermediates, DPO's Liger loss, and Liger above token level. vLLM engine estimates keep the start-up profile's peak, add a compiling engine's per-layer embedding copy, size hybrid KV capacity by vLLM's block pool and SSM state dtype, and hold sliding-window KV for the scheduler's in-flight tokens. The H100 80GB catalogue entry uses its CUDA-visible 79.11 GiB. DeviceSpec.nccl_bytes, NCCL_BYTES_BY_DEVICE and NCCL_BYTES_DEFAULT are replaced by per-group NCCL bytes.

Fixes

  • do not save the routed EP counts copy in packed-expert block checkpoints

    Selective checkpointing on packed-expert blocks saves every device-to-host copy. Routed expert-parallel counts skip that copy on recompute, so the next host copy (grouped-matmul fallback .tolist(), or actor/critic adapter ids) replayed a stale counts tensor and crashed with split_with_sizes(): found element of type list at pos 0.

    The routed counts copy is now flagged and not saved, so the saved copies stay in order and the recompute adds no host syncs. This hits expert-parallel training with gradient checkpointing on packed-expert blocks when the grouped-matmul fallback runs (GPUs other than compute capability 9/10, non-bf16, or unaligned sizes) or with actor/critic rows. Peak GPU memory is unchanged.

  • resolve omitted training and generation settings in one place

    Omitted training and generation settings are chosen by one function each. The estimate and training call the same function. A set value is kept.

    An omitted mini-batch is the per-rank trajectory count, max(batch_size // data_parallel_size, 1) times group_size. GRPO-family uses the spec group size. Other algorithms use 1.

    An omitted micro_batch_size_per_gpu is the largest divisor of that mini-batch whose training estimate fits. On a CUDA training build, an omitted value is that search, including a single GPU. The search uses the launcher world size. Before the process group exists, the process rank is the launcher RANK. With no CUDA device, or a model outside the catalog, the omitted micro-batch is that mini-batch.

    An unset LLMPPO fuse_actor_critic_pass fuses when the fused training peak fits the device, and fuses when there is no device budget.

    An unset FSDP chunk is the largest that fits on a device. With no device it is the smallest chunk, and an unset optimizer sits on the CPU unless cpu_offload is set.

    An omitted fused-logprob chunk is the row count of a 256 MiB fp32 logit tile, clamped to 128..4096. An explicit count stays.

    An omitted max_num_seqs is 8 when generation shares the trainer GPU. Otherwise it is the prompts one engine receives times the group size. auto counts as one engine.

    An async engine max_lora_rank snaps up to the smallest accepted rank (8, 16, 32, 64, 128, 256, 320, 512) that covers the adapter. Colocated generation keeps max(configured, adapter rank) and does not snap.

    An omitted gpu_memory_utilization is 0.3. An omitted max_lora_rank starts at 16.

    An omitted LLMPPO fuse bit and an omitted FSDP chunk are priced on 95% of the card, including job overhead.

  • point scoped-mismatch error at causal-LM scope fix

    Scoped LoRA errors now show example module keys present on the model alongside the empty in-scope sample, and suggest leaving the scope unset for causal LM layouts under consecutive model.layers path segments.

  • lock flash-linear-attention on the llm extra

    The published lock now includes flash-linear-attention 0.5.2 for the Linux llm and all extras, matching the dependency already declared for those extras. Tests treat that pin as part of the llm extra, not cpu-llm, and cover GPU GatedDeltaNet setup when both fused kernels resolve.

  • start vLLM engines for Granite 4 hybrid models on vLLM 0.32

    vLLM 0.32 reads Granite 4 hybrid layer types under the names transformers uses, so the catalog no longer renames them. Engines for granitemoehybrid checkpoints such as ibm-granite/granite-4.0-micro failed to start with KeyError: 'attention'. Removes granitemoehybrid_vllm_hf_override from agilerl.architectures.catalog.

  • MoE routers under activation checkpointing, vision models, FSDP2, rollout logprobs and memory estimates

    • MoE: top-k router renormalization runs out of place for every catalog MoE family that renormalizes in place (Qwen3-MoE, Qwen3-Next, Qwen3-Omni, Qwen3.5/3.6-MoE, Qwen3-VL-MoE, Gemma 4, Qwen2-MoE, OLMoE, FlexOlmo, Mellum, Qwen4Exp, Mixtral, MiniMax). Selective activation checkpointing of MoE blocks no longer fails in backward.
    • FSDP2: units that have not run forward keep gradient sync on during gradient accumulation, which avoids a torch 2.13 post-backward crash (for example a frozen vision tower in text-only training). wrap_every_n_blocks > 1 keeps checkpoint parameter names. Gemma 4 RoPE buffers are built per layer type.
    • Qwen3.5/3.6 gated delta net: seq_idx is computed once in the text-model forward, which fixes a crash at micro-batch 1 under checkpointing. Multi-row packed batches keep document boundaries. The expert-parallel count exchange runs outside dispatch modes. Class-patched LigerExperts run split expert LoRA with SiLU.
    • Logprobs: the final-logit softcap (Gemma 4) is applied in fused logprobs and in the Liger losses that support it; GRPO-family objectives fall back from Liger with a warning otherwise.
    • Rollout: RolloutSampling carries every vLLM sampling field (top_k, min_p, penalties, min_tokens). vLLM engines return processed logprobs, so importance ratios match the trainer when temperature is not 1. With top_k > 0 and temperature > 0, rollouts record each token's sampling support and GRPO, LLMPPO and REINFORCE normalize policy, old and reference logprobs over it, so top_p, min_p and answer grammars keep the importance ratio exact; Arena manifests that use those filters without that support are rejected. Turns made only of forced tokens keep their reward; PPO/REINFORCE micro-batches with no action tokens give zero loss instead of NaN; REINFORCE turn KL averages over action tokens.
    • Vision: each model's own image placeholder, per-image vision rows for Qwen3.5/3.6 and Gemma 4, a tower lockstep so ranks without images don't hang, a frozen-tower feature cache per learn step, vLLM-served tower LoRA for Qwen3.5 and Gemma 4 (skipped on towers the engine doesn't build), and pixel staging through pinned buffers. Qwen3.5, Qwen3.6, Qwen3.8 and Gemma 4 E4B are marked vision-capable.
    • Envs: RemoteEnvClient.reset and the in-process client raise when the reset reports an error. Hosted reset images are sent as base64 PNG. The harness restarts the context at the model budget when restarts are on. New repeat_system_prompt setting.
    • vLLM compile cache directories are keyed by the engine's GPU ids (apply_vllm_compile_cache_env).
    • agilerl-arena manifests: env specs take modality (text / vision) and read-only host_volumes under /var/cache/agilerl-. Text envs strip vLLM vision towers by default when the model has towers and no tower LoRA; image envs keep them. Every rollout manifest without vllm_config gets the default engine. stop_sequences with async rollout is rejected at validation.
    • agilerl-arena memory estimator: CUDA-visible card sizes, vLLM LoRA stacks, encoder profile and non-torch memory in the KV budget, engine layout from the run's GPUs (--num-gpus), expert-LoRA backward chunks, gated delta net, held FSDP grads, Gemma 4 norms, FSDP slack, and vision host and GPU terms.
    • Breaking: agilerl.arena.models.default_colocated_vllm_config is renamed to default_rollout_vllm_config, with no alias.
  • Qwen3.5 reasoning parser, padded GatedDeltaNet forward, GRPO Liger memory sizing

    Qwen3.5 architecture families now set the qwen3 vLLM reasoning parser in their runtime config. vLLM needs a reasoning parser to enforce thinking_token_budget, so rollouts that set a thinking budget on a Qwen3.5 model failed when the engine started.

    packed_layout now starts a document only at each row start and where position_ids is 0, the rule FlashAttention varlen uses. A padded batch passed with position_ids and no attention mask (pads at position 1) used to give every pad token its own document. On Qwen3.5/3.6 that sent thousands of sequences to the FLA varlen scan, whose launch fails with Triton Error [CUDA]: invalid argument once sequences x value heads exceeds 65535. Padded rows now stay one document each; packed rows are unchanged.

    The Arena memory estimator no longer refuses GSPO or trajectory-level GRPO runs with use_liger_loss=True when GRPO runs them on the standard path, which it does whenever the vLLM sampling correction or either off-policy mask is on. It still refuses the fused trajectory-level case, which is not memory-bounded.

  • reduce split actor/critic FSDP gradients in parameter dtype

    Non-fused actor/critic training runs a policy backward and a value backward over different parameters. Deferred gradient sync keeps the first pass's gradients in reduce_dtype until the optimizer step. The second pass's gradients stay in param_dtype. FSDP reduce-scatter then rejects the unit when those dtypes differ.

    Split passes that defer gradient sync now reduce in param_dtype, so both passes use one dtype. Fused passes, single-pass runs, and configs that already match are left as configured.

  • FSDP DPO and SFT fill unset memory settings from the spec

    Unset FSDP chunk size and optimizer placement for DPO and SFT are filled from the algorithm spec's context length before the algorithm is built. Constructing either on a GPU with those fields unset raises ValueError.

  • save router top-k for checkpointed gpt-oss blocks

    Activation checkpointing saves each MoE router's top-k so backward replays the forward routing. Blocks with the transposed packed-expert layout (gpt-oss) were not detected, so their router was recomputed in backward. A token that switches expert then changes the expert loop shapes and raises CheckpointError, or silently uses different routing when shapes happen to match.

    Router saving now covers every packed-expert layout.

  • charge saved router top-k in the memory estimator

    FSDP activation checkpointing saves each MoE router's top-k scores and expert indices for backward, so recompute replays the forward routing. The memory estimator charges those tensors as saved_router_topk when FSDP is on: tokens x top_k x MoE layers, at fp32 scores plus int64 indices. They stay on the GPU under activation offload. Flat data parallel recomputes the router, so it is not charged.

Breaking Changes

  • train vision-language checkpoints with their own architecture

    Vision-language checkpoints (Qwen3.5/3.6, Gemma 3/4, Nemotron omni) now train with their full multimodal class, with frozen towers, so merged exports keep the original architecture, config.json and vision weights. The trainer class per family lives in the architecture catalog (TrainerRuntimeConfig.model_class, trainer_model_class).

    LoRA target_modules (named or all-linear) always land on the language model of a vision-language model. The trainer memory estimate classifies that list after the language-model regex rewrite, so attention-only adapters are not sized as all-linear. Tower or connector modules are adapted only when named in the new lora_config.tower_target_modules, which requires the towers to be served. The model catalog lists each vision-language checkpoint's language-model prefix and default text-only LoRA modules.

    strip_multimodal_towers: true now means vLLM language_model_only for every family; the Qwen3.5 language-tower vLLM classes are removed.

    Unset target_parameters on a packed-MoE catalog model resolves through the public resolve_lora_defaults in agilerl.arena.models.networks.

    Breaking: lora_target_scope is removed from the LLM algorithms, INIT_HP and the manifest. build_vllm_llm_init_kwargs(lora_target_modules=...) is replaced by tower_lora_target_modules, and apply_multimodal_engine_kwargs no longer takes runtime.

Tests

  • speed up multi-rank tests and xdist runs

    Multi-rank tests share one launcher, tests/rank_launch.run_ranks. On Linux
    CPU hosts ranks fork from a forkserver that imports torch, transformers, peft
    and agilerl once per pytest worker instead of re-importing them per rank, and a
    crashed rank fails the test immediately. A new multi_rank marker replaces the
    per-file gloo skips.

    pytest-xdist workers run with one OpenMP thread each and -n logical, so worker
    thread pools stop contending for CPU cores.

    CI collects coverage only on the Python 3.13 jobs that are combined, and macOS
    skips multi_rank tests, which Linux runs. GPU tests run on Python 3.13 for
    pull requests and on every supported version in a nightly scheduled run.

Other

  • bump vllm to 0.32.0 and torch to 2.13.0

    Bump the Linux llm extra to vLLM 0.32.0 and torch 2.13, with transformers 5.19.0, triton 3.7.1, huggingface-hub 2.2.0, datasets 5.1.0, liger-kernel 0.8.5, peft 0.21.2, and bitsandbytes 0.50.2. The vllm extra now requires Python >=3.11. Adapt to the new stack: Nemotron-H mamba patches follow the transformers 5.19 single-forward mixer, RoPE buffers (including axial vision rotaries) initialize after a meta load, the EP checkpoint replay assert is SAC-safe, and vLLM-side bitsandbytes quantization is removed (upstream dropped it; trainer-side bnb is unchanged). Hybrid Mamba families keep dense prefix-cache states through a new VllmRuntimeConfig.dense_mamba_prefix_cache and engine_kwargs(). The Nemotron-H Liger RMSNorm matches transformers 5.19 numerics and drops its unused RoPE option, and Qwen3.5 packed rows use the varlen kernels whenever causal-conv1d and FLA are installed. Super-VL loads natively without checkpoint code; tower LoRA targets use the native weight names. Nemotron-H and Nemotron-H Omni no longer load checkpoint code in the trainer or vLLM. Image observations from processors that return image_grid_hw fold into one (h, w, patch_dim) row per image, and the native Super-VL image features unfold those rows when no grid is given.

  • start import sync when a labeled pull request changes

    Add a GitHub Actions workflow that runs when a pull request into main is opened, updated, labeled, or reopened. When the pull request has the hub-sync-import label, the job requests an import of that pull request. The workflow does not check out the pull request.

Full Changelog: v2.58.0...v2.59.0

agilerl-arena/v1.30.0: agilerl-arena v1.30.0: train vision-language checkpoints with their own architecture

Released on 2026-10-28 - GitHub - PyPI

Features

  • support Qwen3.5 models in agilerl-arena, deprecate Qwen3

    Adds Qwen/Qwen3.5-0.8B, Qwen/Qwen3.5-2B, Qwen/Qwen3.5-4B, and Qwen/Qwen3.5-9B to SUPPORTED_MODEL_INFO with their LoRA targets, allowed ranks, and bundled config.json. Marks Qwen/Qwen3-1.7B and Qwen/Qwen3-4B deprecated. The memory estimator now counts the fp32 query upcast from Qwen3.5 attention QK norms. The Qwen3.5 language-tower weight mapper also covers the adapter-form language_model infix vLLM sees when loading LoRA, so text adapters sync onto tower engines.

  • pin library workarounds to the releases they were checked against

    Add agilerl.utils.patching.library_shim, a decorator that records which release range of vLLM, transformers, peft, liger-kernel or torch a workaround was checked against. Calling a decorated shim with an installed release outside that range raises UnsupportedLibraryVersionError, naming the shim, the range and the installed version. Shims are listed in agilerl.utils.patching.LIBRARY_SHIMS. The vLLM, transformers, peft, Liger and torch workarounds in agilerl.architectures, agilerl.lora.fused, agilerl.distributed.fsdp_blocks and the colocated vLLM helpers now carry their ranges.

  • expose expert-parallel support and routed expert count

    ModelInfo reports supports_expert_parallel and num_routed_experts. The flag is true when the model has packed expert modules. The count is read from the language config (n_routed_experts, num_experts, or num_local_experts) and is null when the model has no packed experts.

  • load CLI plugins from the agilerl.arena.cli entry-point group

    Installed packages can add commands to the arena CLI by declaring an entry point in the agilerl.arena.cli group that names a callable taking the root click group, e.g. [project.entry-points."agilerl.arena.cli"] my = "pkg.cli:register". With no plugins installed the CLI is unchanged.

  • price tensor parallel, expert parallel and NCCL process groups, and tighten LLM training and vLLM engine estimates

    The agilerl-arena memory estimator now sizes fsdp.tp and fsdp.ep. Under tensor parallel an untied lm_head sits at 1/tp outside the FSDP gather; families with a training tensor-parallel plan (nemotron_h) also shard their decoder linears and per-layer activations. Under expert parallel each rank keeps its share of the routed experts and their LoRA, each MoE backward adds token-exchange buffers, and tensor-parallel ranks route a share of the tokens each. NCCL memory is charged per process group, by size and by whether the group spans nodes.

    Training estimates now cover HF's unfused Mamba path on compute capability 8.9 GPUs, hybrids that run one mixer per layer (Granite 4), gpt-oss's expert intermediates, DPO's Liger loss, and Liger above token level. vLLM engine estimates keep the start-up profile's peak, add a compiling engine's per-layer embedding copy, size hybrid KV capacity by vLLM's block pool and SSM state dtype, and hold sliding-window KV for the scheduler's in-flight tokens. The H100 80GB catalogue entry uses its CUDA-visible 79.11 GiB. DeviceSpec.nccl_bytes, NCCL_BYTES_BY_DEVICE and NCCL_BYTES_DEFAULT are replaced by per-group NCCL bytes.

Fixes

  • do not save the routed EP counts copy in packed-expert block checkpoints

    Selective checkpointing on packed-expert blocks saves every device-to-host copy. Routed expert-parallel counts skip that copy on recompute, so the next host copy (grouped-matmul fallback .tolist(), or actor/critic adapter ids) replayed a stale counts tensor and crashed with split_with_sizes(): found element of type list at pos 0.

    The routed counts copy is now flagged and not saved, so the saved copies stay in order and the recompute adds no host syncs. This hits expert-parallel training with gradient checkpointing on packed-expert blocks when the grouped-matmul fallback runs (GPUs other than compute capability 9/10, non-bf16, or unaligned sizes) or with actor/critic rows. Peak GPU memory is unchanged.

  • resolve omitted training and generation settings in one place

    Omitted training and generation settings are chosen by one function each. The estimate and training call the same function. A set value is kept.

    An omitted mini-batch is the per-rank trajectory count, max(batch_size // data_parallel_size, 1) times group_size. GRPO-family uses the spec group size. Other algorithms use 1.

    An omitted micro_batch_size_per_gpu is the largest divisor of that mini-batch whose training estimate fits. On a CUDA training build, an omitted value is that search, including a single GPU. The search uses the launcher world size. Before the process group exists, the process rank is the launcher RANK. With no CUDA device, or a model outside the catalog, the omitted micro-batch is that mini-batch.

    An unset LLMPPO fuse_actor_critic_pass fuses when the fused training peak fits the device, and fuses when there is no device budget.

    An unset FSDP chunk is the largest that fits on a device. With no device it is the smallest chunk, and an unset optimizer sits on the CPU unless cpu_offload is set.

    An omitted fused-logprob chunk is the row count of a 256 MiB fp32 logit tile, clamped to 128..4096. An explicit count stays.

    An omitted max_num_seqs is 8 when generation shares the trainer GPU. Otherwise it is the prompts one engine receives times the group size. auto counts as one engine.

    An async engine max_lora_rank snaps up to the smallest accepted rank (8, 16, 32, 64, 128, 256, 320, 512) that covers the adapter. Colocated generation keeps max(configured, adapter rank) and does not snap.

    An omitted gpu_memory_utilization is 0.3. An omitted max_lora_rank starts at 16.

    An omitted LLMPPO fuse bit and an omitted FSDP chunk are priced on 95% of the card, including job overhead.

  • point scoped-mismatch error at causal-LM scope fix

    Scoped LoRA errors now show example module keys present on the model alongside the empty in-scope sample, and suggest leaving the scope unset for causal LM layouts under consecutive model.layers path segments.

  • lock flash-linear-attention on the llm extra

    The published lock now includes flash-linear-attention 0.5.2 for the Linux llm and all extras, matching the dependency already declared for those extras. Tests treat that pin as part of the llm extra, not cpu-llm, and cover GPU GatedDeltaNet setup when both fused kernels resolve.

  • start vLLM engines for Granite 4 hybrid models on vLLM 0.32

    vLLM 0.32 reads Granite 4 hybrid layer types under the names transformers uses, so the catalog no longer renames them. Engines for granitemoehybrid checkpoints such as ibm-granite/granite-4.0-micro failed to start with KeyError: 'attention'. Removes granitemoehybrid_vllm_hf_override from agilerl.architectures.catalog.

  • MoE routers under activation checkpointing, vision models, FSDP2, rollout logprobs and memory estimates

    • MoE: top-k router renormalization runs out of place for every catalog MoE family that renormalizes in place (Qwen3-MoE, Qwen3-Next, Qwen3-Omni, Qwen3.5/3.6-MoE, Qwen3-VL-MoE, Gemma 4, Qwen2-MoE, OLMoE, FlexOlmo, Mellum, Qwen4Exp, Mixtral, MiniMax). Selective activation checkpointing of MoE blocks no longer fails in backward.
    • FSDP2: units that have not run forward keep gradient sync on during gradient accumulation, which avoids a torch 2.13 post-backward crash (for example a frozen vision tower in text-only training). wrap_every_n_blocks > 1 keeps checkpoint parameter names. Gemma 4 RoPE buffers are built per layer type.
    • Qwen3.5/3.6 gated delta net: seq_idx is computed once in the text-model forward, which fixes a crash at micro-batch 1 under checkpointing. Multi-row packed batches keep document boundaries. The expert-parallel count exchange runs outside dispatch modes. Class-patched LigerExperts run split expert LoRA with SiLU.
    • Logprobs: the final-logit softcap (Gemma 4) is applied in fused logprobs and in the Liger losses that support it; GRPO-family objectives fall back from Liger with a warning otherwise.
    • Rollout: RolloutSampling carries every vLLM sampling field (top_k, min_p, penalties, min_tokens). vLLM engines return processed logprobs, so importance ratios match the trainer when temperature is not 1. With top_k > 0 and temperature > 0, rollouts record each token's sampling support and GRPO, LLMPPO and REINFORCE normalize policy, old and reference logprobs over it, so top_p, min_p and answer grammars keep the importance ratio exact; Arena manifests that use those filters without that support are rejected. Turns made only of forced tokens keep their reward; PPO/REINFORCE micro-batches with no action tokens give zero loss instead of NaN; REINFORCE turn KL averages over action tokens.
    • Vision: each model's own image placeholder, per-image vision rows for Qwen3.5/3.6 and Gemma 4, a tower lockstep so ranks without images don't hang, a frozen-tower feature cache per learn step, vLLM-served tower LoRA for Qwen3.5 and Gemma 4 (skipped on towers the engine doesn't build), and pixel staging through pinned buffers. Qwen3.5, Qwen3.6, Qwen3.8 and Gemma 4 E4B are marked vision-capable.
    • Envs: RemoteEnvClient.reset and the in-process client raise when the reset reports an error. Hosted reset images are sent as base64 PNG. The harness restarts the context at the model budget when restarts are on. New repeat_system_prompt setting.
    • vLLM compile cache directories are keyed by the engine's GPU ids (apply_vllm_compile_cache_env).
    • agilerl-arena manifests: env specs take modality (text / vision) and read-only host_volumes under /var/cache/agilerl-. Text envs strip vLLM vision towers by default when the model has towers and no tower LoRA; image envs keep them. Every rollout manifest without vllm_config gets the default engine. stop_sequences with async rollout is rejected at validation.
    • agilerl-arena memory estimator: CUDA-visible card sizes, vLLM LoRA stacks, encoder profile and non-torch memory in the KV budget, engine layout from the run's GPUs (--num-gpus), expert-LoRA backward chunks, gated delta net, held FSDP grads, Gemma 4 norms, FSDP slack, and vision host and GPU terms.
    • Breaking: agilerl.arena.models.default_colocated_vllm_config is renamed to default_rollout_vllm_config, with no alias.
  • Qwen3.5 reasoning parser, padded GatedDeltaNet forward, GRPO Liger memory sizing

    Qwen3.5 architecture families now set the qwen3 vLLM reasoning parser in their runtime config. vLLM needs a reasoning parser to enforce thinking_token_budget, so rollouts that set a thinking budget on a Qwen3.5 model failed when the engine started.

    packed_layout now starts a document only at each row start and where position_ids is 0, the rule FlashAttention varlen uses. A padded batch passed with position_ids and no attention mask (pads at position 1) used to give every pad token its own document. On Qwen3.5/3.6 that sent thousands of sequences to the FLA varlen scan, whose launch fails with Triton Error [CUDA]: invalid argument once sequences x value heads exceeds 65535. Padded rows now stay one document each; packed rows are unchanged.

    The Arena memory estimator no longer refuses GSPO or trajectory-level GRPO runs with use_liger_loss=True when GRPO runs them on the standard path, which it does whenever the vLLM sampling correction or either off-policy mask is on. It still refuses the fused trajectory-level case, which is not memory-bounded.

  • reduce split actor/critic FSDP gradients in parameter dtype

    Non-fused actor/critic training runs a policy backward and a value backward over different parameters. Deferred gradient sync keeps the first pass's gradients in reduce_dtype until the optimizer step. The second pass's gradients stay in param_dtype. FSDP reduce-scatter then rejects the unit when those dtypes differ.

    Split passes that defer gradient sync now reduce in param_dtype, so both passes use one dtype. Fused passes, single-pass runs, and configs that already match are left as configured.

  • FSDP DPO and SFT fill unset memory settings from the spec

    Unset FSDP chunk size and optimizer placement for DPO and SFT are filled from the algorithm spec's context length before the algorithm is built. Constructing either on a GPU with those fields unset raises ValueError.

  • save router top-k for checkpointed gpt-oss blocks

    Activation checkpointing saves each MoE router's top-k so backward replays the forward routing. Blocks with the transposed packed-expert layout (gpt-oss) were not detected, so their router was recomputed in backward. A token that switches expert then changes the expert loop shapes and raises CheckpointError, or silently uses different routing when shapes happen to match.

    Router saving now covers every packed-expert layout.

  • charge saved router top-k in the memory estimator

    FSDP activation checkpointing saves each MoE router's top-k scores and expert indices for backward, so recompute replays the forward routing. The memory estimator charges those tensors as saved_router_topk when FSDP is on: tokens x top_k x MoE layers, at fp32 scores plus int64 indices. They stay on the GPU under activation offload. Flat data parallel recomputes the router, so it is not charged.

Breaking Changes

  • train vision-language checkpoints with their own architecture

    Vision-language checkpoints (Qwen3.5/3.6, Gemma 3/4, Nemotron omni) now train with their full multimodal class, with frozen towers, so merged exports keep the original architecture, config.json and vision weights. The trainer class per family lives in the architecture catalog (TrainerRuntimeConfig.model_class, trainer_model_class).

    LoRA target_modules (named or all-linear) always land on the language model of a vision-language model. The trainer memory estimate classifies that list after the language-model regex rewrite, so attention-only adapters are not sized as all-linear. Tower or connector modules are adapted only when named in the new lora_config.tower_target_modules, which requires the towers to be served. The model catalog lists each vision-language checkpoint's language-model prefix and default text-only LoRA modules.

    strip_multimodal_towers: true now means vLLM language_model_only for every family; the Qwen3.5 language-tower vLLM classes are removed.

    Unset target_parameters on a packed-MoE catalog model resolves through the public resolve_lora_defaults in agilerl.arena.models.networks.

    Breaking: lora_target_scope is removed from the LLM algorithms, INIT_HP and the manifest. build_vllm_llm_init_kwargs(lora_target_modules=...) is replaced by tower_lora_target_modules, and apply_multimodal_engine_kwargs no longer takes runtime.

Tests

  • speed up multi-rank tests and xdist runs

    Multi-rank tests share one launcher, tests/rank_launch.run_ranks. On Linux
    CPU hosts ranks fork from a forkserver that imports torch, transformers, peft
    and agilerl once per pytest worker instead of re-importing them per rank, and a
    crashed rank fails the test immediately. A new multi_rank marker replaces the
    per-file gloo skips.

    pytest-xdist workers run with one OpenMP thread each and -n logical, so worker
    thread pools stop contending for CPU cores.

    CI collects coverage only on the Python 3.13 jobs that are combined, and macOS
    skips multi_rank tests, which Linux runs. GPU tests run on Python 3.13 for
    pull requests and on every supported version in a nightly scheduled run.

Other

  • bump vllm to 0.32.0 and torch to 2.13.0

    Bump the Linux llm extra to vLLM 0.32.0 and torch 2.13, with transformers 5.19.0, triton 3.7.1, huggingface-hub 2.2.0, datasets 5.1.0, liger-kernel 0.8.5, peft 0.21.2, and bitsandbytes 0.50.2. The vllm extra now requires Python >=3.11. Adapt to the new stack: Nemotron-H mamba patches follow the transformers 5.19 single-forward mixer, RoPE buffers (including axial vision rotaries) initialize after a meta load, the EP checkpoint replay assert is SAC-safe, and vLLM-side bitsandbytes quantization is removed (upstream dropped it; trainer-side bnb is unchanged). Hybrid Mamba families keep dense prefix-cache states through a new VllmRuntimeConfig.dense_mamba_prefix_cache and engine_kwargs(). The Nemotron-H Liger RMSNorm matches transformers 5.19 numerics and drops its unused RoPE option, and Qwen3.5 packed rows use the varlen kernels whenever causal-conv1d and FLA are installed. Super-VL loads natively without checkpoint code; tower LoRA targets use the native weight names. Nemotron-H and Nemotron-H Omni no longer load checkpoint code in the trainer or vLLM. Image observations from processors that return image_grid_hw fold into one (h, w, patch_dim) row per image, and the native Super-VL image features unfold those rows when no grid is given.

  • start import sync when a labeled pull request changes

    Add a GitHub Actions workflow that runs when a pull request into main is opened, updated, labeled, or reopened. When the pull request has the hub-sync-import label, the job requests an import of that pull request. The workflow does not check out the pull request.

Full Changelog: agilerl-arena/v1.29.0...agilerl-arena/v1.30.0

v2.58.0: default GRPO old log-probs to the rollout engine unless colocated

Released on 2026-10-21 - GitHub - PyPI

Features

  • default GRPO old log-probs to the rollout engine unless colocated

    Unset old_logprobs_source uses the inference engine's sampling log-probs (rollout) when generation is not colocated in the trainer process. Colocated vLLM keeps the learn-start policy (trainer) so the vLLM importance-sampling correction still applies. Set the key explicitly to override.

  • parse tool calls from token IDs in the rollout harness

    The rollout harness now parses tool calls from generation token IDs and steps MCP-backed environments with structured calls, so environments never parse model output. Parsers cover the Qwen, Hermes, Granite, Nemotron, Gemma 4, and GPT-OSS formats; a new format is a ToolParser subclass. The model family catalog names each family's parser, and RolloutHarness(tool_call_parser=...) picks one explicitly; unset, it is detected from the tokenizer. A turn can hold several calls; they run in order and their rewards sum, and each result is its own tool message. A turn with no call is a prose answer for the environment's answer_tool. Malformed calls return retry feedback and score the new min_reward env setting (default 0). Env clients gain takes_tool_calls and answer_tool; the in-process client supports answer_tool and awaits step_async when an environment overrides it. Each step's info reports the valid tool calls the turn ran (TOOL_CALLS_INFO_KEY) and flags a rejected turn (TOOL_CALL_ERROR_INFO_KEY). Granite 4 hybrid configs remap layer_types full_attention / linear_attention to the names the vLLM engine uses (attention / mamba). See the environments guide Tools section.

Fixes

  • merge env info prefix/suffix into rollout prompts

    Game envs in the gem convention return instructions as the observation and the task body as info["suffix"]. The harness now wraps prompt text in the env's info prefix/suffix when present, so the model sees content like the Sudoku board. Previously the board never reached the prompt and the model asked for it.

  • choose an omitted vLLM tensor parallel width from the allocation

    vllm_config.tensor_parallel_size now defaults to unset. When the width is omitted, resolve_engine_tensor_parallel picks the width that keeps the most sequences resident on the leftover GPUs. An explicit integer, including 1, is kept.

    to_payload omits an unset width. The memory CLI resolves a width per resource tier and fails a tier that cannot be resolved. On a named GPU, an omitted width is sized as 1. A candidate width that is illegal for a hybrid Mamba checkpoint scores 0. Colocated in-process vLLM still launches on one GPU and does not write 1 back onto the config. generation_settings_from_manifest requires a candidate width when a rollout manifest leaves it unset.

Full Changelog: v2.57.0...v2.58.0

agilerl-arena/v1.29.0: agilerl-arena v1.29.0: default GRPO old log-probs to the rollout engine unless colocated

Released on 2026-10-21 - GitHub - PyPI

Features

  • default GRPO old log-probs to the rollout engine unless colocated

    Unset old_logprobs_source uses the inference engine's sampling log-probs (rollout) when generation is not colocated in the trainer process. Colocated vLLM keeps the learn-start policy (trainer) so the vLLM importance-sampling correction still applies. Set the key explicitly to override.

  • parse tool calls from token IDs in the rollout harness

    The rollout harness now parses tool calls from generation token IDs and steps MCP-backed environments with structured calls, so environments never parse model output. Parsers cover the Qwen, Hermes, Granite, Nemotron, Gemma 4, and GPT-OSS formats; a new format is a ToolParser subclass. The model family catalog names each family's parser, and RolloutHarness(tool_call_parser=...) picks one explicitly; unset, it is detected from the tokenizer. A turn can hold several calls; they run in order and their rewards sum, and each result is its own tool message. A turn with no call is a prose answer for the environment's answer_tool. Malformed calls return retry feedback and score the new min_reward env setting (default 0). Env clients gain takes_tool_calls and answer_tool; the in-process client supports answer_tool and awaits step_async when an environment overrides it. Each step's info reports the valid tool calls the turn ran (TOOL_CALLS_INFO_KEY) and flags a rejected turn (TOOL_CALL_ERROR_INFO_KEY). Granite 4 hybrid configs remap layer_types full_attention / linear_attention to the names the vLLM engine uses (attention / mamba). See the environments guide Tools section.

Fixes

  • merge env info prefix/suffix into rollout prompts

    Game envs in the gem convention return instructions as the observation and the task body as info["suffix"]. The harness now wraps prompt text in the env's info prefix/suffix when present, so the model sees content like the Sudoku board. Previously the board never reached the prompt and the model asked for it.

  • choose an omitted vLLM tensor parallel width from the allocation

    vllm_config.tensor_parallel_size now defaults to unset. When the width is omitted, resolve_engine_tensor_parallel picks the width that keeps the most sequences resident on the leftover GPUs. An explicit integer, including 1, is kept.

    to_payload omits an unset width. The memory CLI resolves a width per resource tier and fails a tier that cannot be resolved. On a named GPU, an omitted width is sized as 1. A candidate width that is illegal for a hybrid Mamba checkpoint scores 0. Colocated in-process vLLM still launches on one GPU and does not write 1 back onto the config. generation_settings_from_manifest requires a candidate width when a rollout manifest leaves it unset.

Full Changelog: agilerl-arena/v1.28.0...agilerl-arena/v1.29.0

v2.57.0: drop offload_trainer_during_rollout from GRPO and LLMPPO manifests

Released on 2026-10-21 - GitHub - PyPI

Features

  • drop offload_trainer_during_rollout from GRPO and LLMPPO manifests

    Arena generation is async, so this colocated-vLLM trainer-offload field was never applied. Manifests that still set it are rejected as extra input. GSPO and CISPO inherit the GRPO spec, so they lose the field too.

Fixes

  • size an fp8 tensor-parallel vLLM engine

    The memory estimator sizes an fp8 engine split across tensor-parallel ranks. KV heads stay replicated when a rank would otherwise get none, and the Mamba state is sharded the way vLLM shards it. Training tensor parallel does not change the activation estimate. Resource-tier placement counts a GPU per tensor-parallel rank.

  • stop rewriting env actions into function calls by default

    The rollout harness sends the text after </think> to the env unchanged. Set action_processor to a module:fn when an env needs loose calls rewritten as function calls. That function receives the post-</think> text and returns the string the env executes. Restart prompts list those same actions.

    action_span is the text after the first </think>. env_action_text is removed.

    screenshot_field and goal_images_field name the observation keys for the page image and the task images. They default to screenshot and goal_images. An empty value reads none.

  • drop the Qwen3.5 LoRA key prefix in the vLLM LoRA export

    The vLLM LoRA export no longer adds a model.language_model.model. prefix to Qwen3.5 LoRA keys. vLLM's Qwen3.5 weight mapper already maps Hugging Face names onto its modules, and the extra prefix stopped the adapter matching any vLLM layer. LanguageTowerRuntimeConfig.lora_key_prefix and the model_type argument of remap_peft_lora_key_for_vllm and filter_peft_state_dict_for_vllm_lora are removed.

  • make the MADDPG and MATD3 PettingZoo tutorials run end to end

  • shard Gemma 4 per-layer embeddings under FSDP and init layer-type RoPE

    Shard Gemma 4 packed per-layer embeddings as their own FSDP unit and prefetch them with the language blocks. Fill {layer_type}_inv_freq RoPE buffers and embed_scale after a meta safetensors load.

  • default LLMEnvSpec screenshot_field and goal_images_field to unset

    LLMEnvSpec.screenshot_field and LLMEnvSpec.goal_images_field default to unset. Empty or omitted keys read no page or task images. The env JSON Schema no longer publishes string defaults for those fields. Dataset-backed rollouts reject any non-empty image observation keys. Rollout factories omit image observation kwargs when unset so the harness does not read screenshot or goal_images unless the spec names them.

Refactoring

  • serve stripped towers with language_model_only

    VLLMConfig.strip_multimodal_towers=True serves Gemma 4 and Nemotron through vLLM language_model_only. Qwen3.5 and Qwen3.6 still load the language-tower class, because vLLM does not register those text configs. A list names modalities to drop (image, video, audio) and sets limit_mm_per_prompt to 0.

    The LoRA export keeps LoRA tensors and undoes trainer-only wrappers. Hugging Face to vLLM renames stay on the serving model's weight mapper. save_peft_adapter_for_vllm_rollout and filter_peft_state_dict_for_vllm_lora no longer take target_modules or strip_multimodal_towers. patch_vllm_strip_multimodal_towers is removed.

Other

  • Revert GitHub PR #707

    The pull request merges next so its author is credited.

Full Changelog: v2.56.1...v2.57.0

agilerl-arena/v1.28.0: agilerl-arena v1.28.0: drop offload_trainer_during_rollout from GRPO and LLMPPO manifests

Released on 2026-10-21 - GitHub - PyPI

Features

  • drop offload_trainer_during_rollout from GRPO and LLMPPO manifests

    Arena generation is async, so this colocated-vLLM trainer-offload field was never applied. Manifests that still set it are rejected as extra input. GSPO and CISPO inherit the GRPO spec, so they lose the field too.

Fixes

  • size an fp8 tensor-parallel vLLM engine

    The memory estimator sizes an fp8 engine split across tensor-parallel ranks. KV heads stay replicated when a rank would otherwise get none, and the Mamba state is sharded the way vLLM shards it. Training tensor parallel does not change the activation estimate. Resource-tier placement counts a GPU per tensor-parallel rank.

  • stop rewriting env actions into function calls by default

    The rollout harness sends the text after </think> to the env unchanged. Set action_processor to a module:fn when an env needs loose calls rewritten as function calls. That function receives the post-</think> text and returns the string the env executes. Restart prompts list those same actions.

    action_span is the text after the first </think>. env_action_text is removed.

    screenshot_field and goal_images_field name the observation keys for the page image and the task images. They default to screenshot and goal_images. An empty value reads none.

  • drop the Qwen3.5 LoRA key prefix in the vLLM LoRA export

    The vLLM LoRA export no longer adds a model.language_model.model. prefix to Qwen3.5 LoRA keys. vLLM's Qwen3.5 weight mapper already maps Hugging Face names onto its modules, and the extra prefix stopped the adapter matching any vLLM layer. LanguageTowerRuntimeConfig.lora_key_prefix and the model_type argument of remap_peft_lora_key_for_vllm and filter_peft_state_dict_for_vllm_lora are removed.

  • make the MADDPG and MATD3 PettingZoo tutorials run end to end

  • shard Gemma 4 per-layer embeddings under FSDP and init layer-type RoPE

    Shard Gemma 4 packed per-layer embeddings as their own FSDP unit and prefetch them with the language blocks. Fill {layer_type}_inv_freq RoPE buffers and embed_scale after a meta safetensors load.

  • default LLMEnvSpec screenshot_field and goal_images_field to unset

    LLMEnvSpec.screenshot_field and LLMEnvSpec.goal_images_field default to unset. Empty or omitted keys read no page or task images. The env JSON Schema no longer publishes string defaults for those fields. Dataset-backed rollouts reject any non-empty image observation keys. Rollout factories omit image observation kwargs when unset so the harness does not read screenshot or goal_images unless the spec names them.

Refactoring

  • serve stripped towers with language_model_only

    VLLMConfig.strip_multimodal_towers=True serves Gemma 4 and Nemotron through vLLM language_model_only. Qwen3.5 and Qwen3.6 still load the language-tower class, because vLLM does not register those text configs. A list names modalities to drop (image, video, audio) and sets limit_mm_per_prompt to 0.

    The LoRA export keeps LoRA tensors and undoes trainer-only wrappers. Hugging Face to vLLM renames stay on the serving model's weight mapper. save_peft_adapter_for_vllm_rollout and filter_peft_state_dict_for_vllm_lora no longer take target_modules or strip_multimodal_towers. patch_vllm_strip_multimodal_towers is removed.

Other

  • Revert GitHub PR #707

    The pull request merges next so its author is credited.

Full Changelog: agilerl-arena/v1.27.0...agilerl-arena/v1.28.0

v2.56.1: mark nvidia/NVIDIA-Nemotron-3.5-Super-VL-120B-A12B-BF16 live

Released on 2026-10-15 - GitHub - PyPI

Features

  • mark nvidia/NVIDIA-Nemotron-3.5-Super-VL-120B-A12B-BF16 live

    Remove status=preview from nvidia/NVIDIA-Nemotron-3.5-Super-VL-120B-A12B-BF16 in SUPPORTED_MODEL_INFO. The catalog default is live, so Arena lists Super-VL with other live models and the CLI/SDK accept experiment submissions for it. Preview models stay rejected on submit.

  • add input modalities to supported models

    ModelInfo now has a modalities field. The default is text-only. Super-VL (nvidia/NVIDIA-Nemotron-3.5-Super-VL-120B-A12B-BF16) is text and vision. Other catalog ids stay text. arena models supported dumps the field with each entry. Values must be text, or text and vision.

  • size multi-row training micro-batches in the memory estimator

    The agilerl-arena memory estimator sizes the trainer micro-batch instead of refusing anything but one row. Unset micro_batch_size_per_gpu follows the same resolution as training (per-rank prompt batch, folded by tensor-parallel degree), and the batch must split into whole mini-batches and micro-batches. Sequence packing is still priced as padded rows, with a warning. Over-budget advice can now suggest dropping micro_batch_size_per_gpu to 1.

Fixes

  • check the generation peak against the whole card

    The agilerl-arena memory estimator checks the generation phase against the whole card instead of 95% of it. vLLM claims gpu_memory_utilization of the card at startup, and the CUDA context and runtime are already counted as generation components, so a 0.95 budget on an 80 GB GPU is no longer reported over budget. Training keeps its fragmentation band and recommendation buffer.

  • accept agilerl-arena X.Y.Z.devN as a build-time exact pin

    check-extras.py and set-arena-extra-pin.sh now accept PEP 440 X.Y.Z.devN in addition to X.Y.Z and X.Y.Z+local when rewriting the committed agilerl-arena extra to an exact pin for one wheel build.

  • size the vLLM profile step the async engine starts with

    The agilerl-arena memory estimator sized vLLM's profile forward with the colocated rule, which reaches 65,536 tokens for 8 sequences at 32k. An async engine profiles the model family's max_num_batched_tokens or vLLM's default of 2,048, capped at max_num_seqs * max_model_len. The oversized forward shrank the predicted KV cache pool.

  • parse MoE expert layers and shared experts in the memory estimator

    The agilerl-arena memory estimator raised KeyError on configs without intermediate_size (Qwen3.5/3.6 MoE) and did not count shared experts named only by shared_expert_intermediate_size. Nemotron-H hybrid_override_pattern expert layers (E) were not counted, so routed experts were charged to every layer.

  • a generation bar fits only when the KV pool holds one full sequence

    The agilerl-arena memory estimator counted a generation bar as fitting whenever its total was under the card. vLLM refuses to start when its KV pool cannot hold one max_model_len request (KV plus Mamba state), so such a bar no longer fits and carries a warning.

Full Changelog: v2.56.0...v2.56.1

agilerl-arena/v1.27.0: agilerl-arena v1.27.0: add input modalities to supported models

Released on 2026-10-15 - GitHub - PyPI

Features

  • add input modalities to supported models

    ModelInfo now has a modalities field. The default is text-only. Super-VL (nvidia/NVIDIA-Nemotron-3.5-Super-VL-120B-A12B-BF16) is text and vision. Other catalog ids stay text. arena models supported dumps the field with each entry. Values must be text, or text and vision.

  • size multi-row training micro-batches in the memory estimator

    The agilerl-arena memory estimator sizes the trainer micro-batch instead of refusing anything but one row. Unset micro_batch_size_per_gpu follows the same resolution as training (per-rank prompt batch, folded by tensor-parallel degree), and the batch must split into whole mini-batches and micro-batches. Sequence packing is still priced as padded rows, with a warning. Over-budget advice can now suggest dropping micro_batch_size_per_gpu to 1.

Fixes

  • accept agilerl-arena X.Y.Z.devN as a build-time exact pin

    check-extras.py and set-arena-extra-pin.sh now accept PEP 440 X.Y.Z.devN in addition to X.Y.Z and X.Y.Z+local when rewriting the committed agilerl-arena extra to an exact pin for one wheel build.

  • size the vLLM profile step the async engine starts with

    The agilerl-arena memory estimator sized vLLM's profile forward with the colocated rule, which reaches 65,536 tokens for 8 sequences at 32k. An async engine profiles the model family's max_num_batched_tokens or vLLM's default of 2,048, capped at max_num_seqs * max_model_len. The oversized forward shrank the predicted KV cache pool.

  • parse MoE expert layers and shared experts in the memory estimator

    The agilerl-arena memory estimator raised KeyError on configs without intermediate_size (Qwen3.5/3.6 MoE) and did not count shared experts named only by shared_expert_intermediate_size. Nemotron-H hybrid_override_pattern expert layers (E) were not counted, so routed experts were charged to every layer.

  • a generation bar fits only when the KV pool holds one full sequence

    The agilerl-arena memory estimator counted a generation bar as fitting whenever its total was under the card. vLLM refuses to start when its KV pool cannot hold one max_model_len request (KV plus Mamba state), so such a bar no longer fits and carries a warning.

Full Changelog: agilerl-arena/v1.26.1...agilerl-arena/v1.27.0

agilerl-arena/v1.26.1: agilerl-arena v1.26.1: check the generation peak against the whole card

Released on 2026-10-13 - GitHub - PyPI

Fixes

  • check the generation peak against the whole card

    The agilerl-arena memory estimator checks the generation phase against the whole card instead of 95% of it. vLLM claims gpu_memory_utilization of the card at startup, and the CUDA context and runtime are already counted as generation components, so a 0.95 budget on an 80 GB GPU is no longer reported over budget. Training keeps its fragmentation band and recommendation buffer.

Full Changelog: agilerl-arena/v1.26.0...agilerl-arena/v1.26.1

agilerl-arena/v1.26.0: agilerl-arena v1.26.0: mark nvidia/NVIDIA-Nemotron-3.5-Super-VL-120B-A12B-BF16 live

Released on 2026-10-13 - GitHub - PyPI

Features

  • mark nvidia/NVIDIA-Nemotron-3.5-Super-VL-120B-A12B-BF16 live

    Remove status=preview from nvidia/NVIDIA-Nemotron-3.5-Super-VL-120B-A12B-BF16 in SUPPORTED_MODEL_INFO. The catalog default is live, so Arena lists Super-VL with other live models and the CLI/SDK accept experiment submissions for it. Preview models stay rejected on submit.

Fixes

  • leftover-DP packed expert shards and router topk under FSDP checkpointing

    Packed expert safetensors copies now keep this rank's leftover data-parallel rows when the checkpoint slice is still the expert-parallel block. Indexed expert stacks already did that; 3-D packed slices did not, so leftover-DP loads failed with a destination/source shape mismatch.

    Activation checkpointing on blocks that hold packed experts saves router topk (and device-to-host copies) so recompute cannot change expert assignment or all-to-all splits.

    GRPO learn-phase timing tests advance a fake clock for the no-grad forward delay so the charge does not depend on wall sleep.

Full Changelog: agilerl-arena/v1.25.0...agilerl-arena/v1.26.0

v2.56.0: leftover-DP packed expert shards and router topk under FSDP checkpointing

Released on 2026-10-12 - GitHub - PyPI

Fixes

  • leftover-DP packed expert shards and router topk under FSDP checkpointing

    Packed expert safetensors copies now keep this rank's leftover data-parallel rows when the checkpoint slice is still the expert-parallel block. Indexed expert stacks already did that; 3-D packed slices did not, so leftover-DP loads failed with a destination/source shape mismatch.

    Activation checkpointing on blocks that hold packed experts saves router topk (and device-to-host copies) so recompute cannot change expert assignment or all-to-all splits.

    GRPO learn-phase timing tests advance a fake clock for the no-grad forward delay so the charge does not depend on wall sleep.

Full Changelog: v2.55.0...v2.56.0

v2.55.0: support Qwen/Qwen3.6-35B-A3B and Qwen3.5 language towers

Released on 2026-10-12 - GitHub - PyPI

Features

  • support Qwen/Qwen3.6-35B-A3B and Qwen3.5 language towers

    Adds Qwen/Qwen3.6-35B-A3B to SUPPORTED_MODEL_INFO with its LoRA targets, allowed ranks, and bundled config.json.

    Registers vLLM language-tower classes for Qwen3.5 VL checkpoints, including text-only M-RoPE positions.

    Windows CPU pytest uses a 10-minute per-test timeout; the GitHub job is capped at 40 minutes.

Full Changelog: v2.54.0...v2.55.0

agilerl-arena/v1.25.0: agilerl-arena v1.25.0: enable vLLM tower/connector LoRA only when the adapter targets those modules

Released on 2026-10-12 - GitHub - PyPI

Features

  • support Qwen/Qwen3.6-35B-A3B and Qwen3.5 language towers

    Adds Qwen/Qwen3.6-35B-A3B to SUPPORTED_MODEL_INFO with its LoRA targets, allowed ranks, and bundled config.json.

    Registers vLLM language-tower classes for Qwen3.5 VL checkpoints, including text-only M-RoPE positions.

    Windows CPU pytest uses a 10-minute per-test timeout; the GitHub job is capped at 40 minutes.

Breaking Changes

  • enable vLLM tower/connector LoRA only when the adapter targets those modules

    Turn on vLLM tower/connector LoRA only when the LoRA adapter's PEFT targets include the family's tower or connector linears.

    Breaking:

    • ModelRuntimeConfig.enable_tower_connector_lora: bool is now tower_connector_lora_targets: frozenset[str]: the trainer-side PEFT names of those linears (set for nemotron_h_omni).
    • apply_tower_connector_lora_engine_kwargs takes a required lora_target_modules. Tower LoRA turns on when those targets name a tower/connector module, or are a string spec (all-linear / regex) or None. It stays off when the family has no targets or towers are stripped.

    build_vllm_llm_init_kwargs and LLMAlgorithm pass the adapter's target_modules into that gate.

Full Changelog: agilerl-arena/v1.24.0...agilerl-arena/v1.25.0

v2.54.0: enable vLLM tower/connector LoRA only when the adapter targets those modules

Released on 2026-10-11 - GitHub - PyPI

Breaking Changes

  • enable vLLM tower/connector LoRA only when the adapter targets those modules

    Turn on vLLM tower/connector LoRA only when the LoRA adapter's PEFT targets include the family's tower or connector linears.

    Breaking:

    • ModelRuntimeConfig.enable_tower_connector_lora: bool is now tower_connector_lora_targets: frozenset[str]: the trainer-side PEFT names of those linears (set for nemotron_h_omni).
    • apply_tower_connector_lora_engine_kwargs takes a required lora_target_modules. Tower LoRA turns on when those targets name a tower/connector module, or are a string spec (all-linear / regex) or None. It stays off when the family has no targets or towers are stripped.

    build_vllm_llm_init_kwargs and LLMAlgorithm pass the adapter's target_modules into that gate.

Full Changelog: v2.53.0...v2.54.0

v2.53.0: default GRPO-family off-policy masks, kl_clamp 10, accumulation_window loss_norm and mean-only advantages

Released on 2026-10-10 - GitHub - PyPI

Breaking Changes

  • default GRPO-family off-policy masks, kl_clamp 10, accumulation_window loss_norm and mean-only advantages

    GRPO, GSPO and CISPO now default to loss_norm: accumulation_window, kl_clamp: 10.0 (also LLM PPO), off_policy_token_mask_bounds: [0.5, 5.0], off_policy_sequence_mask_threshold: 0.03, use_bias_correction_kl: true, adv_norm: mean_only, and top_p: 1.0. Agents built or resumed without those keys pick up the new defaults. Opt out with kl_clamp: null, loss_norm: micro_batch, null / false / mean_std / 0.95.

    kl_clamp is a one-sided per-token bound on the K3 KL penalty: tokens further below the reference get no KL gradient. Off-policy token and sequence masks drop the policy and KL gradient of out-of-band tokens and drifted negative-advantage rows. Bias-corrected KL weights K3 by the un-clamped ratio to the old policy.

    The fused Liger GRPO-family loss now uses the same per-token weights as the PyTorch path under every loss_norm. GSPO with use_liger_loss=True runs (Liger sequence level) instead of raising. CISPO + Liger configs that trained at micro_batch now set loss_norm: accumulation_window.

    Arena GRPOSpec / CISPOSpec / GSPOSpec / LLMPPOSpec expose the new fields with those defaults. RolloutLLMSpec.top_p defaults to 1.0.
    Adaptive task sampling can pool rows into families: TaskAssigner(families=..., family_prior_strength=...) starts each row at its family's informative rate. Arena env specs expose task_family_field (off by default) and task_family_prior_strength (1.0).
    Arena TrainingSpec.reuse_prefix_cache_across_syncs (off by default) keeps the served LoRA name, and so vLLM's prefix cache, for max_rollout_version_lag weight versions; it requires an LLM replay_buffer with max_rollout_version_lag >= 1.

Full Changelog: v2.52.0...v2.53.0

agilerl-arena/v1.24.0: agilerl-arena v1.24.0: default GRPO-family off-policy masks, kl_clamp 10, accumulation_window loss_norm and mean-only advantages

Released on 2026-10-10 - GitHub - PyPI

Breaking Changes

  • default GRPO-family off-policy masks, kl_clamp 10, accumulation_window loss_norm and mean-only advantages

    GRPO, GSPO and CISPO now default to loss_norm: accumulation_window, kl_clamp: 10.0 (also LLM PPO), off_policy_token_mask_bounds: [0.5, 5.0], off_policy_sequence_mask_threshold: 0.03, use_bias_correction_kl: true, adv_norm: mean_only, and top_p: 1.0. Agents built or resumed without those keys pick up the new defaults. Opt out with kl_clamp: null, loss_norm: micro_batch, null / false / mean_std / 0.95.

    kl_clamp is a one-sided per-token bound on the K3 KL penalty: tokens further below the reference get no KL gradient. Off-policy token and sequence masks drop the policy and KL gradient of out-of-band tokens and drifted negative-advantage rows. Bias-corrected KL weights K3 by the un-clamped ratio to the old policy.

    The fused Liger GRPO-family loss now uses the same per-token weights as the PyTorch path under every loss_norm. GSPO with use_liger_loss=True runs (Liger sequence level) instead of raising. CISPO + Liger configs that trained at micro_batch now set loss_norm: accumulation_window.

    Arena GRPOSpec / CISPOSpec / GSPOSpec / LLMPPOSpec expose the new fields with those defaults. RolloutLLMSpec.top_p defaults to 1.0.
    Adaptive task sampling can pool rows into families: TaskAssigner(families=..., family_prior_strength=...) starts each row at its family's informative rate. Arena env specs expose task_family_field (off by default) and task_family_prior_strength (1.0).
    Arena TrainingSpec.reuse_prefix_cache_across_syncs (off by default) keeps the served LoRA name, and so vLLM's prefix cache, for max_rollout_version_lag weight versions; it requires an LLM replay_buffer with max_rollout_version_lag >= 1.

Full Changelog: agilerl-arena/v1.23.0...agilerl-arena/v1.24.0

v2.52.0: speed up LLM learn with row balance, routed-expert chunks, and memory auto-pick

Released on 2026-10-10 - GitHub - PyPI

Features

  • speed up LLM learn with row balance, routed-expert chunks, and memory auto-pick

    LLM algorithms share a faster learn loop: data-parallel ranks exchange segment rows so each rank runs about the mean count; packed-row layout, mixer scan, and micro-batch metrics stay on device until the end of learn; loss finiteness is checked on device and read once per optimizer step.

    Routed-expert LoRA chunks by fixed row ranges with device-side offsets (FSDPConfig.routed_expert_chunk_mib). Unset chunk size and optim_cpu_offload are resolved from the agilerl-arena estimate (largest fitting 64/128/256/512 MiB, then GPU fused AdamW only if the estimate still fits). optim_cpu_offload defaults to None. EP LoRA grads keep their parameter strides so fused AdamW accepts them. Frozen Mamba2 out_proj runs after the fused scan. torch._grouped_mm runs only on sm90/sm100 bf16.

    The arena estimator adds a routed-chunk term, GPU Adam state, packed expert LoRA as stacked tensors, a host breakdown, and shards weights across one shard_group_size group. Segmented rollouts keep prompts within segment_prompt_tokens and end with prompt_limit when a restart does not fit; max_row_tokens sizes the estimate. Optional restart_older_obs_field / restart_older_images shrink restart context (off by default). Frozen vision tower outputs are reused within a GRPO, PPO, or REINFORCE learn step. VLLMConfig.limit_mm_per_prompt is a typed field. TaskAssigner shards rows by stride. Checkpoints can snapshot on the host (snapshot_checkpoint) and store optimizer state (training.checkpoint_optimizer). Hugging Face trust_remote_code loads copy checkpoint code under a cross-process file lock; weight loads run outside that lock.

    Breaking: balanced_row_plan takes ranks_per_group; balance_rows_across_ranks takes shard_group_size and row_values=, and returns (rows, values). pad_row_advantages is pad_row_values. materialize_fsdp2_from_cpu_state needs routed_expert_chunk_mib set; FSDPRuntime.prepare_actor needs optim_cpu_offload set (wrap_models resolves both). fsdp.compile_blocks and compile_backend are removed; a manifest that sets them fails validation. DPO.learn returns cross-rank means of loss and implicit rewards. Distributed LoRA init uses the shared seed on every rank.

Full Changelog: v2.51.0...v2.52.0

agilerl-arena/v1.23.0: agilerl-arena v1.23.0: speed up LLM learn with row balance, routed-expert chunks, and memory auto-pick

Released on 2026-10-10 - GitHub - PyPI

Features

  • speed up LLM learn with row balance, routed-expert chunks, and memory auto-pick

    LLM algorithms share a faster learn loop: data-parallel ranks exchange segment rows so each rank runs about the mean count; packed-row layout, mixer scan, and micro-batch metrics stay on device until the end of learn; loss finiteness is checked on device and read once per optimizer step.

    Routed-expert LoRA chunks by fixed row ranges with device-side offsets (FSDPConfig.routed_expert_chunk_mib). Unset chunk size and optim_cpu_offload are resolved from the agilerl-arena estimate (largest fitting 64/128/256/512 MiB, then GPU fused AdamW only if the estimate still fits). optim_cpu_offload defaults to None. EP LoRA grads keep their parameter strides so fused AdamW accepts them. Frozen Mamba2 out_proj runs after the fused scan. torch._grouped_mm runs only on sm90/sm100 bf16.

    The arena estimator adds a routed-chunk term, GPU Adam state, packed expert LoRA as stacked tensors, a host breakdown, and shards weights across one shard_group_size group. Segmented rollouts keep prompts within segment_prompt_tokens and end with prompt_limit when a restart does not fit; max_row_tokens sizes the estimate. Optional restart_older_obs_field / restart_older_images shrink restart context (off by default). Frozen vision tower outputs are reused within a GRPO, PPO, or REINFORCE learn step. VLLMConfig.limit_mm_per_prompt is a typed field. TaskAssigner shards rows by stride. Checkpoints can snapshot on the host (snapshot_checkpoint) and store optimizer state (training.checkpoint_optimizer). Hugging Face trust_remote_code loads copy checkpoint code under a cross-process file lock; weight loads run outside that lock.

    Breaking: balanced_row_plan takes ranks_per_group; balance_rows_across_ranks takes shard_group_size and row_values=, and returns (rows, values). pad_row_advantages is pad_row_values. materialize_fsdp2_from_cpu_state needs routed_expert_chunk_mib set; FSDPRuntime.prepare_actor needs optim_cpu_offload set (wrap_models resolves both). fsdp.compile_blocks and compile_backend are removed; a manifest that sets them fails validation. DPO.learn returns cross-rank means of loss and implicit rewards. Distributed LoRA init uses the shared seed on every rank.

Fixes

  • scale MoE expert LoRA on rank-r rows; load LLM checkpoints with extra LoRA target modules

    • low_rank_delta in agilerl.lora.moe.adapters applies the LoRA scaling to the rank-r intermediate, so no multiply runs over the full [rows, out] output in forward or backward. The result is unchanged.
    • LLMAlgorithm checkpoint loading accepts a checkpoint whose LoRA config adapts a strict superset of the live config's target_modules and otherwise matches. It warns and skips the extra modules' adapter weights. Other LoRA config mismatches still raise.

Full Changelog: agilerl-arena/v1.22.0...agilerl-arena/v1.23.0

v2.51.0: invert one memory setting and pick the cheapest fitting GPU tier

Released on 2026-10-09 - GitHub - PyPI

Features

  • invert one memory setting and pick the cheapest fitting GPU tier

    arena memory solve FIELD holds every other input fixed and returns the largest value that still fits. Training uses the same underprediction buffer as estimate. Fields: max_model_len, max_num_seqs. --inference sizes a dedicated serving GPU.

    arena memory estimate without --gpu or --device-gb picks the cheapest Arena resource tier (credits per node-hour) whose node fits the manifest. Training fit uses the estimator's underprediction buffer; a tier that only fits on the point estimate is not recommended.

Fixes

  • scale MoE expert LoRA on rank-r rows; load LLM checkpoints with extra LoRA target modules

    • low_rank_delta in agilerl.lora.moe.adapters applies the LoRA scaling to the rank-r intermediate, so no multiply runs over the full [rows, out] output in forward or backward. The result is unchanged.
    • LLMAlgorithm checkpoint loading accepts a checkpoint whose LoRA config adapts a strict superset of the live config's target_modules and otherwise matches. It warns and skips the extra modules' adapter weights. Other LoRA config mismatches still raise.

Full Changelog: v2.50.0...v2.51.0

agilerl-arena/v1.22.0: agilerl-arena v1.22.0: invert one memory setting and pick the cheapest fitting GPU tier

Released on 2026-10-09 - GitHub - PyPI

Features

  • invert one memory setting and pick the cheapest fitting GPU tier

    arena memory solve FIELD holds every other input fixed and returns the largest value that still fits. Training uses the same underprediction buffer as estimate. Fields: max_model_len, max_num_seqs. --inference sizes a dedicated serving GPU.

    arena memory estimate without --gpu or --device-gb picks the cheapest Arena resource tier (credits per node-hour) whose node fits the manifest. Training fit uses the estimator's underprediction buffer; a tier that only fits on the point estimate is not recommended.

Full Changelog: agilerl-arena/v1.21.0...agilerl-arena/v1.22.0

v2.50.0: add CNN→LSTM encoder for image observations (cnn_lstm)

Released on 2026-10-08 - GitHub - PyPI

Features

  • add CNN→LSTM encoder for image observations (cnn_lstm)

    Add EvolvableCnnLstm (CNN trunk + LSTM head) and select it when the observation is a 3D image Box and recurrent=True. Hidden-state keys follow LSTM ({name}_h / {name}_c). Architecture mutation on the composite encoder is disabled. input_shape is channel-first. Sequence forward keeps the time axis like LSTM. The module takes net_config (CnnLstmNetConfig or a dict).

    Arena exposes CnnLstmSpec and arch: cnn_lstm. infer_encoder_arch returns cnn_lstm for image observations with recurrent=True. Sample configs: ppo_cnn_lstm.yaml and ppo_image_recurrent.yaml. Module defaults match CnnLstmNetConfig.

Full Changelog: v2.49.1...v2.50.0

agilerl-arena/v1.21.0: agilerl-arena v1.21.0: add CNN→LSTM encoder for image observations (cnn_lstm)

Released on 2026-10-08 - GitHub - PyPI

Features

  • add CNN→LSTM encoder for image observations (cnn_lstm)

    Add EvolvableCnnLstm (CNN trunk + LSTM head) and select it when the observation is a 3D image Box and recurrent=True. Hidden-state keys follow LSTM ({name}_h / {name}_c). Architecture mutation on the composite encoder is disabled. input_shape is channel-first. Sequence forward keeps the time axis like LSTM. The module takes net_config (CnnLstmNetConfig or a dict).

    Arena exposes CnnLstmSpec and arch: cnn_lstm. infer_encoder_arch returns cnn_lstm for image observations with recurrent=True. Sample configs: ppo_cnn_lstm.yaml and ppo_image_recurrent.yaml. Module defaults match CnnLstmNetConfig.

Full Changelog: agilerl-arena/v1.20.0...agilerl-arena/v1.21.0

v2.49.1: pre-submission GPU memory estimate gate

Released on 2026-10-08 - GitHub - PyPI

Features

  • pre-submission GPU memory estimate gate

    arena memory estimate sizes a training manifest against a GPU before submit. Exit 0 if both phases fit, 3 if either is over budget. Pass --config to stay offline.

Full Changelog: v2.49.0...v2.49.1

agilerl-arena/v1.20.0: agilerl-arena v1.20.0: pre-submission GPU memory estimate gate

Released on 2026-10-08 - GitHub - PyPI

Features

  • pre-submission GPU memory estimate gate

    arena memory estimate sizes a training manifest against a GPU before submit. Exit 0 if both phases fit, 3 if either is over budget. Pass --config to stay offline.

Full Changelog: agilerl-arena/v1.19.0...agilerl-arena/v1.20.0

v2.49.0: Show action errors and instruction images in LLM env prompts, keep recent turns across context restarts, add PPO critic warmup and per-group gradient clipping

Released on 2026-10-07 - GitHub - PyPI

Other

  • Show action errors and instruction images in LLM env prompts, keep recent turns across context restarts, add PPO critic warmup and per-group gradient clipping

    • RolloutHarness(action_error_field=...) lists an observation field's error text after its action when a context restart summarizes past actions.
    • RolloutHarness puts the reset observation's goal_images after the first prompt and every restarted prompt, letterboxed to the observation image's size so every image in an episode stacks into one pixel_values tensor.
    • RolloutHarness(restart_keep_turns=k) repeats the last k turns verbatim after a context restart.
    • EnvResponse takes gymnasium terminated and truncated; done is derived from them. TaskAssigner.record_outcome takes a group success outcome, and TaskRowStats reports tied-failure / mixed / tied-success counts.
    • LLMPPO clips actor and critic gradients by their own norms (share_grad_clip=True uses one coefficient from the combined norm). OptimizerStep.clip_coefs replaces clip_coef.
    • LLMPPO critic_warmup_steps trains only the critic for the first N learn steps.
    • FSDP resumes value-head lora_only checkpoints, and the critic LoRA stays trainable after a LoRA load.
    • sync_grads / all_reduce_grads skip params whose grad is None on every rank; ranks that disagree still raise.
    • ModelArch.from_hf_config reads configs that nest the text model under llm_config and give depth only as a per-layer type list.
    • GroupReplayStore keeps per-task trajectories by return so tied rollout groups can be given a different-return member.
    • CosineLRScheduleConfig steps once per learn call: num_epochs is renamed num_steps, with new min_lr_ratio and actor_start_step, and one lr_multiplier(step, start_step) method. The LLMPPO actor's schedule starts after critic_warmup_steps. LLMAlgorithm.current_lr_critic gives the critic rate the next learn trains with.

Full Changelog: v2.48.1...v2.49.0

agilerl-arena/v1.19.0: agilerl-arena v1.19.0: size the fused-pass check from the checkpoint’s config.json

Released on 2026-10-07 - GitHub - PyPI

Fixes

  • size the fused-pass check from the checkpoint's config.json

    The auto fused-pass check now builds ModelArch from the checkpoint's raw config.json (PretrainedConfig.get_config_dict) instead of actor.config.to_dict(). transformers 5's NemotronHConfig drops num_hidden_layers, renames hybrid layer types, and can emit MoE defaults for dense checkpoints, which crashed with KeyError: 'num_hidden_layers'.

    CUDA fuse tests write that config.json; a Nemotron Nano 4B config is parsed as 42 layers, 4 attention, 21 Mamba, dense.

Other

  • Show action errors and instruction images in LLM env prompts, keep recent turns across context restarts, add PPO critic warmup and per-group gradient clipping

    • RolloutHarness(action_error_field=...) lists an observation field's error text after its action when a context restart summarizes past actions.
    • RolloutHarness puts the reset observation's goal_images after the first prompt and every restarted prompt, letterboxed to the observation image's size so every image in an episode stacks into one pixel_values tensor.
    • RolloutHarness(restart_keep_turns=k) repeats the last k turns verbatim after a context restart.
    • EnvResponse takes gymnasium terminated and truncated; done is derived from them. TaskAssigner.record_outcome takes a group success outcome, and TaskRowStats reports tied-failure / mixed / tied-success counts.
    • LLMPPO clips actor and critic gradients by their own norms (share_grad_clip=True uses one coefficient from the combined norm). OptimizerStep.clip_coefs replaces clip_coef.
    • LLMPPO critic_warmup_steps trains only the critic for the first N learn steps.
    • FSDP resumes value-head lora_only checkpoints, and the critic LoRA stays trainable after a LoRA load.
    • sync_grads / all_reduce_grads skip params whose grad is None on every rank; ranks that disagree still raise.
    • ModelArch.from_hf_config reads configs that nest the text model under llm_config and give depth only as a per-layer type list.
    • GroupReplayStore keeps per-task trajectories by return so tied rollout groups can be given a different-return member.
    • CosineLRScheduleConfig steps once per learn call: num_epochs is renamed num_steps, with new min_lr_ratio and actor_start_step, and one lr_multiplier(step, start_step) method. The LLMPPO actor's schedule starts after critic_warmup_steps. LLMAlgorithm.current_lr_critic gives the critic rate the next learn trains with.

Full Changelog: agilerl-arena/v1.18.0...agilerl-arena/v1.19.0

v2.48.1: size the fused-pass check from the checkpoint’s config.json

Released on 2026-10-07 - GitHub - PyPI

Fixes

  • size the fused-pass check from the checkpoint's config.json

    The auto fused-pass check now builds ModelArch from the checkpoint's raw config.json (PretrainedConfig.get_config_dict) instead of actor.config.to_dict(). transformers 5's NemotronHConfig drops num_hidden_layers, renames hybrid layer types, and can emit MoE defaults for dense checkpoints, which crashed with KeyError: 'num_hidden_layers'.

    CUDA fuse tests write that config.json; a Nemotron Nano 4B config is parsed as 42 layers, 4 attention, 21 Mamba, dense.

Full Changelog: v2.48.0...v2.48.1

v2.48.0: run LLMPPO actor and critic as separate or fused passes, picked by memory estimate

Released on 2026-10-07 - GitHub - PyPI

Features

  • run LLMPPO actor and critic as separate or fused passes, picked by memory estimate

    • LLMPPO runs the actor (policy and KL loss) and the critic (value loss) as separate forward/backward passes per micro-batch, so peak activation memory is one batch of rows, not two. This covers both the Liger and unfused loss paths.
    • New fuse_actor_critic_pass: bool | None = None on LLMPPO and LLMPPOSpec. True runs one fused pass, False runs two. None fuses when the agilerl.arena.memory estimate of the fused pass fits the GPU, and fuses on non-CUDA devices. The choice is re-resolved on checkpoint load.
    • On the Liger path the critic pass runs under the critic adapter, so the value loss trains the critic LoRA.
    • The critic adapter stays trainable after FSDP2 replaces the model's parameters.
    • With activation_offload=True, the split Liger actor pass also offloads saved activations to CPU.
    • The fused-pass memory estimate uses the packed-expert LoRA path the model actually runs.
    • PPO learn reports actor and critic gradient norms before and after clipping.
    • agilerl-arena memory estimator: TrainingSettings gains fuse_actor_critic_pass (PPO only) and micro_batch_size.
    • agilerl now requires agilerl-arena>=1.18.0.

Full Changelog: v2.47.0...v2.48.0

agilerl-arena/v1.18.0: agilerl-arena v1.18.0: run LLMPPO actor and critic as separate or fused passes, picked by memory estimate

Released on 2026-10-07 - GitHub - PyPI

Features

  • run LLMPPO actor and critic as separate or fused passes, picked by memory estimate

    • LLMPPO runs the actor (policy and KL loss) and the critic (value loss) as separate forward/backward passes per micro-batch, so peak activation memory is one batch of rows, not two. This covers both the Liger and unfused loss paths.
    • New fuse_actor_critic_pass: bool | None = None on LLMPPO and LLMPPOSpec. True runs one fused pass, False runs two. None fuses when the agilerl.arena.memory estimate of the fused pass fits the GPU, and fuses on non-CUDA devices. The choice is re-resolved on checkpoint load.
    • On the Liger path the critic pass runs under the critic adapter, so the value loss trains the critic LoRA.
    • The critic adapter stays trainable after FSDP2 replaces the model's parameters.
    • With activation_offload=True, the split Liger actor pass also offloads saved activations to CPU.
    • The fused-pass memory estimate uses the packed-expert LoRA path the model actually runs.
    • PPO learn reports actor and critic gradient norms before and after clipping.
    • agilerl-arena memory estimator: TrainingSettings gains fuse_actor_critic_pass (PPO only) and micro_batch_size.
    • agilerl now requires agilerl-arena>=1.18.0.

Full Changelog: agilerl-arena/v1.17.0...agilerl-arena/v1.18.0

v2.47.0: Nemotron 3.5 Super-VL training with expert and tensor parallel LoRA

Released on 2026-10-06 - GitHub - PyPI

Features

  • Nemotron 3.5 Super-VL training with expert and tensor parallel LoRA

    Adds the Nemotron-H / Super-VL architecture, expert-parallel, tensor-parallel and node-local sharded FSDP training, and MoE expert LoRA with grouped GEMM and recompute. Also adds sequence packing that resets Mamba state at document boundaries, old log-probs from rollouts, an episode-balanced loss_norm for GRPO-family learners, and learn profiling. Image episodes record the processor inputs they keep, so a trainer can rebuild pixel_values from the screenshots. Moves LoRA into agilerl.lora.

Full Changelog: v2.46.1...v2.47.0

agilerl-arena/v1.17.0: agilerl-arena v1.17.0: Nemotron 3.5 Super-VL training with expert and tensor parallel LoRA

Released on 2026-10-06 - GitHub - PyPI

Features

  • Nemotron 3.5 Super-VL training with expert and tensor parallel LoRA

    Adds the Nemotron-H / Super-VL architecture, expert-parallel, tensor-parallel and node-local sharded FSDP training, and MoE expert LoRA with grouped GEMM and recompute. Also adds sequence packing that resets Mamba state at document boundaries, old log-probs from rollouts, an episode-balanced loss_norm for GRPO-family learners, and learn profiling. Image episodes record the processor inputs they keep, so a trainer can rebuild pixel_values from the screenshots. Moves LoRA into agilerl.lora.

Full Changelog: agilerl-arena/v1.16.0...agilerl-arena/v1.17.0

v2.46.1: closed-form GPU memory estimator

Released on 2026-10-06 - GitHub - PyPI

Features

  • closed-form GPU memory estimator

    Peak GPU memory for LLM RL from model geometry, device, and training/generation settings. Two independent phase bars (training and generation never peak at once). No profiling, no fitted correction, no weight download.

    PhaseTimer CPU tests drive a fake clock so they do not depend on Windows sleep resolution.

Full Changelog: v2.46.0...v2.46.1

agilerl-arena/v1.16.0: agilerl-arena v1.16.0: expose MF-PBT evolution planning and hyperparameter reset

Released on 2026-10-06 - GitHub - PyPI

Features

  • expose MF-PBT evolution planning and hyperparameter reset

    MultiFrequencySelection.plan_evolution returns one generation as an index plan without cloning agents. apply_hp_reset is public so a migrant can take a destination elite's mutable hyperparameters.

  • closed-form GPU memory estimator

    Peak GPU memory for LLM RL from model geometry, device, and training/generation settings. Two independent phase bars (training and generation never peak at once). No profiling, no fitted correction, no weight download.

    PhaseTimer CPU tests drive a fake clock so they do not depend on Windows sleep resolution.

Full Changelog: agilerl-arena/v1.15.0...agilerl-arena/v1.16.0

v2.46.0: add release status to supported models

Released on 2026-10-06 - GitHub - PyPI

Features

  • add release status to supported models

    ModelInfo.status marks each supported model live, deprecated, or
    preview, and arena models supported includes it. ArenaClient.submit_experiment
    warns when the manifest uses a deprecated model and rejects a preview one.
    Manifest validation still does not consult status.

    The Super-VL bundled inspected LoRA data includes language-tower dims
    (vision and connector targets stay names-only), so that id has derived LoRA
    ranks and drops latent projections from the allowlist.

  • expose MF-PBT evolution planning and hyperparameter reset

    MultiFrequencySelection.plan_evolution returns one generation as an index plan without cloning agents. apply_hp_reset is public so a migrant can take a destination elite's mutable hyperparameters.

Full Changelog: v2.45.0...v2.46.0

agilerl-arena/v1.15.0: agilerl-arena v1.15.0: load every parquet split under a dataset directory

Released on 2026-10-06 - GitHub - PyPI

Features

  • load every parquet split under a dataset directory

    A local parquet directory whose files live in immediate child directories now loads every split. When a train split exists alongside another split, training uses every train row and evaluation uses every other split. A file, a flat shard directory, a train-only directory, or split directories with no train directory still use a random holdout. Empty directories still raise.

  • add release status to supported models

    ModelInfo.status marks each supported model live, deprecated, or
    preview, and arena models supported includes it. ArenaClient.submit_experiment
    warns when the manifest uses a deprecated model and rejects a preview one.
    Manifest validation still does not consult status.

    The Super-VL bundled inspected LoRA data includes language-tower dims
    (vision and connector targets stay names-only), so that id has derived LoRA
    ranks and drops latent projections from the allowlist.

Full Changelog: agilerl-arena/v1.14.0...agilerl-arena/v1.15.0

v2.45.0: load every parquet split under a dataset directory

Released on 2026-10-06 - GitHub - PyPI

Features

  • load every parquet split under a dataset directory

    A local parquet directory whose files live in immediate child directories now loads every split. When a train split exists alongside another split, training uses every train row and evaluation uses every other split. A file, a flat shard directory, a train-only directory, or split directories with no train directory still use a random holdout. Empty directories still raise.

Full Changelog: v2.44.0...v2.45.0

v2.44.0: let LLMEnvSpec declare env sessions and shared services

Released on 2026-10-06 - GitHub - PyPI

Features

  • let LLMEnvSpec declare env sessions and shared services

    LLMEnvSpec now accepts env_sessions_per_host, env_session_ports, env_host_memory_limit_bytes, env_host_ready_timeout_s, and env_services so one env_image can run several sessions plus shared backing services. More than one session per host requires env_session_ports. With env_image, env_sessions_per_host defaults to 1 and env_host_ready_timeout_s to 600. EnvServiceSpec and EnvContainerSpec are public models (agilerl.arena.models) and reject unknown keys. Those host settings still require env_image, and dataset environments reject them. The env_image default for cpus_per_env_host is 0.01.

  • VisualWebArena env client and multi-turn vision segment learning

    Adds image observations and a vision transcript to the OpenEnv harness, so vision-language models can train on VisualWebArena. Long episodes restart as new segments when the prompt outgrows a token or image budget. GRPO, PPO and REINFORCE for LLMs learn from those episode segments and pass pixel values through the fused log-prob forward and loss. Every LLM algorithm reports learn-phase timings. Adds held-out evaluation fields and adaptive task sampling to the arena env and training models.

Full Changelog: v2.43.0...v2.44.0

agilerl-arena/v1.14.0: agilerl-arena v1.14.0: VisualWebArena env client and multi-turn vision segment learning

Released on 2026-10-06 - GitHub - PyPI

Features

  • VisualWebArena env client and multi-turn vision segment learning

    Adds image observations and a vision transcript to the OpenEnv harness, so vision-language models can train on VisualWebArena. Long episodes restart as new segments when the prompt outgrows a token or image budget. GRPO, PPO and REINFORCE for LLMs learn from those episode segments and pass pixel values through the fused log-prob forward and loss. Every LLM algorithm reports learn-phase timings. Adds held-out evaluation fields and adaptive task sampling to the arena env and training models.

Full Changelog: agilerl-arena/v1.13.0...agilerl-arena/v1.14.0

agilerl-arena/v1.13.0: agilerl-arena v1.13.0: let LLMEnvSpec declare env sessions and shared services

Released on 2026-10-06 - GitHub - PyPI

Features

  • let LLMEnvSpec declare env sessions and shared services

    LLMEnvSpec now accepts env_sessions_per_host, env_session_ports, env_host_memory_limit_bytes, env_host_ready_timeout_s, and env_services so one env_image can run several sessions plus shared backing services. More than one session per host requires env_session_ports. With env_image, env_sessions_per_host defaults to 1 and env_host_ready_timeout_s to 600. EnvServiceSpec and EnvContainerSpec are public models (agilerl.arena.models) and reject unknown keys. Those host settings still require env_image, and dataset environments reject them. The env_image default for cpus_per_env_host is 0.01.

Full Changelog: agilerl-arena/v1.12.0...agilerl-arena/v1.13.0

v2.43.0: support Qwen/Qwen3.8-27B in agilerl-arena

Released on 2026-10-06 - GitHub - PyPI

Features

  • support Qwen/Qwen3.8-27B in agilerl-arena

    Adds Qwen/Qwen3.8-27B to SUPPORTED_MODEL_INFO with its LoRA targets, allowed ranks, and bundled config.json.

Full Changelog: v2.42.5...v2.43.0

agilerl-arena/v1.12.0: agilerl-arena v1.12.0: support Qwen/Qwen3.8-27B in agilerl-arena

Released on 2026-10-06 - GitHub - PyPI

Features

  • support Qwen/Qwen3.8-27B in agilerl-arena

    Adds Qwen/Qwen3.8-27B to SUPPORTED_MODEL_INFO with its LoRA targets, allowed ranks, and bundled config.json.

Fixes

  • map FSDP checkpoint keys forward through one-to-one renames

    FSDP shard load applies Hugging Face one-to-one weight renames forward over safetensors keys, then looks live parameter names up in that map, matching from_pretrained. Checkpoints that only need part of a family's mapping now load; Nemotron-H stores backbone.embeddings.weight, and undoing both backbone. → model. and embedding.weight → embeddings.weight searched for backbone.embedding.weight. Packed expert shards stacked into one parameter are found under the renamed keys. Split packing converters still resolve through the reverse path. Two checkpoint keys that rename to the same parameter raise an error.

Full Changelog: agilerl-arena/v1.11.1...agilerl-arena/v1.12.0

v2.42.5: point arena CLI login at arena-auth.agilerl.com

Released on 2026-10-05 - GitHub - PyPI

Fixes

  • point arena CLI login at arena-auth.agilerl.com

    The default Keycloak URL for arena login was https://auth.arena.agilerl.com, which returns 404 and does not serve the Arena realm. It is now https://arena-auth.agilerl.com. --keycloak-url and ARENA_KEYCLOAK_URL still override the default.

  • map FSDP checkpoint keys forward through one-to-one renames

    FSDP shard load applies Hugging Face one-to-one weight renames forward over safetensors keys, then looks live parameter names up in that map, matching from_pretrained. Checkpoints that only need part of a family's mapping now load; Nemotron-H stores backbone.embeddings.weight, and undoing both backbone. → model. and embedding.weight → embeddings.weight searched for backbone.embedding.weight. Packed expert shards stacked into one parameter are found under the renamed keys. Split packing converters still resolve through the reverse path. Two checkpoint keys that rename to the same parameter raise an error.

Full Changelog: v2.42.4...v2.42.5

agilerl-arena/v1.11.1: agilerl-arena v1.11.1: point arena CLI login at arena-auth.agilerl.com

Released on 2026-10-05 - GitHub - PyPI

Fixes

  • point arena CLI login at arena-auth.agilerl.com

    The default Keycloak URL for arena login was https://auth.arena.agilerl.com, which returns 404 and does not serve the Arena realm. It is now https://arena-auth.agilerl.com. --keycloak-url and ARENA_KEYCLOAK_URL still override the default.

Full Changelog: agilerl-arena/v1.11.0...agilerl-arena/v1.11.1

v2.42.4: ship supported model info and configs in agilerl-arena

Released on 2026-11-04 - GitHub - PyPI

Features

  • ship supported model info and configs in agilerl-arena

    agilerl.arena.models.SUPPORTED_MODEL_INFO lists supported Hugging Face ids
    with their architecture, LoRA target_modules names, packed-expert
    target_parameters paths, per-target LoRA dims (lora_info), parameter
    counts, and allowed LoRA ranks. Each id bundles one JSON file with its config.json and inspected info;
    everything is read from those. arena models supported
    prints the list as JSON without a server call.

    Manifests for listed ids now reject LoRA ranks above the model's cap and any
    target_modules or target_parameters not in the stored lists, with the valid
    options in the error. target_modules must be all-linear or exact module
    names; regex strings are rejected. On MoE models an unset target_parameters
    adapts every expert and zeros lora_dropout ([] adapts none). Unlisted ids skip these checks. Gemma 4
    example configs use bare projection names. Supported ids resolve their family from the bundled config with no Hub call. agilerl now requires agilerl-arena 1.11.0 or newer.

Full Changelog: v2.42.3...v2.42.4

agilerl-arena/v1.11.0: agilerl-arena v1.11.0: fold vLLM into agilerl[llm] and lead README with LLM post-training

Released on 2026-10-05 - GitHub - PyPI

Features

  • fold vLLM into agilerl[llm] and lead README with LLM post-training

    agilerl[llm] now includes vLLM on Linux. New extra agilerl[cpu-llm] is the Hugging Face, PEFT and datasets stack without vLLM. HAS_LLM_DEPENDENCIES follows [cpu-llm]; vLLM is HAS_VLLM.

    Rewrite the README to lead with LLM post-training: SFT, DPO and RL (GRPO, CISPO, GSPO, REINFORCE, PPO), multi-turn OpenEnv environments, LoRA, FSDP2, memory and model-specific optimizations, and vLLM rollouts. Add sections on training at scale with the Arena CLI (including use from coding agents) and on local LLM training. Shorten the classic RL section, document cpu-llm in the install extras table, and add SFT to the algorithm tables.

  • ship supported model info and configs in agilerl-arena

    agilerl.arena.models.SUPPORTED_MODEL_INFO lists supported Hugging Face ids
    with their architecture, LoRA target_modules names, packed-expert
    target_parameters paths, per-target LoRA dims (lora_info), parameter
    counts, and allowed LoRA ranks. Each id bundles one JSON file with its config.json and inspected info;
    everything is read from those. arena models supported
    prints the list as JSON without a server call.

    Manifests for listed ids now reject LoRA ranks above the model's cap and any
    target_modules or target_parameters not in the stored lists, with the valid
    options in the error. target_modules must be all-linear or exact module
    names; regex strings are rejected. On MoE models an unset target_parameters
    adapts every expert and zeros lora_dropout ([] adapts none). Unlisted ids skip these checks. Gemma 4
    example configs use bare projection names. Supported ids resolve their family from the bundled config with no Hub call. agilerl now requires agilerl-arena 1.11.0 or newer.

Fixes

  • re-tie output head and recompute RoPE after meta load

    to_empty on the FSDP meta-device load path splits a tied lm_head / embed_out from embed_tokens. Tied checkpoints omit the head tensor, so the head stays empty and LoRA gradients are zero. Call tie_weights() on the module whose registered children include the head (walking through PEFT and value-head wrappers) and raise if a tied key is still a separate parameter. Non-persistent RoPE inv_freq buffers are not stored in safetensors; recompute them the same way Hugging Face _init_weights does.

    Pin COVERAGE_FILE to an absolute path so pytest's session chdir cannot drop coverage hits, and combine parallel coverage DBs from Linux 3.13 shards.

  • Gemma 4 vLLM startup, FSDP scalar buffers, L4 flex tiles

    Gemma 4 text_config has no architectures list. Stripping multimodal towers now maps that nested config to Gemma4ForCausalLM so vLLM can load the language engine. Tower-connector LoRA stays off for Gemma 4; only families that implement encoder token counts enable it. FSDP shard load uses get_tensor for full buffer copies so 0-dim buffers (clipped-linear clamp bounds) load. Flex attention on L4-class GPUs uses smaller backward tiles to fit their ~99 KB shared memory.

  • load Nemotron-H trainers with the transformers class

    Nemotron-H trainer runtime no longer sets trust_remote_code. Hugging Face transformers then uses its own nemotron_h class instead of the checkpoint auto_map code, which only allows eager attention. nemotron_h_omni still sets trust_remote_code because transformers does not ship that model type. vLLM still sets trust_remote_code for both families.

Full Changelog: agilerl-arena/v1.10.0...agilerl-arena/v1.11.0

v2.42.3: load Nemotron-H trainers with the transformers class

Released on 2026-10-05 - GitHub - PyPI

Fixes

  • load Nemotron-H trainers with the transformers class

    Nemotron-H trainer runtime no longer sets trust_remote_code. Hugging Face transformers then uses its own nemotron_h class instead of the checkpoint auto_map code, which only allows eager attention. nemotron_h_omni still sets trust_remote_code because transformers does not ship that model type. vLLM still sets trust_remote_code for both families.

Full Changelog: v2.42.2...v2.42.3

v2.42.2: Gemma 4 vLLM startup, FSDP scalar buffers, L4 flex tiles

Released on 2026-10-05 - GitHub - PyPI

Fixes

  • Gemma 4 vLLM startup, FSDP scalar buffers, L4 flex tiles

    Gemma 4 text_config has no architectures list. Stripping multimodal towers now maps that nested config to Gemma4ForCausalLM so vLLM can load the language engine. Tower-connector LoRA stays off for Gemma 4; only families that implement encoder token counts enable it. FSDP shard load uses get_tensor for full buffer copies so 0-dim buffers (clipped-linear clamp bounds) load. Flex attention on L4-class GPUs uses smaller backward tiles to fit their ~99 KB shared memory.

Full Changelog: v2.42.1...v2.42.2

v2.42.1: re-tie output head and recompute RoPE after meta load

Released on 2026-10-02 - GitHub - PyPI

Fixes

  • re-tie output head and recompute RoPE after meta load

    to_empty on the FSDP meta-device load path splits a tied lm_head / embed_out from embed_tokens. Tied checkpoints omit the head tensor, so the head stays empty and LoRA gradients are zero. Call tie_weights() on the module whose registered children include the head (walking through PEFT and value-head wrappers) and raise if a tied key is still a separate parameter. Non-persistent RoPE inv_freq buffers are not stored in safetensors; recompute them the same way Hugging Face _init_weights does.

    Pin COVERAGE_FILE to an absolute path so pytest's session chdir cannot drop coverage hits, and combine parallel coverage DBs from Linux 3.13 shards.

Full Changelog: v2.42.0...v2.42.1

v2.42.0: fold vLLM into agilerl[llm] and lead README with LLM post-training

Released on 2026-10-02 - GitHub - PyPI

Features

  • fold vLLM into agilerl[llm] and lead README with LLM post-training

    agilerl[llm] now includes vLLM on Linux. New extra agilerl[cpu-llm] is the Hugging Face, PEFT and datasets stack without vLLM. HAS_LLM_DEPENDENCIES follows [cpu-llm]; vLLM is HAS_VLLM.

    Rewrite the README to lead with LLM post-training: SFT, DPO and RL (GRPO, CISPO, GSPO, REINFORCE, PPO), multi-turn OpenEnv environments, LoRA, FSDP2, memory and model-specific optimizations, and vLLM rollouts. Add sections on training at scale with the Arena CLI (including use from coding agents) and on local LLM training. Shorten the classic RL section, document cpu-llm in the install extras table, and add SFT to the algorithm tables.

Fixes

  • emit wizard schema defaults and drop unused form fields

    Served /manifest/schema now includes numeric evo_steps defaults (LLM 20, classic 160000, CNN/MultiInput 320000), inlines lora_config Rank/Alpha/Dropout (1/32/0.05), omits learning_delay from on-policy training, strips unused answer_pattern, and gates Ornstein-Uhlenbeck theta/dt with if/then.

Full Changelog: v2.41.1...v2.42.0

agilerl-arena/v1.10.0: agilerl-arena v1.10.0: onboard gpt-oss-20b with flex attention and packed-expert LoRA

Released on 2026-10-01 - GitHub - PyPI

Features

  • onboard gpt-oss-20b with flex attention and packed-expert LoRA

    Family trainer attention defaults (Gemma SWA / gpt-oss Flex Attention) beat YAML and spec values; ATTN_IMPLEMENTATION still overrides. Packed-expert LoRA (target_parameters) forces lora_dropout=0 because PEFT cannot factor dropout out of the parameter-level product. GptOssExperts uses a split-LoRA forward for its matmul layout, biases, and interleaved SwiGLU. The grouped-GEMM capability probe no longer adds saved tensors to an activation checkpoint and no longer reports unsupported when first called under no_grad.

  • load parquet files or shard directories into one Dataset

    Add load_parquet_dataset for a local .parquet/.pq file or a directory of *.parquet shards. Shards concatenate as Hugging Face datasets in filename order; mismatched schemas raise. make_llm_env uses this for parquet files and directories that contain *.parquet; other paths still load as a Hub id or local Hugging Face dataset.

  • log sampled rollout completions during training

    train_llm_rollout takes a new completion_logging=CompletionLoggingConfig(...) argument. When set, each iteration samples prompt groups from the rollout batch and decodes prompt, completion, reward, turn count and completion-token count. Every interval iterations the samples from every population member go in one write to the console (verbose), a W&B completions table (wb) and an optional JSONL file (jsonl_path). Text fields are capped at max_chars, keeping head and tail. The latest samples are also logged at error level if training raises.

    The building blocks (CompletionLogger, CompletionRecord, build_completion_record and the writers) live in agilerl.training.llm.completion_logging for custom training loops.

  • sample trajectories per group and mark truncated logs

    CompletionLoggingConfig gains samples_per_group: when set, each sampled prompt group logs that many random trajectories instead of the whole group (unset keeps the previous whole-group behaviour). Over-long prompt/completion text is still head/tail truncated, now with a <LOG TRUNCATED: N chars> seam marker.

Fixes

  • release device memory after evolutionary mutation

    Add release_device_memory() and call it from Mutations.mutation and from
    clean_up() so MPS/CUDA caches from cloning and architecture changes do not
    accumulate across generations. Document architecture-mutation RSS on CPU and
    custom encoder get_init_dict requirements in the mutation guide.

  • emit wizard schema defaults and drop unused form fields

    Served /manifest/schema now includes numeric evo_steps defaults (LLM 20, classic 160000, CNN/MultiInput 320000), inlines lora_config Rank/Alpha/Dropout (1/32/0.05), omits learning_delay from on-policy training, strips unused answer_pattern, and gates Ornstein-Uhlenbeck theta/dt with if/then.

Other

  • save duration maps on the Linux test runners

    CI durations writes the Linux CPU timing map on ubuntu-24.04 and the GPU map on the self-hosted scale-set, matching the jobs that restore them.

  • run a single macOS job on Python 3.13

    GitHub-hosted macOS CI runs one job (macos-26, Python 3.13) instead of four Python versions.

  • bump GitHub Actions off Node 20 and CodeQL Action v3

    Put the CodeQL job steps in .github/workflows/codeql.yml so that file has
    on.push (CI still calls it as a merge gate; push to main and the weekly
    schedule still feed the Security tab). Use actions/checkout@v5 and
    github/codeql-action v4.

  • shard macOS and Windows pytest with duration maps

    macOS runs three duration-balanced shards and Windows two. Timing maps are stored on the default branch and restored on the same runner family that wrote them. Before a map exists, shards are packed with equal-weight LPT rather than contiguous slices.

  • refresh Python lockfile

    Regenerates the Python lockfile after dependency updates.

    Applies Liger Kernel patches to the module returned by PEFT's
    get_base_model().

Full Changelog: agilerl-arena/v1.9.4...agilerl-arena/v1.10.0

v2.41.1: refresh Python lockfile

Released on 2026-09-30 - GitHub - PyPI

Other

  • refresh Python lockfile

    Regenerates the Python lockfile after dependency updates.

    Applies Liger Kernel patches to the module returned by PEFT's
    get_base_model().

Full Changelog: v2.41.0...v2.41.1

v2.41.0: sample trajectories per group and mark truncated logs

Released on 2026-09-30 - GitHub - PyPI

Features

  • sample trajectories per group and mark truncated logs

    CompletionLoggingConfig gains samples_per_group: when set, each sampled prompt group logs that many random trajectories instead of the whole group (unset keeps the previous whole-group behaviour). Over-long prompt/completion text is still head/tail truncated, now with a <LOG TRUNCATED: N chars> seam marker.

Full Changelog: v2.40.1...v2.41.0

v2.40.1: shard macOS and Windows pytest with duration maps

Released on 2026-09-30 - GitHub - PyPI

Other

  • shard macOS and Windows pytest with duration maps

    macOS runs three duration-balanced shards and Windows two. Timing maps are stored on the default branch and restored on the same runner family that wrote them. Before a map exists, shards are packed with equal-weight LPT rather than contiguous slices.

Full Changelog: v2.40.0...v2.40.1

v2.40.0: log sampled rollout completions during training

Released on 2026-09-30 - GitHub - PyPI

Features

  • log sampled rollout completions during training

    train_llm_rollout takes a new completion_logging=CompletionLoggingConfig(...) argument. When set, each iteration samples prompt groups from the rollout batch and decodes prompt, completion, reward, turn count and completion-token count. Every interval iterations the samples from every population member go in one write to the console (verbose), a W&B completions table (wb) and an optional JSONL file (jsonl_path). Text fields are capped at max_chars, keeping head and tail. The latest samples are also logged at error level if training raises.

    The building blocks (CompletionLogger, CompletionRecord, build_completion_record and the writers) live in agilerl.training.llm.completion_logging for custom training loops.

Other

  • bump GitHub Actions off Node 20 and CodeQL Action v3

    Put the CodeQL job steps in .github/workflows/codeql.yml so that file has
    on.push (CI still calls it as a merge gate; push to main and the weekly
    schedule still feed the Security tab). Use actions/checkout@v5 and
    github/codeql-action v4.

Full Changelog: v2.39.0...v2.40.0

v2.39.0: load parquet files or shard directories into one Dataset

Released on 2026-09-30 - GitHub - PyPI

Features

  • load parquet files or shard directories into one Dataset

    Add load_parquet_dataset for a local .parquet/.pq file or a directory of *.parquet shards. Shards concatenate as Hugging Face datasets in filename order; mismatched schemas raise. make_llm_env uses this for parquet files and directories that contain *.parquet; other paths still load as a Hub id or local Hugging Face dataset.

Full Changelog: v2.38.1...v2.39.0