Skip to content

fix typos in example docs - #3

Merged
zhuzilin merged 1 commit into
THUDM:mainfrom
zkx06111:main
Jun 21, 2025
Merged

fix typos in example docs#3
zhuzilin merged 1 commit into
THUDM:mainfrom
zkx06111:main

Conversation

@zkx06111

Copy link
Copy Markdown
Contributor

script/run-glm4-9B.sh -> scripts/run-glm4-9B.sh.

The same with Qwen.

@zhuzilin
zhuzilin merged commit d2626c4 into THUDM:main Jun 21, 2025
rysaya pushed a commit to rysaya/slime that referenced this pull request Aug 15, 2025
fix typos in example docs
guapisolo pushed a commit to guapisolo/slime_ that referenced this pull request Oct 16, 2025
PopSoda2002 pushed a commit that referenced this pull request Dec 19, 2025
…tory-r1xqo4

Remove FSDP rationale note from Chinese quick start
yueming-yuan pushed a commit to yueming-yuan/slime that referenced this pull request Dec 29, 2025
jamescsq47 pushed a commit to jamescsq47/slime that referenced this pull request Mar 28, 2026
…epository-r1xqo4

Remove FSDP rationale note from Chinese quick start
jingshenghang referenced this pull request in jingshenghang/slime May 24, 2026
Combines SPEC §10.1 PRs #2-#5 into one atomic rewrite because all four touch
the same single file (M1 decision: no sub-module split). Each PR's intent
preserved as a distinct §section banner.

PR #2 - §0 TOC docstring + §2 DATACLASSES (Turn, SubSession, SubSnapshot, Session)
  - Turn loses branch_kind/parent_id/parent_prefix_len/full_ids (0521 legacy)
  - Turn gains tito_masked: bool (U3)
  - SubSession gains num_aborts / last_finish_reason / tito_masked_turn_count
  - SubSnapshot adds finish_reason / num_aborts / tito_masked_turn_count
  - Session: active_subagent (flat) + completed_subagents + _emit_order (I6)
  - Session: num_aborts / num_aborts_this_turn / tito_*_turn_count
  - §3 PRIMITIVES & §4 STORE banners + Store.open_session(record_raw_dump=)

PR #3 - §5 TRANSLATE adds verify_tito_for_turn (D2)
  - pure function: retokenize(decode(output_ids)) == output_ids
  - §6 ENGINE keeps AbortCoordinator + generate_with_abort_resume (P2 verbatim)

PR #4 - §7 SEGMENTS rewrite
  - delete classifier triple: _classify_branch / _new_turn / 2-pass parent
  - delete _COMPACT_RESUME_MARKER text sniff + _SUMMARIZATION_MARKERS
  - delete _SubSession.subagent_stack nested stack -> flat active_subagent
  - new pick_target with nested-dispatch fail-safe (R2 CC3)
  - new classify_and_apply (4-condition is_append + pre_wipe snapshot)
  - new snapshot_subagent + pop_session_split (chronological replay of _emit_order)
  - segment meta key renamed kind -> segment_kind (U3 / R3)
  - U3: per-segment finish_reason + num_aborts + tito_masked_turns

PR #5 - §8 HANDLER 15-step rewrite + §9 SHELL
  - _handle_messages: 380 lines -> ~140 lines, numbered 1-15
  - step 12: I8 (n>0 guard) + I9 (abort skip TITO) + per-turn mask (only [-n:])
  - Session.lock is sole sync primitive (P6); helpers never re-acquire (I3)
  - open_session(record_tree=) renamed to open_session(record_raw_dump=)
  - pop_session() single-segment API removed (list mode always on)
  - _export_raw_dump emits v4 schema (drops full_ids, adds tito_masked/etc)

Tests (SPEC §7.1): 22 cases across 5 files, all passing
  - test_segments_classify.py    - 7 cases (pre_wipe, nested fail-safe, etc.)
  - test_translate_tito.py       - 6 cases incl. test_empty_turn_skip (I8 fix)
                                   and test_abort_skip_tito (I9)
  - test_engine_abort_resume.py  - 3 cases (concatenate / max-attempts / budget)
  - test_session_lock.py         - 2 cases (same-sid serialize, different sid)
  - test_pop_session_split.py    - 4 cases (chronological, drain, U3 fields)
  - fixtures/README.md           - schema doc
jingshenghang referenced this pull request in jingshenghang/slime May 25, 2026
Combines SPEC §10.1 PRs #2-#5 into one atomic rewrite because all four touch
the same single file (M1 decision: no sub-module split). Each PR's intent
preserved as a distinct §section banner.

