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

Installation

pip install aigym

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 --group dev

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

Usage

The examples directory contains examples on how to use the aigym environments. Run an ollama-based agent on the Wikipedia maze 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.1.tar.gz (113.9 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.1-py3-none-any.whl (21.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: aigym-0.0.1.tar.gz
  • Upload date:
  • Size: 113.9 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.1.tar.gz
Algorithm Hash digest
SHA256 5117b312f8e9d2b6c90577d4b8cb4cff65f676684aa3330f33df4bb81ca948a8
MD5 6e6592085e774caccbb1c9691c817c6c
BLAKE2b-256 bfcb273bf6d107390909d9c89beb116bef541d549d8651198fb78b1977a7dad9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: aigym-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 21.3 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 edbc2cfb56eaa4bab8cd8457ab8e3864d9c54f928eed426685f6ed4fcd1e5190
MD5 f040500629d40061d421d698bd289a41
BLAKE2b-256 f6f10fa0a1d559cb7405e94ef747d1e60f45fc30adac7fc1ae8c2352f3f20ab7

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