+
Skip to content

oumi-ai/roumi

Repository files navigation

roumi

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.

Prerequisites

  • Rust: Install Rust
  • Python: Version 3.10 or higher is recommended.
  • Maturin: install via pip below

Setting up a Python Virtual Environment

(Optional, but Recommended)

python -m venv venv
venv\Scripts\activate # on Windows
source venv/bin/activate # on macOS/Linux
pip install -U pip

Install Maturin

pip install maturin

Build each crate for Python to use

cd crates/grpo_rewards
maturin develop
cd ../..

Run the Python Example

cd ../../examples
python example_grpo_rewards.py

Building and Running the Plugin

cd plugins/template
cargo build --release
cd ../../examples
python using_plugin_rewards.py

Building and Running the Rust Code

cargo run

Testing

cargo test --lib --bins --tests

About

Rust libraries for Oumi

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载