ViperEkura
53c804e233
refactor : merge max_prompt_len into max_seq_len, replace assert with raise
...
- Engine/Scheduler/TaskManager: merge max_prompt_len into max_seq_len
- train.py: replace bare assert with ValueError/FileNotFoundError
- server.py: add --max_seq_len CLI option
- engine.py: remove dead page_size param
2026-07-27 08:05:11 +08:00
ViperEkura
4de42d83c2
refactor: migrate scripts from argparse to click, add YAML config support
...
- Replace argparse with click in all scripts (train, server, generate,
preprocess, benchmark)
- Add --config YAML support to train.py with CLI flag override
- Add --dry-run mode to validate config before training
- Add type annotations throughout benchmark.py
- Unify docstring format across all commands
- Remove redundant deps httpx, requests, pyyaml, rich from pyproject.toml
- Net -346 lines while adding YAML config support
2026-07-27 06:55:46 +08:00
ViperEkura
2d5dc93b3d
fix : 修正类型标注与统一 CLI 参数命名
...
- AutoRegressiveLM.forward 返回类型标注 -> Dict[str, Tensor]
- EmbeddingEncoder 移除冗余 position_ids 自动创建
- CLI 脚本模型目录参数统一为 --param_path
2026-05-27 20:49:44 +08:00
ViperEkura
2196c34c52
refactor: 重构 inference 模块架构,引入设计模式并分组文件
...
- 新增 protocol.py 协议层,Template Method 模式消除流/非流分支 45% 重复
- SSEBuilder 统一 SSE 构造,StopChecker 独立 stop_sequence 检测
- AnthropicHandler 追踪已产出文本,修复 stop 时重复 delta
- server.py 路由从约 100 行缩减至 3 行
- 拆分为 core/(cache/executor/scheduler/task)和 api/(protocol/server)
- 外部保持二级导入路径(from astrai.inference import Name)
- 删除所有分隔线注释,代码按语义自然分组
2026-05-14 17:42:37 +08:00
ViperEkura
9b22b1651e
refactor: 优化工具脚本接口并修复批处理问题
2026-04-05 21:56:22 +08:00
ViperEkura
70d52935f0
fix: 修复参数问题
2026-04-03 23:34:21 +08:00
ViperEkura
0852b852f8
refactor: 优化参数传递,清理导入样式
2026-04-03 22:06:32 +08:00
ViperEkura
475de51c7d
feat: 增加server, 并且修改测试单元
2026-04-02 15:05:07 +08:00