mirror of
https://github.com/open-thought/reasoning-gym.git
synced 2026-04-19 12:58:07 +00:00
better usage demo in readme (#477)
* better usage demo in readme * example of non-default configs
This commit is contained in:
parent
876e0aa440
commit
1c9ed2e0eb
1 changed files with 22 additions and 4 deletions
26
README.md
26
README.md
|
|
@ -38,11 +38,9 @@ pip install reasoning-gym
|
|||
|
||||
_Note that this project is currently under active development, and the version published on PyPI may be a few days behind `main`._
|
||||
|
||||
## 🛠️ Development
|
||||
## ✨ Quickstart
|
||||
|
||||
For development setup, see [CONTRIBUTING.md](CONTRIBUTING.md#development-setup).
|
||||
|
||||
## ✨ Example Usage
|
||||
Starting to generate tasks using Reasoning Gym is straightforward:
|
||||
|
||||
```python
|
||||
import reasoning_gym
|
||||
|
|
@ -65,6 +63,26 @@ metadata: {'animals': {'sheep': 2, 'dog': 2}, 'total_legs': 16}
|
|||
...
|
||||
```
|
||||
|
||||
Use keyword arguments to pass task-specific configuration values:
|
||||
|
||||
```python
|
||||
reasoning_gym.create_dataset('leg_counting', size=10, seed=42, max_animals=20)
|
||||
```
|
||||
|
||||
Create a composite dataset containing multiple task types, with optional relative task weightings:
|
||||
|
||||
```python
|
||||
from reasoning_gym.composite import DatasetSpec
|
||||
specs = [
|
||||
# here, leg_counting tasks will make up two thirds of tasks
|
||||
DatasetSpec(name='leg_counting', weight=2, config={}), # default config
|
||||
DatasetSpec(name='figlet_font', weight=1, config={"min_word_len": 4, "max_word_len": 6}), # specify config
|
||||
]
|
||||
reasoning_gym.create_dataset('composite', size=10, seed=42, datasets=specs)
|
||||
```
|
||||
|
||||
For the simplest way to get started training models with Reasoning Gym, we recommend using the `verifiers` library, which directly supports RG tasks. See `examples/verifiers` for details. However, RG data can be used with any major RL training framework.
|
||||
|
||||
## 🔍 Evaluation
|
||||
|
||||
Instructions for running the evaluation scripts are provided in [eval/README.md](https://github.com/open-thought/reasoning-gym/blob/main/eval/README.md).
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue