Skip to content

Support challenger training and support continous sampling - #280

Merged
tastelikefeet merged 76 commits into
mainfrom
feat/challenger
Sep 12, 2026
Merged

Support challenger training and support continous sampling#280
tastelikefeet merged 76 commits into
mainfrom
feat/challenger

Conversation

@tastelikefeet

@tastelikefeet tastelikefeet commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

PR type

  • Bug Fix
  • New Feature
  • Document Updates
  • More Models or Datasets Support

PR information

Features

  • Challenger: new agentic challenger module that generates and curates training tasks for recursive self-improvement (challenger/{base,agentic,recorder}).
  • Agents: pluggable agent abstraction with an ms-agent backend (agents/{base,ms_agent}).
  • Harness: agentic rollout harness with ms-agent 1.6.0 compatibility and lease-based concurrency control (harness/*).
  • Verifier: result-check and rubric-based scoring verifiers (verifier/{result_check,rubric_score}).
  • Summarizer: unified trajectory summarizer replacing the legacy condenser/chunker context-compression stack (removes condenser/, chunker/, data_format/chunks).
  • Rollout: external/API rollout endpoints with trace and ledger recording (rollout/{endpoint,external,ledger,trace}; removes api_multi_turn/bridge/multi_turn_condense).
  • Envs: local environment plus snapshot/restore support (envs/{localenv,snapshot}).
  • Utils: shared token/message/text/code utilities and an LLM backup fallback (utils/*).
  • Loss: add OPSD loss and make BNPO/SEAMBNPO token-mean micro/dp-split invariant (loss/opsd).
  • Template: bracket-DSL tool-call parser and expanded tool-call parsers (template/tools/bracket_dsl).
  • Preprocessor: language filter plus quality/refuse filters (removes score_filter/llm_backend).
  • Sampler: API-sampler protocol replacing the old router sampler (protocol/api_sampler).
  • Weight sync: symmetric LoRA base-model sync across Megatron and Transformers backends (.base_layer. suffix + fused in_proj_qkvz mapping).
  • Patch: GDN padding-free patch updated for transformers 5.16.x module-level kernels; enable flash_attention_2 for padding-free training.

Experiment results

Paste your experiment result here(if needed).

tastelikefeet and others added 30 commits July 4, 2026 17:09
- config.py: E13 executor_thinking='off' to match the SEAM paper run
- run_ablate12.sh: dedicated E13 block (min_level=0 full pool, chunk=128,
  reward-trunc-penalty=0, eval R=1/T=0) reproducing the SEAM run config
- include the code-task/reflexion pipeline modules E13 imports at load time
  (main/trainer top-level import code_task/data_code/eval_reflexion)
…form)

- train_skill_v2.py: SKILL_GEN_FREEFORM/REGEN_FREEFORM_SYSTEM (a 'menu' prompt
  letting the skill model choose whatever form helps this problem — analysis,
  concept, pitfall, tiny example, blunt directive, even 'let's think step by
  step'), wired into style dispatch + --skill-style choices; the freeform prompt
  carries <skills></skills> wrapper examples so open-form outputs stay parseable
- config.py: E21 = bnpo/view-B/freeform (thinking on; see comment for why not off),
  STYLES + RUN_ORDER updated, self-check passes
- trainer.py: freeform shares narrative's 1100-char len budget
The BNPO family returned an already-normalized per-group token-mean with
num_tokens=0, so the framework's PER-TOKEN-MEAN path equal-weighted micro/dp
groups -> a double average (group token-mean, then equal weight over groups)
that sits between token-mean and sequence-mean and biases toward short
responses (degrades to pure sequence-mean as groups multiply). This diverged
from verl/SEAM's true token-mean and was non-orthogonal to skill-length study.

- grpo.py: BNPOLoss gains token_mean_scope='global'(default)|'micro'. 'global'
  returns the token SUM and reports num_tokens=sum(mask), routing into the
  framework SUM-loss path -> exact global token-mean, invariant to how the batch
  is split. 'micro' preserves the old behavior to reproduce E1-E20. Added a
  _loss_num_tokens hook (default 0) so GRPO/DRGRPO/OPSD are untouched. No public
  interface change; downstream grad + metric already branch on num_tokens.
- tests/loss/test_bnpo_token_mean.py: assert global is split-invariant (==true
  token-mean), micro reproduces the biased double-average, SEAM inherits global.
- run_ablate12.sh: E13(140G)/E21(80G) OOM'd in train forward at micro=8; set
  per-arm train_micro_batch defaults (E13=2xdp, E21=1xdp). The global token-mean
  fix makes shrinking micro mathematically equivalent, so effective batch and
  comparability are unchanged.
E13/E21 blocks referenced $TRAIN_MICRO_BATCH directly; under set -u an unset
env aborts with 'unbound variable'. Use ${TRAIN_MICRO_BATCH:-}.
tastelikefeet and others added 10 commits September 1, 2026 00:43
…kers

- sanitize sys.argv around LLMAgent construction: ms-agent's
  Config.parse_args() mis-parses a foreign argv in forked/Ray workers
  (assert crash on value tokens; silent flag mispairing otherwise)
- tolerate ms-agent >= 1.6.0 API changes: prepare_skills ->
  _ensure_auto_skills(), dropped ms_agent.hooks and
  _append_task_notifications, defensive ToolResult field forwarding
@tastelikefeet tastelikefeet changed the title Support challenger training and support continous sampling [WIP]Support challenger training and support continous sampling Sep 9, 2026
@tastelikefeet tastelikefeet changed the title [WIP]Support challenger training and support continous sampling Support challenger training and support continous sampling Sep 11, 2026
@tastelikefeet
tastelikefeet merged commit c839a4e into main Sep 12, 2026
3 of 4 checks passed
@tastelikefeet
tastelikefeet deleted the feat/challenger branch September 12, 2026 04:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant