#148 · Primary category: LLM Application Frameworks

LlamaGym

Fine-tune LLM agents with online reinforcement learning

Project last updated:03/19/24

GitHub Stars

1.3K

Forks

65

Contributors

1

License

MIT

Why we included this project

LlamaGym brings the classic reinforcement learning loop, where an agent learns by acting in an environment and collecting rewards, to LLM-based agents that usually stop learning once training is done. Everything lives in a single Agent abstract class that connects an LLM to any Gym-style environment and takes care of conversation context, episode batching, reward assignment, and PPO setup. You implement three methods, the system prompt, how observations get formatted, and how responses become actions, then attach a Hugging Face model with a value head. That keeps experiments fast to stand up if you want to try RL-based agent training without writing the scaffolding yourself. It is an early-stage library with a deliberately small scope, so expect to adapt some code, but as a template for online RL fine-tuning it is remarkably compact.

Articles for this project

No articles for this project yet.

To suggest a topic or contribute an article, contact us.

Related projects in this category