Rust libraries for Oumi
This is a repository for Oumi's Rust libraries. It will hopefully grow substantially in the near future, but for now there is a grpo_rewards crate that calculates rewards based on completion length. There is a main.rs in the crates directory for an example of how to call it from rust and a python example in the examples directory for how to call it from python.
- Rust: Install Rust
- Python: Version 3.10 or higher is recommended.
- Maturin: install via pip below
(Optional, but Recommended)
python -m venv venv
venv\Scripts\activate # on Windows
source venv/bin/activate # on macOS/Linux
pip install -U pip
pip install maturin
cd crates/grpo_rewards
maturin develop
cd ../..
cd ../../examples
python example_grpo_rewards.py
cd plugins/template
cargo build --release
cd ../../examples
python using_plugin_rewards.py
cargo run
cargo test --lib --bins --tests