VOOZH about

URL: https://deepwiki.com/inclusionAI/AReaL/17-glossary

⇱ Glossary | inclusionAI/AReaL | DeepWiki


Loading...
Last indexed: 7 May 2026 (2e12c1)
Menu

Glossary

This page provides definitions and technical details for terms, jargon, and abbreviations specific to the AReaL codebase. It serves as a reference for onboarding engineers to understand the implementation and data flow of the system.

Core System Components

The AReaL architecture is divided into high-level orchestrators, training backends, and inference services.

TermDefinitionKey Code Entities
TrainerThe top-level orchestrator that manages the training loop, dataset loading, and coordination between rollout and optimization.PPOTrainer, GRPOTrainer, SFTTrainer (in areal/trainer/)
TrainEngineAbstract interface for training backends responsible for forward/backward passes, gradient updates, and weight synchronization.TrainEngine areal/api/engine_api.py32-230 FSDPEngine areal/engine/fsdp_engine.py218-1240 MegatronEngine areal/engine/megatron_engine.py168-1240 ArchonEngine areal/experimental/engine/archon_engine.py147-1110
InferenceEngineInterface for generation services. In AReaL, these are typically remote servers (SGLang/vLLM) managed via an async API.InferenceEngine areal/api/engine_api.py234-315 SGLangBackend areal/engine/sglang_remote.py40-191 VLLMBackend areal/engine/vllm_remote.py41-182
RolloutWorkflowDefines the logic for a single episode (e.g., multi-turn chat, tool use, or simple prompt-response).RolloutWorkflow areal/api/workflow_api.py RLVRWorkflow areal/workflow/rlvr.py MultiTurnWorkflow areal/workflow/multi_turn.py
SchedulerManages the lifecycle of distributed workers across different backends (Local, Ray, Slurm).Scheduler areal/api/engine_api.py133 RayScheduler areal/api/cli_args.py132

Sources: areal/api/engine_api.py32-315 areal/engine/fsdp_engine.py218-1240 areal/engine/megatron_engine.py168-1240 README.md15-39 areal/experimental/engine/archon_engine.py147-1110


Technical Jargon & Abbreviations

1. Parallelism Dimensions

AReaL supports multi-dimensional parallelism to scale large models.

2. Weight Versioning

In Fully Asynchronous RL, the training engine updates weights while the inference engine generates rollouts. To prevent training on stale data, AReaL uses a versioning system.

  • WeightUpdateMeta: A structure containing the weight version, storage path, and synchronization method (XCCL vs Disk). areal/api/io_struct.py183-211
  • Off-policyness: The lag between the model version used for rollout and the current training version. Tracked via _version in engines. areal/engine/fsdp_engine.py186

3. Data Structures

Sources: areal/api/cli_args.py99-138 areal/api/io_struct.py28-211 areal/engine/fsdp_engine.py89-94 areal/engine/megatron_engine.py22-30 areal/experimental/engine/archon_engine.py124-144


Code Entity Space Mapping

The following diagrams bridge Natural Language concepts to specific Code Entities.

Diagram 1: Training Execution Flow

This diagram shows how a Trainer uses a TrainEngine to process data via the MicroBatch system.


Sources: areal/api/engine_api.py32-230 areal/engine/fsdp_engine.py118-124 areal/utils/data.py105-145 areal/engine/fsdp_utils/grad.py84

Diagram 2: Remote Inference & Weight Sync

This diagram illustrates the relationship between the InferenceEngine and the weight update protocol.


Sources: areal/api/io_struct.py183-211 areal/engine/sglang_remote.py129-159 areal/engine/sglang_remote.py44-89


Detailed Glossary Table

TermImplementation DetailsFile Pointer
allocation_modeA pattern-based GPU parallel strategy allocation mode (legacy, moving to per-engine backend fields).BaseExperiment.allocation_mode docs/en/cli_reference.md104
UlyssesA specific implementation of Context Parallelism that uses all_to_all to shard sequences across the sp_group.ulysses_prepare_inputs areal/engine/fsdp_engine.py93
AnyPrecisionAdamWA custom optimizer supporting flexible precision for weights and gradients.AnyPrecisionAdamW areal/engine/fsdp_engine.py85
Tree TrainingA technique to optimize training on multiple completions of the same prompt by using a Trie to avoid redundant computation.build_packed_tree_batch areal/engine/fsdp_engine.py106
LoRA VersioningA system where LoRA adapters are saved with version suffixes (e.g., -v1) to support async rollout.get_versioned_lora_name areal/api/io_struct.py161-163
MicroBatchListA container for tensors that have been split into micro-batches, handling padding and sequence packing metadata.MicroBatchList areal/utils/data.py118
ArchonA torch-native training backend supporting pipeline parallelism and custom parallelism dimensions.ArchonEngine areal/experimental/engine/archon_engine.py147-196
NormConfigConfiguration for reward and advantage normalization, supporting batch or group-level statistics.NormConfig areal/api/cli_args.py42-96
GenerationHyperparametersControls text generation behavior (temperature, top_p, max_new_tokens, etc.) for rollout.GenerationHyperparameters areal/api/cli_args.py163-212
Packing AlgorithmAlgorithms like 'ffd' (First Fit Decreasing) or 'kk' (Karmarkar-Karp) used to allocate sequences into micro-batches.MicroBatchSpec.packing_algorithm areal/api/cli_args.py126-138
InteractionCacheSystem for caching and tracking agent interactions, including parent-child relationships and rewards.InteractionCache areal/experimental/openai/client.py56
ArealOpenAIAn OpenAI-compatible client wrapper that integrates with AReaL's training and reward systems.ArealOpenAI areal/experimental/openai/client.py12-61

Sources: areal/api/cli_args.py42-212 areal/api/io_struct.py161-163 areal/engine/fsdp_engine.py85-106 areal/experimental/engine/archon_engine.py147-196 areal/utils/data.py118 areal/experimental/openai/client.py12-61