{"full_name":"baidu-baige/LoongSage","owner":"baidu-baige","name":"LoongSage","shard":"1","url":"https://github.com/baidu-baige/LoongSage","description":"A production-grade, high-efficiency Agentic RL framework for frontier LLMs with validated recipes.","homepage":"http://docs.loongsage.org/","topics":[],"tag_pages":[],"language":"Python","license":"Apache-2.0","avatar":"https://avatars.githubusercontent.com/u/251454410?v=4","created_at":"2026-08-28T07:22:30Z","pushed_at":"2026-11-27T16:37:40Z","metrics":{"stars":1000,"forks":22,"watchers":4,"issues":16,"prs":76,"releases":2,"issues_open":9,"issues_closed":7,"prs_open":13,"prs_closed":12,"prs_merged":51,"discussions":0},"growth":{},"history":{"dates":["2026-11-28"],"stars":[1000],"forks":[22],"watchers":[4],"issues_open":[9],"prs_open":[13]},"boards":{},"same_owner":[],"issues":[{"number":83,"title":"fix(mini-swe): report agent and R2E reward metrics via metric/ metadata keys","comments":0,"created_at":"2026-11-25T11:33:01Z"},{"number":73,"title":"[Feature] Score centering (SC) as an algorithm-level correction for train-inference inconsistency","comments":0,"created_at":"2026-11-19T03:10:15Z"},{"number":50,"title":"[Proposal] Run agent attempts in worker processes: the driver GIL caps rollout throughput","comments":0,"created_at":"2026-11-11T13:09:02Z"},{"number":35,"title":"Tree training: compute shared prefixes of a trajectory's rows once","comments":0,"created_at":"2026-11-06T11:42:58Z"},{"number":25,"title":"LoongSage WeChat Group (微信群)","comments":0,"created_at":"2026-11-02T08:39:44Z"},{"number":9,"title":"[Proposal] REA-Gym: A Verifiable RL Environment for Reverse-Engineering Anything","comments":0,"created_at":"2026-10-11T05:23:47Z"},{"number":7,"title":"[Feature] Multi-data-source and multi-agent support in fully asynchronous mode","comments":0,"created_at":"2026-10-10T09:45:16Z"},{"number":6,"title":"[Feature] Support training-inference 0-diff on MoE layer","comments":0,"created_at":"2026-10-10T09:07:55Z"}],"discussions":[],"latest_release":{"name":"v0.2.1","tag":"v0.2.1","published_at":"2026-11-24T22:19:50Z","body":"## Highlights\r\n\r\n* **DeepSeek-V4.1 vision**: GRPO training of DeepSeek-V4.1 with image inputs, with geo3k (single image) and MMRB (multi-image) recipes.\r\n* **ERNIE 5.5**: GRPO training of ERNIE-5.5-Flash-Base, with DAPO-math and GSM8K recipes.\r\n* **Group reward**: score all trajectories of a prompt together with RewardFunction.group_rm.\r\n* **Countdown example**: agent, reward and data pre-processor, with a single-GPU Qwen3-0.6B recipe.\r\n\r\n## What's New\r\n\r\n### Models & Training\r\n\r\n* **DeepSeek-V4.1 vision support.** Enable with multimodal.enable. V4.1 uses its own image processor, driven by the vision_* fields of the checkpoint's config.json; the vision tower stays frozen. Adds conf/dsv41_flash/geo3k_h20_6node (single image) and conf/dsv41_flash/mmrb_h20_6node (multi-image), both on 6 nodes × H20, and extends the DSV4.1 Megatron-Bridge and Megatron-Core patches. (by @qzw6 in #53, #76)\r\n* **ERNIE 5.5 support.** GRPO of ERNIE-5.5-Flash-Base (bf16) on 6 nodes × H20, with conf/ernie55_flash/dapo_h20_6node, gsm8k_h20_6node and a chat template (the checkpoint ships none). The model is built decoder-only: MTP layers are dropped and MTP tensors in the released checkpoint are ignored. With CP > 1 and cp_partition_mode: contiguous, CP partition routes are prebuilt per micro-batch. (by @zhuminghan1999 in #69, #79)\r\n* **Group-level reward.** Set reward.group_rm: true and implement async def group_rm(messages, label, contexts, **kwargs) -> list[Reward]. It runs after all trajectories of the group finish and overrides the per-trajectory rewards. A group whose group_rm raises is marked FAILED and dropped. Results go to group_rm.jsonl when agentflow.dump_trajectory_path is set. (by @zhuminghan1999 in #67)\r\n* **Countdown example.** coda/custom/countdown and conf/qwen3_0_6b/countdown_1gpu. The reward rejects floor division (//) and decimal points. (by @wenkang529 in #37, @FeiyangP in #70)\r\n\r\n### Improvements\r\n\r\n* **QAT weight snap** uses fixed per-element thresholds instead of round-to-nearest. New option trainer.qat_weight_rounding (threshold by default, nearest kept for A/B). (by @sallon88 in #56)\r\n* **DeepSeek-V4.1 sparse attention** now runs FlashMLA sparse prefill forward and cuDNN DSA backward instead of the TileLang kernels (new sparse_attn_flashmla in the DSV4.1 Megatron-Core patch), which reduces training time in our tests. (by @liguang-li in #77)\r\n* **boxed_math reward** ignores a \\text{..} / \\mathrm{..} unit (optionally with ^2 / ^3) after the predicted number when the label is a plain number, and an x \\approx prefix. Different rounding still compares unequal. (by @qzw6 in #76)\r\n* **Synchronous checkpoint save** no longer stages the whole rank shard in host memory first. This comes from the Megatron-LM upgrade, and LoongSage's streaming wrapper from v0.2.0 (#23) is removed. (by @qzw6 in #76)\r\n* Moved HF config readers and DeepSeek model-type constants into coda/utils/hf_config.py; no user-facing change. (by @qzw6 in #72)\r\n\r\n## Bug Fixes\r\n\r\n* Rollout engine fault recovery: a killed engine is removed from the router first, so a hung engine no longer blocks the removal or receives new requests. shutdown() waits at most 180 s before ray.kill. A recovered engine is visible to the health monitor only after init() returns, kill and recovery are serialized, and a failed recovery releases the GPUs of the engines it started. (by @wenkang529 in #80)\r\n* Patch FA4 so the TE causal window (-1, 0) stays causal. (by @atnlp in #65)\r\n* R3 decode pool and tokenizer pool use spawn + PDEATHSIG, so workers no longer inherit parent fds or outlive a killed parent. (by @atnlp in #66)\r\n* Hydra DictConfig filter params now reach data filters instead of being replaced by {}. (by @szluyu99 in #58)\r\n* Enum-typed megatron.model / opd.model string values (e.g. attention_backend: flash) are converted to enum members. (by @zhuminghan1999 in #69)\r\n* mini-SWE agent tells the model when a sandbox command times out. (by @szluyu99 in #49)\r\n* Shield the trajectory queue wri","is_prerelease":false},"readme":true,"readme_zh":true,"news":[],"stale":false,"snapshot_at":"2026-11-28T10:06:57Z","history_start":"2026-09-06"}