Skip to content
Projects

About

Open Source LLM Reinforcement Learning Framework for MLGym Environments 2026

AI & Machine Learning

How these counts are measured

Measured star growth

in 24h
0
in 7 days
0
in 15 days
0
in 1 month
Collecting history

Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.

README.md

Original

preview Download

🧠 NeuroForge: RLHF Playground for Language Models

A next-generation laboratory for shaping large language models through reinforcement learning from human feedback — built on top of modular MLGym-inspired environments.


📜 Overview

NeuroForge is an experimental yet production-minded toolkit for researchers, indie ML engineers, and curious tinkerers who want to teach language models how to behave, not just what to say. Instead of treating fine-tuning as a one-shot supervised chore, NeuroForge reframes the entire process as an ongoing dialogue between a policy model, a reward model, and a curated gymnasium of interactive tasks.

Where traditional pipelines stop at loss curves, NeuroForge keeps going — into preference modeling, reward shaping, rollout scoring, and policy optimization loops that behave more like a training dojo than a script. The result is a framework that feels less like a build system and more like a coaching studio for models that need direction.

This repository is inspired by the ideas and spirit of the original llm-gym-trainer project by chenxingqiang, but takes a distinct path: it leans into simulation-driven feedback, environment multiplexing, and a plug-in architecture that lets you swap reward functions as casually as changing a lightbulb.


🚀 Why NeuroForge Exists

Most fine-tuning frameworks assume the hard part is the math. In practice, the hard part is getting the signal right. A model that maximizes a poorly designed reward will happily learn the wrong lesson with terrifying efficiency. NeuroForge was built around that realization.

The core philosophy is simple:

  • Treat feedback as a first-class citizen. Every rollout is scored, stored, and replayed.
  • Treat environments as interchangeable. A coding task, a dialogue task, and a reasoning task should live in the same harness.
  • Treat the reward model as a moving target. It should be updated, challenged, and occasionally overruled.

The name NeuroForge comes from the idea of a forge — a hot, iterative, sometimes messy place where raw material becomes something useful. That is exactly what training a language model with RL feels like when done correctly.


✨ Feature Highlights

🎛️ Responsive Interactive Dashboard

A live web-based control surface that adapts to desktop, tablet, and mobile viewports. Watch rollouts scroll by, tweak reward weights with a slider, and inspect policy entropy in real time — all without leaving the browser tab.

🌍 Multilingual Support

Interface strings, logging output, and documentation snippets are available in multiple languages out of the box. The training loop itself is agnostic to the language of the data, but the human side of the loop should feel native.

🕰️ 24/7 Support Channel

A community-run help desk and asynchronous Q&A board so that a stalled training run at 3 AM does not have to wait until morning. Volunteers and maintainers rotate coverage across time zones.

🧩 Pluggable Reward Functions

Drop in a new reward module as a single Python file. Register it, name it, and reference it from the config. No fork required, no monolith to wrestle.

🎮 Environment Multiplexing

Run multiple gym environments side by side — a math arena, a code sandbox, a negotiation table — and blend their rewards with configurable weights.

📊 Rollout Replay and Auditing

Every trajectory is stored with a fingerprint. Replay any episode, inspect the reward breakdown, and identify exactly where the policy went sideways.

🔁 Iterative Reward Model Refresh

Retrain the reward model on freshly labeled preference pairs without restarting the whole pipeline. Drift is expected; the tooling embraces it.

🧪 Experiment Tracking Built In

Track hyperparameters, seeds, model checkpoints, and evaluation metrics in a local SQLite-backed store. No external service required.

🧱 Modular Backend Adapters

Swap between different inference backends and training backends through a thin adapter layer. The rest of the code does not care what is underneath.

🛡️ Safety and Guardrail Hooks

Attach pre- and post-generation filters that can veto a rollout before it pollutes the replay buffer.


📦 What You Get Out of the Box

  • A working PPO-style policy optimization loop tuned for language model rollouts.
  • A reward model trainer that consumes pairwise preference data.
  • A reference environment library with three starter tasks.
  • A dashboard, a CLI, and a programmatic API.
  • Config presets for small, medium, and large model scales.
  • A test suite that runs against a tiny stub model so CI stays fast.

🧭 Quick Orientation

The repository is organized around four conceptual pillars, each living in its own directory:

  1. core/ — the training loop, optimizer wrappers, and rollout scheduler.
  2. envs/ — the gym environments and their task definitions.
  3. rewards/ — reward model architectures and scoring utilities.
  4. studio/ — the dashboard, replay viewer, and experiment browser.