PR #2 - §0 TOC docstring + §2 DATACLASSES (Turn, SubSession, SubSnapshot, Session)
  - Turn loses branch_kind/parent_id/parent_prefix_len/full_ids (0521 legacy)
  - Turn gains tito_masked: bool (U3)
  - SubSession gains num_aborts / last_finish_reason / tito_masked_turn_count
  - SubSnapshot adds finish_reason / num_aborts / tito_masked_turn_count
  - Session: active_subagent (flat) + completed_subagents + _emit_order (I6)
  - Session: num_aborts / num_aborts_this_turn / tito_*_turn_count
  - §3 PRIMITIVES & §4 STORE banners + Store.open_session(record_raw_dump=)

PR #3 - §5 TRANSLATE adds verify_tito_for_turn (D2)
  - pure function: retokenize(decode(output_ids)) == output_ids
  - §6 ENGINE keeps AbortCoordinator + generate_with_abort_resume (P2 verbatim)

PR #4 - §7 SEGMENTS rewrite
  - delete classifier triple: _classify_branch / _new_turn / 2-pass parent
  - delete _COMPACT_RESUME_MARKER text sniff + _SUMMARIZATION_MARKERS
  - delete _SubSession.subagent_stack nested stack -> flat active_subagent
  - new pick_target with nested-dispatch fail-safe (R2 CC3)
  - new classify_and_apply (4-condition is_append + pre_wipe snapshot)
  - new snapshot_subagent + pop_session_split (chronological replay of _emit_order)
  - segment meta key renamed kind -> segment_kind (U3 / R3)
  - U3: per-segment finish_reason + num_aborts + tito_masked_turns

PR #5 - §8 HANDLER 15-step rewrite + §9 SHELL
  - _handle_messages: 380 lines -> ~140 lines, numbered 1-15
  - step 12: I8 (n>0 guard) + I9 (abort skip TITO) + per-turn mask (only [-n:])
  - Session.lock is sole sync primitive (P6); helpers never re-acquire (I3)
  - open_session(record_tree=) renamed to open_session(record_raw_dump=)
  - pop_session() single-segment API removed (list mode always on)
  - _export_raw_dump emits v4 schema (drops full_ids, adds tito_masked/etc)

Tests (SPEC §7.1): 22 cases across 5 files, all passing
  - test_segments_classify.py    - 7 cases (pre_wipe, nested fail-safe, etc.)
  - test_translate_tito.py       - 6 cases incl. test_empty_turn_skip (I8 fix)
                                   and test_abort_skip_tito (I9)
  - test_engine_abort_resume.py  - 3 cases (concatenate / max-attempts / budget)
  - test_session_lock.py         - 2 cases (same-sid serialize, different sid)
  - test_pop_session_split.py    - 4 cases (chronological, drain, U3 fields)
  - fixtures/README.md           - schema doc
HJSang added a commit to HJSang/slime that referenced this pull request Jun 14, 2026
- #1 add --opsd-offload-teacher-logits to offload full-vocab teacher logits to CPU
  between forwards (moved back to device per micro-batch in the loss); keep the
  on-GPU view by default. Chunked JSD remains future work (THUDM#4, deferred).
- THUDM#2 warn when privileged_info is empty/None (teacher==student context -> ~0 signal).
- THUDM#3 repack teacher micro-batches by teacher lengths on the actor side, keeping the
  student's sample-to-rank assignment so response positions stay aligned
  (repack_micro_batches_by_length in dp_schedule.py; forward-only, per-rank).
- THUDM#5 validate OPSD is not combined with --disable-compute-advantages-and-returns.
- THUDM#6 skip loading the ref model under OPSD (never forwarded).
- THUDM#7 descriptive error when a dataset row lacks the privileged-info field.

Tests: add repack unit tests (coverage, token budget, oversized-sample-alone).
HJSang added a commit to HJSang/slime that referenced this pull request Jun 14, 2026
#1 (critical): vocab-parallel log-softmax normalizer was all-reduced with an
identity backward, under-counting the student-logit gradient by ~1/TP when
tensor-parallel size > 1 (the global normalizer couples all ranks' log-probs, so
its cotangent must be all-reduced). Add _VocabParallelAllReduceSumGradAllReduce
(all-reduce forward AND backward) for the normalizer; keep identity-backward
_VocabParallelAllReduceSum for the final replicated jsd reduction. Add a
distributed (TP=2, gloo) test that shards the vocab and checks the JSD value and
student gradient against the dense single-process reference (would fail under the
old identity backward; a TP=1 test cannot catch it).

THUDM#2 restore the actor as the live model via try/finally around the teacher forward
   so an OOM there can't leave teacher weights live for backup("actor").
THUDM#3 clone the [R, V] teacher response slice instead of keeping a view into the full
   [1, T_padded, V] microbatch buffer (frees the padded buffer; cheap, strictly
   better than the view). --opsd-offload-teacher-logits still offloads to CPU.
THUDM#4 reject --opd-type=self with kl_coef!=0 or --use-kl-loss (OPSD is pure
   distillation; the ref model is intentionally not loaded).
THUDM#5 log when auto-setting --loss-type=opsd instead of overwriting silently.
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.

2 participants