Commit Graph

  • df979b4469 refactor: use single-index access and update docs for cache architecture ViperEkura 2026-07-30 17:47:04 +08:00
  • deb2d7e127 refactor: rebuild KV cache with three-layer separation architecture ViperEkura 2026-07-30 17:18:07 +08:00
  • fc47319240 refactor: simplify BaseFactory and separate ModelFactory from AutoModel ViperEkura 2026-07-30 09:29:57 +08:00
  • 22cf798d81 feat: add field and model validators to config classes ViperEkura 2026-07-30 08:40:41 +08:00
  • 164be9708b refactor: migrate config system to Pydantic dataclasses ViperEkura 2026-07-30 08:21:17 +08:00
  • 6a97524db4 refactor: inline parallel utils into executor module - Move create_ref_model from astrai/parallel/utils.py into executor.py - Remove unused ColumnParallelLinear/RowParallelLinear (module.py) - Update imports in strategy.py and train_context.py - Drop unused astrai.parallel.utils and astrai.parallel.module ViperEkura 2026-07-30 07:54:54 +08:00
  • c8b1e40f71 docs: restructure to docs/, add guides and developer docs - Rename assets/ to docs/, split into guides/ and developer/ - Add get-started.md: installation + 5-step quickstart - Add guides/evaluation.md: 7 eval scripts with CLI args - Add guides/distributed.md: DDP/FSDP, gradient accumulation, NCCL - Add developer/internals.md: loss formulas, RoPE, KV cache math - Add developer/cuda_kernels.md: build system, benchmarks, file layout - Fix storage_format doc in preprocessing.md - Update cross-references in README.md, README-zh-CN.md, Dockerfile ViperEkura 2026-07-30 00:49:04 +08:00
  • bcaa2d1ae0 fix: FSDP unwrap_model collective op and None guard ViperEkura 2026-07-29 23:37:01 +08:00
  • 8206afefd9 fix: FSDP clip_grad_norm and default reshard_after_forward=False ViperEkura 2026-07-29 23:21:27 +08:00
  • 646b1b0f46 refactor: replace FSDP with FSDP2 as default parallel backend - Remove FSDPExecutor (FullyShardedDataParallel wrapper) - Rename FSDP2Executor to FSDPExecutor, register as 'fsdp' - Remove 'fsdp2' from CLI choices, make 'fsdp' the default parallel_mode - Pass after_wrap to executor.prepare for compile-after-wrap ordering - Update architecture.md, params.md, AGENTS.md references - FSDP2 uses per-module fully_shard: no FlatParameter, better compile compat ViperEkura 2026-07-29 23:09:37 +08:00
  • 8150ab6c32 feat: add torch.compile CLI option for training ViperEkura 2026-07-29 22:06:51 +08:00
  • 0b0693a0a2 fix: make ChatTemplate picklable for spawn multiprocessing - Add __getstate__/__setstate__ to drop cached _compiled Jinja2 template - Jinja2 Template.root_render_func is a dynamic closure unpicklable by reference - cached_property rebuilds the template lazily on first render after unpickle ViperEkura 2026-07-29 13:18:11 +08:00
  • 115192c67c refactor: remove H5 storage backend in favor of mmap bin - Remove H5Store, H5Writer, save_h5/load_h5 and h5py dependency - MmapStore (bin) is the sole pre-tokenized storage backend - Move setup_logging after imports to fix E402 in __init__.py - Clean up unused imports across test files - Move inline test imports to file top ViperEkura 2026-07-29 12:50:27 +08:00
  • c2b04d8458 refactor: align generate.py params with engine API ViperEkura 2026-07-29 09:47:53 +08:00
  • db487ab48b feat: append EOS to response in IFD evaluation ViperEkura 2026-07-28 22:22:32 +08:00
  • a95794d3db perf: use Rust-native DecodeStream for O(n) streaming decode ViperEkura 2026-07-28 14:31:14 +08:00
  • 39f84f3b4c refactor: move signal_handler from parallel/ to top-level for broader reuse ViperEkura 2026-07-28 10:36:17 +08:00
  • 9f7cf50c56 fix: keep metric logs cumulative instead of segmental in each checkpoint ViperEkura 2026-07-28 09:18:48 +08:00
  • d9a0c72149 feat: store metric logs inside each checkpoint dir, remove log_dir config ViperEkura 2026-07-28 00:22:29 +08:00
  • 5ab18bec48 fix: correct epoch computation on resume to avoid redoing whole epoch ViperEkura 2026-07-27 23:54:52 +08:00
  • 2e29ed45d3 perf: shrink decode tile to BC=16 for higher occupancy ViperEkura 2026-07-27 22:41:11 +08:00
  • 5ba21f4eb3 refactor: eliminate test duplication via shared helpers ViperEkura 2026-07-27 22:31:04 +08:00
  • c26a47b0df docs: sync docs with current code after refactor ViperEkura 2026-07-27 21:43:29 +08:00
  • b1a87b22bb feat: add --device flag for GPU-accelerated SVD, default to cuda ViperEkura 2026-07-27 08:49:42 +08:00
  • 07625057f2 feat : add setup_logging with hierarchical astrai logger ViperEkura 2026-07-27 08:13:48 +08:00
  • 53c804e233 refactor : merge max_prompt_len into max_seq_len, replace assert with raise ViperEkura 2026-07-27 08:03:11 +08:00
  • 05c7432964 chore: remove AGENTS.md ViperEkura 2026-07-27 07:21:40 +08:00
  • 4de42d83c2 refactor: migrate scripts from argparse to click, add YAML config support ViperEkura 2026-07-27 06:34:14 +08:00
  • b99485f462 chore: bump version to 1.3.11 v1.3.11 ViperEkura 2026-07-27 01:23:13 +08:00
  • 20041d7aa9 perf: extend MMA decode to arbitrary GQA ratio, add launch bounds, vectorize combine ViperEkura 2026-07-27 00:35:34 +08:00
  • 59248032dc chore: fix ruff lint warnings and signal handling edge cases ViperEkura 2026-07-25 20:47:38 +08:00
  • ceadc34ea9 feat: auto-checkpoint on SIGTERM/SIGINT with DDP support ViperEkura 2026-07-25 19:55:54 +08:00
  • 8ab5631446 fix: correct online rollout lifecycle ViperEkura 2026-07-23 19:01:37 +08:00
  • 99b5d2b2da perf: batch tokenizer preprocessing ViperEkura 2026-07-23 18:42:19 +08:00
  • 021e6f3788 style: apply ruff formatting to FSDP2 changes ViperEkura 2026-07-23 16:30:10 +08:00
  • 4e38183e86 fix: make FSDP2 executor work with ABC+Generic model hierarchy ViperEkura 2026-07-23 16:11:02 +08:00
  • 4eeb23e2b3 fix: use copy-on-write mmap mode to silence non-writable tensor warning ViperEkura 2026-07-22 17:37:41 +08:00
  • ef8783b7e3 fix: separate attn_mask and loss_mask in get_logprobs, compose causal masking in strategy ViperEkura 2026-07-21 23:47:28 +08:00
  • 60d7ee614a fix: improve attention kernel numerical stability and test precision checks ViperEkura 2026-07-21 23:05:17 +08:00
  • f7a16efc9d refactor: extract shared dispatcher header, unify MMA/scalar dispatch format ViperEkura 2026-07-21 22:21:39 +08:00
  • a01e8bbe98 refactor: adopt FA2-style KernelTraits + compile-time causal/mask dispatch ViperEkura 2026-07-21 21:52:46 +08:00
  • ccf728a1b7 perf: eliminate GPU syncs in contiguous cache write/gather hot paths ViperEkura 2026-07-21 16:36:25 +08:00
  • f1b4b05d08 feat: add attention dimension dispatch ViperEkura 2026-07-21 12:52:45 +08:00
  • 0c86c89af4 refactor : align config field names with Hugging Face ViperEkura 2026-07-20 22:05:31 +08:00
  • d7ac66fb73 refactor: simplify attention mask handling ViperEkura 2026-07-20 20:31:32 +08:00
  • a6e920fdb0 Merge pull request #20 from ccx1324/lora-device-fix ViperEkura 2026-07-20 19:38:10 +08:00
  • 958df58f9d refactor: unify tokenizer encode and apply_chat_template for batch support ViperEkura 2026-07-20 17:49:26 +08:00
  • e0f102c4d9 feat: support SFT directly from JSONL without dataset_config.json ViperEkura 2026-07-20 17:24:48 +08:00
  • 5a942527b2 fix: inject LoRA before loading checkpoint state_dict ccx1324andccx 2026-07-20 17:00:24 +08:00
  • 37a3036934 refactor: split LoRA param init into local vars ViperEkura 2026-07-20 16:23:47 +08:00
  • 121a7bf8b4 Merge pull request #19 from ccx1324/lora-device-fix ViperEkura 2026-07-20 16:14:30 +08:00
  • a5678c9185 fix: create LoRA parameters on base weight device instead of CPU ccx1324andClaude Opus 4.7 2026-07-20 16:11:48 +08:00
  • 2c50b3cf37 ci: preserve both release wheel artifacts ViperEkura 2026-07-20 15:33:43 +08:00
  • eee7f54789 docs: sync training and architecture guides ViperEkura 2026-07-20 15:23:30 +08:00
  • 06eeeead79 refactor: map instruction/input/output to chat roles ViperEkura 2026-07-20 13:55:17 +08:00
  • e8ff7f5321 fix: use batch_per_device for rollout scheduler batch sizing ViperEkura 2026-07-20 13:32:04 +08:00
  • a6e1f26cd4 refactor: simplify sample return_logprobs path ViperEkura 2026-07-20 13:16:18 +08:00
  • 95c43368ae refactor: unify rollout onto inference engine KV-cache path ViperEkura 2026-07-20 12:52:20 +08:00
  • 754624acf0 feat: add online rollout framework for RL strategies ViperEkura 2026-07-20 03:49:25 +08:00
  • 0b6a17330f feat: add FSDP2Executor using torch.distributed.fsdp.fully_shard API - New FSDP2Executor registers as 'fsdp2' in ExecutorFactory, using per-module fully_shard() instead of FSDP1 FlatParameter wrapper - FSDP2 preserves original Parameter objects as DTensors, eliminating use_orig_params=True hack - FSDP2Executor implements _no_sync via set_requires_gradient_sync, clip_grad_norm via unshard, unwrap_model via DTensor.full_tensor - Drop **_extra/**_ddp_only_kwargs fallbacks in BaseExecutor/FSDPExecutor/FSDP2Executor, replaced by parallel_mode-aware executor_kwargs dispatch in train.py (ddp-only kwargs only passed when parallel_mode=ddp) - Export FSDP2Executor in astrai.parallel.__init__ ViperEkura 2026-07-20 01:46:25 +08:00
  • 74b9308883 refactor: pass model_fn/optimizer_fn to executor.prepare - BaseExecutor.prepare now takes factories and instantiates model via model_fn(), runs before_wrap hook, wraps DDP/FSDP, then builds optimizer/scheduler on the wrapped model - optimizer/scheduler creation moved into executor.prepare, eliminating the old 'create-then-wrap' hack reliance on use_orig_params=True - FSDPExecutor/BaseExecutor accept **_extra kwargs to tolerate DDP-only keys (broadcast_buffers, gradient_as_bucket_view) being forwarded via executor_kwargs - dataloader builds stay external; executor only handles model/optimizer/scheduler - train_context.py rewritten to load checkpoint state_dict before prepare via a before_wrap closure ViperEkura 2026-07-20 01:31:40 +08:00
  • e5f9b1a3a9 fix: default max_grad_norm to 1.0 and drop None branch ViperEkura 2026-07-20 01:08:13 +08:00
  • 31d33ccdf0 chore: bump to 1.3.10 v1.3.10 ViperEkura 2026-07-19 16:40:27 +08:00
  • 88ec786e39 fix: memmap mode=r, tool parser json.loads, greedy decode ViperEkura 2026-07-19 16:38:28 +08:00
  • 663ef900fc refactor: move sample-id indexing from dataset to store ViperEkura 2026-07-19 16:02:50 +08:00
  • 7d478a54db docs: update HF org from ViperEk to ViperEkura ViperEkura 2026-07-19 14:49:58 +08:00
  • f3eaaef842 refactor: remove redundant strategy/executor code ViperEkura 2026-07-19 12:44:29 +08:00
  • d655b65027 docs: sync architecture/dataflow/training/params with code ViperEkura 2026-07-19 12:32:59 +08:00
  • 31c22dc043 refactor: deduplicate preprocessing kernel and BFD packing ViperEkura 2026-07-19 12:24:57 +08:00
  • 17127f8b3c fix: make tokenizer picklable for spawn multiprocessing ViperEkura 2026-07-19 11:59:32 +08:00
  • d7695b40e3 feat: make max_grad_norm optional (None disables clipping) ViperEkura 2026-07-19 00:08:18 +08:00
  • fc62890e70 fix: apply chat template in DPO tokenization ViperEkura 2026-07-19 00:00:51 +08:00
  • f433672140 fix: use sum reduction for DPO sequence logprob ViperEkura 2026-07-18 23:48:08 +08:00
  • 7e1e5b6e6a refactor: DatasetFactory.load accepts pre-built store instance ViperEkura 2026-07-18 23:23:51 +08:00
  • 553a42702d refactor: replace diamond inheritance with mixin composition ViperEkura 2026-07-18 23:20:41 +08:00
  • b133fc9c07 refactor: split Store into StreamStore and RecordStore ViperEkura 2026-07-18 23:04:31 +08:00
  • b33250dc28 refactor: decouple tokenizer from Store into Transform layer ViperEkura 2026-07-18 21:29:07 +08:00
  • a74e5b91a3 feat: add record-mode to Store for DPO/GRPO ViperEkura 2026-07-18 20:59:41 +08:00
  • 28886e4241 fix: make system prompt optional across scripts ViperEkura 2026-07-18 14:10:37 +08:00
  • 9d3ccfdffc fix: incremental decode to avoid U+FFFD in streaming ViperEkura 2026-07-18 13:05:36 +08:00
  • a24a7b4da5 perf: merge decode batch for 10x throughput ViperEkura 2026-07-18 08:50:46 +08:00
  • f7df02f9a3 feat: add --num_samples to batch generation script ViperEkura 2026-07-18 01:13:38 +08:00
  • ee450686f3 fix: add option permutation to MMLU eval ViperEkura 2026-07-18 00:14:34 +08:00
  • 2565755e45 refactor: switch eval datasets to HuggingFace source ViperEkura 2026-07-18 00:07:01 +08:00
  • d08a92c7bd feat: add frequency penalty to inference sampling pipeline ViperEkura 2026-07-17 20:43:32 +08:00
  • a1ea26d367 fix: rewrite GRPO data pipeline for offline record-level access ViperEkura 2026-07-17 14:34:41 +08:00
  • c17aa0dc54 fix: eval script bugs and add missing features ViperEkura 2026-07-17 14:02:58 +08:00
  • b12b24eadc feat: rewrite evaluate_ppl with token-level loss and multi-file support ViperEkura 2026-07-17 13:14:15 +08:00
  • cd14d53707 feat: implement bfd_split packing strategy ViperEkura 2026-07-17 12:38:56 +08:00
  • e220413035 feat: support raw JSON files in dataset pipeline and JsonlStore ViperEkura 2026-07-17 12:15:22 +08:00
  • 84ed2327f5 feat: add --resume flag to decouple weight loading from training resumption ViperEkura 2026-07-16 14:23:23 +08:00
  • b14f301730 fix: init last_ckpt_step and last_log_flush_step from context.optimizer_step ViperEkura 2026-07-15 22:15:55 +08:00
  • 0654b4b916 refactor: template combine kernel, fix mask bug, unify dispatch ViperEkura 2026-07-15 21:43:29 +08:00
  • 1f0be382ad refactor: extract load_q_mma_frags template, unify comment style ViperEkura 2026-07-15 19:06:32 +08:00
  • bb175fda91 fix: resume optimizer LR, step display, and consumed_samples alignment ViperEkura 2026-07-15 08:52:15 +08:00
  • 13998da15a fix: uninitialized strides in decode test and wrong stride helper in paged test ViperEkura 2026-07-14 23:58:13 +08:00
  • 57729fd92d refactor: stride-based attn interface with layout and causal mask ViperEkura 2026-07-14 21:30:55 +08:00
  • 2c7a71a9c0 refactor: separate old policy and ref model in GRPO strategy ViperEkura 2026-07-14 20:00:54 +08:00
  • 3e0007fc91 docs : fix factory lists and MaskBuilderFactory docs ViperEkura 2026-07-13 15:18:06 +08:00
  • b092316385 feat : add distributed checkpoint via executor checkpoint_context ViperEkura 2026-07-13 12:27:09 +08:00