Alphonso Labs / halo-offline-grpo-kit

Offline GRPO group viewer

Static page for the group-mean formula, the White Circle /api/events request shape, and the two starter YAML files. Nothing on this page is a training run.

Group-relative advantages

Same arithmetic as group_relative_advantages in src/halo_grpo/offline_grpo.py. Group size is 8. Omitted KL is a vector of zeros. The flat guard uses 1e-12. This is the group mean, not Halo's quantile normalizer.

adjusted_i = reward_i - kl_coef * kl_i
mean       = sum(adjusted) / 8
flat       = every |adjusted_i - mean| <= 1e-12
advantage  = 0                  if flat
advantage  = adjusted_i - mean  otherwise

Shipped YAML value is 0.04. That constant is not a measured KL.

Guard: zero_variance = false

irewardkladjustedadvantage

White Circle /api/events chunker

Schema only. MAX_EVENTS_PER_REQUEST is 50. API_VERSION is 2026-06-01. One external_session_id is reused for every chunk of a completion. Live mode sends the bearer token as a constructor argument. This form does not send it and does not POST.


      

Policy events are assistant text and tool-call arguments at or after the prompt. Tool outputs are sent and are not policy events. view is final or full. digest is refused. An empty completion scores 0 in the client. That rule is not exercised with a fake score here.

Starter configs

Values are copied from the YAML files. Neither file stores a VRAM size or a measured loss. save_strategy is "no". environment_id is the placeholder your_environment_id.

configs/qwen3_4b_single_gpu_grpo.yaml

RTX PRO 6000, Blackwell compute capability 12.x. The file sets device_class: rtx_pro_6000 and attn_implementation: flash_attention_2. FA4 is not selected. The schema still accepts sdpa on this device class if the FA2 wheel will not load.

Model
Qwen/Qwen3-4B-Instruct-2507
Attention
flash_attention_2
LoRA
r 16, alpha 32, dropout 0.05
Targets
q, k, v, o, gate, up, down projections
Batch
1, gradient accumulation 8, 8 generations
Lengths
prompt 2560, completion 4096
Steps
max_steps 10, lr 5.0e-6, constant
KL weight
0.04
Rewards
security and quality, both view full, region us, policy id placeholders

configs/qwen3_8b_rocm_sdpa.yaml

ROCm starter. The file sets device_class: rocm and attn_implementation: sdpa. The string MI300X is not in the YAML. This card is the file you would point at an MI300X-class board. flash_attention_2 fails validation on rocm. The file does not boot the NVIDIA Halo image.

Model
Qwen/Qwen3-8B
Attention
sdpa
LoRA
r 16, alpha 32, dropout 0.05
Targets
q, k, v, o, gate, up, down projections
Batch
1, gradient accumulation 8, 8 generations
Lengths
prompt 2048, completion 2048
Steps
max_steps 10, lr 5.0e-6, constant
KL weight
0.04
Rewards
security view full with a policy placeholder; quality view final with a checklist placeholder