You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Store composition: Store base + Streamable/Recordable mixins replace diamond inheritance. Removed RecordDataset, get_index, and all window/stride logic from Dataset layer
Store owns indexing: __getitem__/__len__/sample_window/token_count/num_samples live on Store. Dataset is a pure delegator binding Store to train-type key mapping
DatasetFactory._store_window_for**: record datasets (DPO/GRPO) force window_size=0 to prevent stream semantics
JsonlStore lazy mode: processor=fn keeps raw JSON records, defers tokenization to fetch_record — DPO/GRPO trains directly from .jsonl without pre-tokenization
TokenizeTransform: bridges raw JSON→tensors with shared preprocessing core (tokenizer + mask-builder + position-ids)
Preprocessing core.py: ~60% of Pipeline logic shared with TokenizeTransform via build_preprocessing_components, iter_raw_records, primary_ids, to_per_record_tensors
MmapStore: multi-shard support with per-record _offsets; docstring conforms to read-only memmap (mode="r")
segments_are_records class attribute differentiates H5/JSONL (per-record) from bin (opaque shards)
Training
MuonMix optimizer: Muon for 2D weight matrices, AdamW for 1D (bias/norm/embed/head). Inherits from torch.optim.Optimizer for proper scheduler interop. param_groups merged from both sub-optimizers
DPO: reduction="sum" (was mean); ref_model injected externally instead of created from model_fn; applies chat template during tokenization
GRPO: separates old policy (behaviour, synced externally) from ref model (frozen SFT checkpoint, KL term only). Token-level logprobs with prompt masking. Group-normalized advantages with unbiased std. No more sync_interval
Optional max_grad_norm: None disables clipping, logs raw grad norm instead
Distributed checkpoint: Executor.checkpoint_context() for coordinated multi-GPU save/load with rank0_only full state dict
Preprocessing
MultiOutputMaskBuilder: process_list_field returns per-element boundaries (list of lists) critical for GRPO [G, R] tensor construction. Adds "value" action section type for scalar rewards
bfd_split packing: plan_bfd exported as pure function; Best-Fit Decreasing on truncated sequence lengths with index-based bin plan so callbacks can apply same plan to aligned keys
Raw .json file support (not just JSONL) in Pipeline
StageBuilder: factored from Pipeline for reusable preprocessing stages
Inference
Frequency penalty: linear per-occurrence penalty scaled by penalty × count(token). rep_window limits history to sliding window. Wired through Task, Executor, sample() pipeline
write_positions: per-row positional write for ContiguousCacheView — fixes mixed-position decode in continuous batching (each task writes K/V at its own position)
StreamDecoder: buffers incomplete multi-byte tokens, emits text only after character is complete. Eliminates U+FFFD replacement characters in streaming output. decode_new_token() / flush_remaining() on Task
Merged decode batch: removed per-position group batching (pos_groups). All decode tasks run in a single execute_decode call — simpler, higher throughput
Greedy decode: temperature=0 short-circuits to logits.argmax(dim=-1) in SamplingPipeline.sample() and module-level sample(). GenerationRequest validates temperature >= 0
Split extension into loader.py (.so discovery) + ops.py (wrapper + fallback with layout/mask/scale helpers)
Removed ineffective __launch_bounds__ from prefill kernel
Fixes
np.memmap opened mode="r" — prevents accidental data corruption from writes to disk-backed memory
Tool parser: _parse_tool_call_json uses json.loads instead of greedy regex with broken brace-stripping. Correctly handles nested object arguments, field-order-independent (no longer requires {"name": as first field)
Tokenizer __getattr__: guard for private attrs prevents infinite recursion during unpickle (spawn multiprocessing fix)
Resume: optimizer LR curve restores correctly; step display and consumed_samples alignment across checkpoint boundaries
DPO: chat template applied in tokenization; sequence logprob uses sum (not mean) reduction
GRPO: token-level ratio instead of sequence-level; prompt masking for correct response-only loss; unbiased std for group advantage normalization
Auto-assign free port in spawn_parallel_fn to avoid EADDRINUSE
System prompt handling made optional across scripts
Prefill mask index order corrected (batch×q_len×kv_len → batch×kv_len)
Support single .h5 file in load_h5
tqdm postfix set before first update so step 1 shows live metrics
MMLU: option permutation to handle answer position bias
IFEval: switched from raw URL download to HuggingFace datasets library