Core Concepts#
Overview#
Oumi combines enterprise-grade reliability with research-friendly flexibility, supporting the complete foundation model lifecycle from pretraining to deployment.
This guide introduces the core concepts, and terminology used throughout Oumi, as well as the architecture and guiding design principles. Understanding these core terms will help you navigate Oumi’s documentation and features effectively.
The following diagram illustrates the typical workflow in Oumi. You can either start from scratch (pre-training), or continue from a SOTA model (post-training or continued pre-training).
%%{init: {'theme': 'base', 'themeVariables': { 'background': '#f5f5f5'}}}%% graph LR %% Data stage connections DS[Datasets] --> |Existing Datasets| TR[Training] DS --> |Data Synthesis| TR %% Training methods TR --> |Pre-training| EV[Evaluation] TR --> |SFT| EV TR --> |DPO| EV %% Evaluation methods spread horizontally EV --> |Generative| INF[Inference] EV --> |Multi-choice| INF EV --> |LLM Judge| INF %% Style for core workflow style DS fill:#1565c0,color:#ffffff style TR fill:#1565c0,color:#ffffff style EV fill:#1565c0,color:#ffffff style INF fill:#1565c0,color:#ffffff
Core Concepts#
Oumi CLI#
The CLI is the entry point for all Oumi commands.
oumi <command> [options]
For detailed help on any command, you can use the --help
option:
oumi --help # for general help
oumi <command> --help # for command-specific help
The available commands are:
Command |
Purpose |
---|---|
|
Train a model. |
|
Evaluate a model. |
|
Run inference on a model. |
|
Launch jobs remotely. |
|
Judge datasets, models or conversations. |
|
Prints information about the current environment. |
|
A wrapper for torchrun/accelerate with reasonable default values for distributed training. |
See CLI Reference for full CLI details.
Python API#
The Python API allows you to use Oumi to train
, evaluate
, infer
, judge
, and more. You can use it in a notebook, a script, or any custom workflow.
For example, to train a model, you can use the train
function:
from oumi.train import train
from oumi.core.configs import TrainingConfig
config = TrainingConfig.from_yaml("path/to/config.yaml")
train(config)
See oumi for full API details.
Configs#
To provide recordability and reproducibility for common workflows, Oumi uses exhaustive configs to define all the parameters for each step.
Config Type |
Purpose |
Documentation |
---|---|---|
Training |
Model training workflows |
|
Evaluation |
Benchmark configurations |
|
Inference |
Inference settings |
|
Launcher |
Deployment settings |
Example config structure:
# Example training recipe
model:
name: meta-llama/Llama-3.1-70B-Instruct
trust_remote_code: true
data:
train:
datasets:
- dataset_name: text_sft
dataset_path: path/to/data
stream: true
training:
trainer_type: TRL_SFT
learning_rate: 1e-4
For a full list of recipes, you can explore the recipes page.
Other Key Concepts#
Term |
Description |
Documentation |
---|---|---|
Recipe |
Predefined configurations in Oumi for common model training, evaluation and inference workflows |
|
Launcher |
Oumi’s job orchestration system for running workloads across different cloud providers |
|
Models |
Model architectures and implementations. Oumi supports most models from HuggingFace’s |
|
Datasets |
Data loading and preprocessing pipelines |
|
Trainers |
Orchestrate training process and optimization. Oumi supports custom trainers, as well as trainers from HuggingFace’s |
|
Data Mixtures |
Oumi’s system for combining and weighting multiple datasets during training |
|
Oumi Judge |
Built-in system for evaluating model outputs based on customizable attributes (e.g. helpfulness, honesty, and safety) |
Next Steps#
Get started with Oumi: First install Oumi, then follow the Quickstart guide to run your first training job.
Explore example recipes: Check out the Recipes page and try running a few examples.
Dive deeper with tutorials: The Tutorials provide step-by-step guidance on specific tasks and workflows.
Learn more about key functionalities: Explore detailed guides on training, inference, evaluation, and model judging.