Commit Graph

339 Commits (d619d86c4c3d2af799f731feede133e31cb89e7d)

Author SHA1 Message Date
Sebastion d619d86c4c
fix: replace dangerous expression evaluation with AST-validated safe math parser (CWE-95)
Replace unconstrained expression evaluation in calculate_math tool
handlers with safe_eval_math(), which parses into an AST and only
allows literal numbers and basic arithmetic operators. Function calls,
attribute access, and name lookups are rejected, preventing arbitrary
code execution via prompt injection through LLM-generated tool calls.

Affected files:
- scripts/web_demo.py (Streamlit demo)
- scripts/eval_toolcall.py (tool call testing)
- trainer/train_agent.py (agent training)
2026-04-23 19:36:39 +01:00
jingyaogong 693fb1ccf1 [update] readme 2026-04-21 14:34:46 +08:00
jingyaogong 5416a44471 [fix] bugs 2026-04-21 13:03:34 +08:00
jingyaogong 1718e9a44d [fix] transformers-5.x 2026-04-19 23:48:54 +08:00
jingyaogong 5704766352 [update] tie embedding 2026-04-19 21:57:28 +08:00
jingyaogong 1ea113ea2c [update] readme 2026-04-19 14:51:47 +08:00
jingyaogong 487f78754d [update] readme 2026-04-10 10:55:24 +08:00
jingyaogong e796b8028a [fix] lora compile 2026-04-10 00:01:21 +08:00
jingyaogong b2488e6440 [update] readme 2026-04-09 19:00:41 +08:00
jingyaogong 939dc8ff42 [update] readme 2026-04-09 18:54:17 +08:00
jingyaogong cadacabecb [update] bench 2026-04-09 17:12:48 +08:00
jingyaogong 5351424bf0 [fix] lora moe 2026-04-09 16:36:48 +08:00
jingyaogong aa3e6affa1 [update] add a comment 2026-04-09 15:09:58 +08:00
jingyaogong 25a7edcd6f [update] image 2026-04-04 14:54:13 +08:00
jingyaogong cacf1d4cd0 [update] readme 2026-04-04 11:25:21 +08:00
jingyaogong 2ab6455d9d [update] open causal 2026-04-02 15:28:58 +08:00
jingyaogong 9348fde743 [update] readme 2026-04-02 15:28:29 +08:00
jingyaogong 90cd275524 [update] readme 2026-04-01 14:00:21 +08:00
jingyaogong b7e0ae21d6 [update] default model 2026-03-31 13:40:16 +08:00
jingyaogong b1865f75c2 [update] random seed 2026-03-27 21:20:02 +08:00
jingyaogong 6b0b0c5e2f [update] fp16 inference 2026-03-27 16:29:46 +08:00
jingyaogong 88e675dc2c [update] image 2026-03-26 15:35:42 +08:00
jingyaogong b8b3d35257 [update] change default seq_len 2026-03-26 10:09:06 +08:00
jingyaogong 101d7df2da [update] minimind-3 2026-03-25 23:57:45 +08:00
jingyaogong 83e52f6a27
Merge pull request #698 from readlnh/master
[fix] 修复训练脚本中 1-indexed step 与 0-indexed 逻辑混用的问题
2026-03-24 13:41:20 +08:00
readlnh cf4b49a348 [fix] align log/save last-step check and ETA with 1-indexed step 2026-03-24 02:01:40 +01:00
readlnh d25500d363 [fix] gradient accumulation step alignment 2026-03-24 01:45:04 +01:00
jingyaogong 349e74ec7b [update] empty_think_ratio 2026-02-06 19:15:21 +08:00
jingyaogong 288e1ac02a [update] empty_think_ratio 2026-02-06 01:36:02 +08:00
jingyaogong ccc190da05 [feat] data process 2026-02-06 01:17:57 +08:00
jingyaogong 11a44340ba [update] save interval 2026-01-30 20:30:50 +08:00
jingyaogong 04616c41a5 [update] safe half 2026-01-30 20:29:31 +08:00
jingyaogong fea69cf338 [fix] data skip 2026-01-18 16:56:29 +08:00
jingyaogong f7ffdf1fdb [update] shuffle data 2026-01-18 16:39:34 +08:00
jingyaogong 3a5aba82db [fix] max length 2026-01-17 13:26:14 +08:00
jingyaogong 714abcf802 [update] pretrain load 2026-01-17 12:00:17 +08:00
jingyaogong aa539a824a [update] align mask 2026-01-15 11:20:41 +08:00
jingyaogong c090b69c4d [update] align loss 2026-01-15 00:56:32 +08:00
jingyaogong e119db8478 [fix] compile unpack 2026-01-14 20:13:32 +08:00
jingyaogong 81d24a4f16 [feat] add compile 2026-01-14 14:42:30 +08:00
jingyaogong 1279a61681 [update] prompt prefill 2026-01-13 17:46:54 +08:00
jingyaogong 05d0b216f6 [update] show speed 2026-01-07 23:33:47 +08:00
jingyaogong df89069362 [update] params log 2026-01-07 23:08:45 +08:00
jingyaogong f55d4c32a0 [update] mask log 2026-01-07 22:12:26 +08:00
jingyaogong 20a43d7db0 [update] readme 2026-01-07 00:58:38 +08:00
jingyaogong 7641985d14 [update] simplify loader 2026-01-06 01:20:52 +08:00
jingyaogong 0b4a8ad4aa [update] readme 2026-01-06 01:18:10 +08:00
jingyaogong 07364c3fbe [update] rename train tokenizer 2026-01-06 01:17:33 +08:00
jingyaogong 9830915d87 [update] readme 2026-01-05 23:15:25 +08:00
jingyaogong 4e73f34823 [update] rename reason 2026-01-05 23:12:29 +08:00