fc47319240
refactor: simplify BaseFactory and separate ModelFactory from AutoModel
ViperEkura2026-07-30 09:29:57 +08:00
22cf798d81
feat: add field and model validators to config classes
ViperEkura2026-07-30 08:40:41 +08:00
164be9708b
refactor: migrate config system to Pydantic dataclasses
ViperEkura2026-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
ViperEkura2026-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
ViperEkura2026-07-30 00:49:04 +08:00
bcaa2d1ae0
fix: FSDP unwrap_model collective op and None guard
ViperEkura2026-07-29 23:37:01 +08:00
8206afefd9
fix: FSDP clip_grad_norm and default reshard_after_forward=False
ViperEkura2026-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
ViperEkura2026-07-29 23:09:37 +08:00
8150ab6c32
feat: add torch.compile CLI option for training
ViperEkura2026-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
ViperEkura2026-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
ViperEkura2026-07-29 12:50:27 +08:00
c2b04d8458
refactor: align generate.py params with engine API
ViperEkura2026-07-29 09:47:53 +08:00
db487ab48b
feat: append EOS to response in IFD evaluation
ViperEkura2026-07-28 22:22:32 +08:00
a95794d3db
perf: use Rust-native DecodeStream for O(n) streaming decode
ViperEkura2026-07-28 14:31:14 +08:00
39f84f3b4c
refactor: move signal_handler from parallel/ to top-level for broader reuse
ViperEkura2026-07-28 10:36:17 +08:00
9f7cf50c56
fix: keep metric logs cumulative instead of segmental in each checkpoint
ViperEkura2026-07-28 09:18:48 +08:00
d9a0c72149
feat: store metric logs inside each checkpoint dir, remove log_dir config
ViperEkura2026-07-28 00:22:29 +08:00
5ab18bec48
fix: correct epoch computation on resume to avoid redoing whole epoch
ViperEkura2026-07-27 23:54:52 +08:00
2e29ed45d3
perf: shrink decode tile to BC=16 for higher occupancy
ViperEkura2026-07-27 22:41:11 +08:00
5ba21f4eb3
refactor: eliminate test duplication via shared helpers
ViperEkura2026-07-27 22:31:04 +08:00
c26a47b0df
docs: sync docs with current code after refactor
ViperEkura2026-07-27 21:43:29 +08:00
b1a87b22bb
feat: add --device flag for GPU-accelerated SVD, default to cuda
ViperEkura2026-07-27 08:49:42 +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__
ViperEkura2026-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
ViperEkura2026-07-20 01:31:40 +08:00
e5f9b1a3a9
fix: default max_grad_norm to 1.0 and drop None branch
ViperEkura2026-07-20 01:08:13 +08:00