Skip to main content

Reinforcement learning environments for fine-tuning language models for reasoning tasks.

Project description

🤖 AI Gym

Reinforcement learning environments for AI fine-tuning

aigym is a library that provides a suite of reinforcement learning (RL) environments primarily for the purpose of fine-tuning pre-trained models - namely language models - for various reasoning tasks.

Built on top of the gymnasium API, the objective of this project is to expose a light-weight and extensible environments to fine-tune language models with techniques like PPO and GRPO.

It is designed to complement training frameworks like trl, transformers, pytorch, and pytorch lightning.

See the project roadmap here

Development Installation

Install uv:

pip install uv

Create a virtual environment:

uv venv

Activate the virtual environment:

source .venv/bin/activate

Install the package:

uv sync --extra ollama

Install ollama to run a local model: https://ollama.com/download

Usage

Run an ollama-based agent on the Wikipedia maze RL environment:

python examples/ollama_agent.py

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aigym-0.0.0.tar.gz (113.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aigym-0.0.0-py3-none-any.whl (28.6 kB view details)

Uploaded Python 3

File details

Details for the file aigym-0.0.0.tar.gz.

File metadata

  • Download URL: aigym-0.0.0.tar.gz
  • Upload date:
  • Size: 113.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for aigym-0.0.0.tar.gz
Algorithm Hash digest
SHA256 974c4422a7728e017fd6719fbf259b59b9e2d088224a9e6a217f8a0207aced14
MD5 6c8bb11cc69022adb7a03d36b4b33cf7
BLAKE2b-256 ca7e11c47bfbeb3d09d77485cc7a9be1c0a3e36e4d26803a404fceb25a18b6f7

See more details on using hashes here.

File details

Details for the file aigym-0.0.0-py3-none-any.whl.

File metadata

  • Download URL: aigym-0.0.0-py3-none-any.whl
  • Upload date:
  • Size: 28.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for aigym-0.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 51756f2420398332c0e4c52e59b240a81afe61a120c4b733ed76b54998e2435c
MD5 7e8ed48dd0f3696b3c2f4d5e821add70
BLAKE2b-256 d05493b21bd4321f5d96ae140ce814d5214153587e3377ef3770ea011ac0a759

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page