Each pillar can be used independently. You can, for example, bring your own training loop and still use studio/ for visualization.


🛠️ Getting Started Without the Usual Ceremony

You do not need a package manager invocation to begin. The recommended path is:

  1. Fetch the source tree into a directory of your choosing using the repository's release archive.
  2. Create an isolated runtime environment with your preferred environment manager.
  3. Activate that environment.
  4. Run the bootstrap script that lives at the root of the tree — it will detect your platform and prepare dependencies.
  5. Launch the studio with the provided entry script.

Download

A more detailed walkthrough lives in the docs/ folder, including a zero-to-first-rollout tutorial that assumes no prior RL experience.


🎓 A First Training Session, Narrated

Imagine you want a small model to answer arithmetic questions politely. You define an environment that generates prompts like "What is 17 plus 24?", a reward function that gives partial credit for numeric correctness and a small bonus for courteous phrasing, and a preference dataset with a few hundred pairwise examples.

You register the environment, register the reward function, and point the config at both. You press start. The dashboard shows rollouts streaming in, each tagged with a reward breakdown. Early on, the model blurts numbers with no context. By the third refresh cycle, it has started wrapping answers in full sentences. By the tenth, it consistently says "The sum is 41."

That progression — from noise to shape — is the entire point of NeuroForge.


🧬 Design Principles

  • Observability over opacity. If a metric matters, it should be visible somewhere in the UI or the logs.
  • Composability over configuration sprawl. Small modules that do one thing beat giant configs that do everything.
  • Reproducibility over convenience. Seeds, versions, and data hashes are recorded by default.
  • Human feedback is data. It deserves storage, versioning, and validation like any other dataset.
  • Fail loudly, recover gracefully. A bad rollout should not crash the run; it should be quarantined and reported.

🔍 SEO-Friendly Keyword Integration

NeuroForge is designed to be discoverable for practitioners searching for terms like reinforcement learning from human feedback, RLHF framework, language model fine-tuning toolkit, reward model training, policy optimization for LLMs, interactive model training dashboard, multilingual ML tooling, and gym-style environments for language agents. These phrases appear naturally throughout the documentation because they describe what the project actually does — not because they were stuffed in.


🧪 Testing and Quality Gates

The test suite is split into fast unit tests and slower integration tests. Fast tests use a stub model that returns deterministic tokens, so they run in seconds. Integration tests exercise the full loop against a tiny real checkpoint.

Coverage reports are generated locally and can be inspected in the studio's quality tab. There is no mandatory coverage threshold, but pull requests that reduce coverage significantly are flagged for discussion.


🤝 Contributing

Contributions are welcome in the form of new environments, new reward functions, documentation improvements, and bug reports. Before opening a pull request, please:

  • Read the contribution guide in docs/contributing.md.
  • Run the fast test suite locally.
  • Describe why the change matters, not just what it changes.

Small, focused pull requests are reviewed faster than sweeping rewrites. If you are unsure whether an idea fits, open a discussion first.


🗺️ Roadmap for 2026

  • Q1 2026 — Stabilize the reward model refresh API and publish reference benchmarks.
  • Q2 2026 — Add support for multi-agent rollouts within a single environment.
  • Q3 2026 — Introduce a plugin marketplace index (curated, community-maintained).
  • Q4 2026 — Expand multilingual documentation and localize the dashboard into additional languages.

Dates are aspirational. Reality has a way of reshaping plans, and that is fine.


📄 License

This project is released under the MIT License. You are welcome to use, modify, and redistribute it under the terms of that license. The full text is available at the following location:

MIT License


⚠️ Disclaimer

NeuroForge is provided as-is, without warranty of any kind, express or implied. The maintainers are not responsible for any outcomes — intended or otherwise — that result from training, deploying, or distributing models produced with this framework.

Training language models with reinforcement learning can produce unpredictable behavior. Always evaluate outputs before placing them in front of real users. Always respect the licenses of the base models and datasets you choose to work with. Always consider the ethical implications of the systems you build.

This project is not affiliated with any specific model vendor, cloud provider, or research institution. It is an independent effort maintained by volunteers who believe that transparent tooling produces better science.

The year is 2026, and the field is moving quickly. Treat every result with appropriate skepticism, including the ones produced by this very repository.


💬 A Final Word

NeuroForge is not trying to be the biggest framework in the ecosystem. It is trying to be the one you reach for when you want to understand what your model is learning, rather than merely observe that it has learned something. If that resonates, you are in the right place.

Download

Explore related projects

Loading…