Update README (#578)
* Add citation * Add license section * Add eval section * Run eval benchmarks in parallel as well * Nicer print * Disable vllm logs on eval
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
# This CITATION.cff file was generated with cffinit. (https://bit.ly/cffinit)
|
||||
cff-version: 1.2.0
|
||||
title: PRIME-RL
|
||||
message: >-
|
||||
If you use this software, please cite it using the
|
||||
metadata from this file.
|
||||
type: software
|
||||
authors:
|
||||
- name: Prime Intellect
|
||||
repository-code: 'https://github.com/PrimeIntellect-ai/prime-rl'
|
||||
license: Apache-2.0
|
||||
date-released: '2025-07-13'
|
||||
@@ -120,6 +120,8 @@ ulimit -n 32000
|
||||
|
||||
We provide a convenience endpoint `rl` for single-node RL experiments. It configures and starts the trainer, orchestrator and, optionally, an inference server. It enforces correctly setting shared configs (e.g. the model name or async level should be the same across all modules) and dispatches and monitors subprocesses. To stream the logs from each module, we use file logging, by default only the trainer logs will be displayed on the main process.
|
||||
|
||||
To check all available configuration options, run `uv run rl --help`.
|
||||
|
||||
**Reverse Text**
|
||||
|
||||
Train a tiny model (`willcb/Qwen2.5-0.5B-Reverse-SFT`) to learn to reverse a small chunk of text. Training is extremely quick because we allow a maximum context of 128 tokens.
|
||||
@@ -213,15 +215,18 @@ To kill the tmux session when you're done:
|
||||
|
||||
### Evals
|
||||
|
||||
*TBD*
|
||||
We provide a convenience endpoint for running a full evaluation suite of common benchmarks such as AIME, MATH-500 or LiveCodeBench against your model using the `eval` entrypoint.
|
||||
|
||||
### Synthetic Data
|
||||
```bash
|
||||
uv run inference --model.name Qwen/Qwen3-0.6B --max-model-len 2048
|
||||
```
|
||||
|
||||
*TBD*
|
||||
```bash
|
||||
uv run eval --model.name Qwen/Qwen3-0.6B --benchmarks math500,aime24,aime25
|
||||
```
|
||||
|
||||
### Benchmark
|
||||
To check all available configuration options, run `uv run eval --help`.
|
||||
|
||||
*TBD*
|
||||
|
||||
## Developer
|
||||
|
||||
@@ -229,7 +234,7 @@ To kill the tmux session when you're done:
|
||||
|
||||
### Setup
|
||||
|
||||
1. Optionally, install [pre-commit](https://pre-commit.com) hooks
|
||||
1. Install [pre-commit](https://pre-commit.com) hooks
|
||||
|
||||
```bash
|
||||
uv run pre-commit install
|
||||
@@ -237,20 +242,6 @@ uv run pre-commit install
|
||||
|
||||
### Configs
|
||||
|
||||
We use `pydantic-settings` to configure `prime-rl`. To get an overview of the available configurations, run the following command:
|
||||
|
||||
```bash
|
||||
uv run trainer --help
|
||||
```
|
||||
|
||||
```bash
|
||||
uv run orchestrator --help
|
||||
```
|
||||
|
||||
```bash
|
||||
uv run inference --help
|
||||
```
|
||||
|
||||
**Sources**
|
||||
|
||||
We support the following sources for configuration, in this order of precedence:
|
||||
@@ -419,6 +410,19 @@ In general, the model used for generating rollouts at step `n` is from `ckpt[n -
|
||||
- When async_level = 0, the rollout and gradient are based on the same model version.
|
||||
This is equivalent to synchronous on-policy training.
|
||||
|
||||
## License
|
||||
|
||||
This project is licensed under the Apache 2.0 license, as found in the [License](LICENSE) file.
|
||||
|
||||
## Citation
|
||||
|
||||
*TBD*
|
||||
If you find our work useful, feel free to cite it using
|
||||
|
||||
```tex
|
||||
@misc{primeintellect2025prime-rl,
|
||||
author = {Prime Intellect},
|
||||
title = {PRIME-RL},
|
||||
url = {https://github.com/PrimeIntellect-ai/prime-rl},
|
||||
year = {2025}
|
||||
}
|
||||
```
|
||||
|
||||
@@ -17,16 +17,22 @@ if TYPE_CHECKING:
|
||||
HF_HUB_DISABLE_PROGRESS_BARS: str
|
||||
HF_HUB_ETAG_TIMEOUT: int
|
||||
|
||||
# vLLM
|
||||
VLLM_CONFIGURE_LOGGING: int
|
||||
|
||||
|
||||
_EVAL_ENV_PARSERS = {
|
||||
"HF_HUB_CACHE": str,
|
||||
"HF_HUB_DISABLE_PROGRESS_BARS": str,
|
||||
"HF_HUB_ETAG_TIMEOUT": int,
|
||||
"VLLM_CONFIGURE_LOGGING": int,
|
||||
**_BASE_ENV_PARSERS,
|
||||
}
|
||||
|
||||
_EVAL_ENV_DEFAULTS = {
|
||||
"HF_HUB_DISABLE_PROGRESS_BARS": "1", # Disable HF progress bars
|
||||
"HF_HUB_ETAG_TIMEOUT": "500", # Set request timeout to 500s to avoid model download issues
|
||||
"VLLM_CONFIGURE_LOGGING": "0", # Disable vLLM logging
|
||||
}
|
||||
|
||||
set_defaults(_EVAL_ENV_DEFAULTS)
|
||||
|
||||
@@ -43,8 +43,9 @@ async def eval(config: EvalConfig):
|
||||
|
||||
# Run benchmarks on base model
|
||||
logger.info(f"Running evals on base model {config.model.name}")
|
||||
for benchmark in config.benchmarks:
|
||||
await run_benchmark(
|
||||
await asyncio.gather(
|
||||
*[
|
||||
run_benchmark(
|
||||
client,
|
||||
benchmark,
|
||||
config.model,
|
||||
@@ -52,6 +53,9 @@ async def eval(config: EvalConfig):
|
||||
ckpt_step=0,
|
||||
monitor=monitor,
|
||||
)
|
||||
for benchmark in config.benchmarks
|
||||
]
|
||||
)
|
||||
|
||||
logger.info("Evaluation finished!")
|
||||
|
||||
|
||||
@@ -43,7 +43,9 @@ async def run_benchmark(
|
||||
benchmark_start_time = time.time()
|
||||
|
||||
benchmark_name = get_benchmark_display_name(benchmark)
|
||||
logger.info(f"Evaluating {model_config.name} on {benchmark_name} at step {step}")
|
||||
logger.info(
|
||||
f"Evaluating {model_config.name} on {benchmark_name} {f'for checkpoint {ckpt_step}' if ckpt_step > 0 else ''}"
|
||||
)
|
||||
|
||||
# Initializing the benchmark dataset
|
||||
logger.debug(f"Loading benchmark dataset ({benchmark})")
|
||||
|
||||
Reference in New Issue
Block a user