Skip to content

River / The frontier AI development stack

Your own
frontier AI lab.
In one API.

Build frontier models and agents that learn from experience. Use reinforcement learning to improve how they reason, use tools, and complete tasks. Train and serve through one API, on River Cloud or your GPUs.

The River stack

Training

Reinforcement learning for better agents

Training and inference workers form a learning cycle Training workers send updated weights to inference workers. Inference generates rollouts that are scored, feeding rewards and training data back into training. Updatedweights Rollouts& rewards Training workers Inference workers

Production inference

Your models, serving your users

Production inference serves a large audience Inference workers serve deployed models to many users and applications. Inference workers
River APIOne shared GPU fleet
Training & rolloutsShared GPU fleetProduction inference

Use River Cloud or deploy on-prem on your own GPUs

Optimized models · RL tested at scaleExplore the system

Trusted by teams
at the frontier.

01 Training & inference

The next era of AI.
Intelligence you own.

Build models and agents around your expertise. Reinforcement learning turns experience into better capabilities: agents attempt tasks, you score the outcomes, and the model learns from that feedback.

Develop models & agents

Training

Build agents that get better at your work.

Fine-tune an open model on expert examples, then improve it with reinforcement learning. Define the tasks, tools, and rewards; River runs the training and inference that power your learning loop.

Supervised fine-tuning
Teach your domain using your data, examples, and expert demonstrations.
Reinforcement learning
Train agents to reason, use tools, and complete multi-step tasks with your own environments and rewards.
Run your applications

Production inference

Put the intelligence you build to use.

Turn a trained checkpoint into a model deployment. Bring your own model’s capabilities into customer-facing products, internal tools, and agents.

From checkpoint to deployment
Save inference weights and publish them under a model name your applications can use.
Connect through a familiar API
Stream responses through River’s Python client or an OpenAI-compatible endpoint.
Open-weight models, optimized for training and inference

DeepSeek / Kimi / Qwen / GLM / Nemotron

Explore models

Model engineering

Every model, optimized and tested

We optimize every supported open-weight model for training and inference. Our custom implementations run faster than open-source alternatives. We handle GPU topology and performance tuning, and test each model for correctness—so you can compare models and experiment with confidence.

Custom training & inference engines · Topology-aware optimization · Per-model correctness tests

RL reliability

Reliable RL at scale

At scale, subtle errors can undermine a learning loop. We carefully evaluate and stress-test the API to keep KL mismatch and numerical instability under control—so you can focus on improving your agents and developing new training algorithms.

KL mismatch checks · Numerical validation · Stress testing at scale

02 Own the stack

Frontier capability.
Sovereign control.

Your models are a strategic asset. Build and run them where you choose—with control over your data, your weights, and your compute.

Managed infrastructure

River Cloud

The complete AI lab, ready to use. Focus on your models while River operates the infrastructure.

  • Managed training, sampling, and inference
  • Download your trained weights and take them with you
  • Usage-based, per-token pricing
Start on River Cloud Talk about River Cloud

On-prem · Your infrastructure

River Cluster

Turn the GPUs you already own into a frontier AI lab. Deploy the same River product in your environment.

  • Training and inference on your existing GPU cluster
  • Your data and model weights in your environment
  • The same API, workflows, and Console
Bring River to your cluster

The same River product, wherever you choose to run it.

03 Control the learning

From experiment
to deployment

Create a training run, explore your next algorithm, and turn a checkpoint into a deployed model. Train and deploy with River’s Python client, then serve through an OpenAI-compatible API.

Python / From experiment to deploymentExplore the real API
Open model → your training run

Distributed training from Python

Choose an open model, configure its adapters, and start learning from your data. River handles the compute behind each training step.

train_step pipelines forward/backward and the optimizer update on the server. Control the learning rate, loss function, and optimizer settings.

Explore the Python client
train.pyTokenized batch supplied by you
import river_client as river

client = river.Client(api_key="...")
with client.session(project="my-lab") as session:
    model = session.create_model(
        base_model="Qwen/Qwen3.6-35B-A3B-FP8",
        lora=river.LoraConfig(rank=16),
    )
    model.train_step(
        batch, lr=1e-4,
        loss_fn="cross_entropy",
    )
    # Continue sampling or deploy in this session.
River handles
the system underneath.
Distributed trainingInference & samplingWeight transferCheckpoint deployment

From a first fine-tune to a new post-training algorithm.
Build on primitives designed for your research.

Inspect the training recipes

The River Console

See your lab
in action

See what’s happening across your cluster without losing sight of the experiment. The Console brings your team’s training runs, checkpoints, and deployments into one place.

  • Follow training runs and spot what needs attention.
  • Manage checkpoints and production inference deployments.
  • Track usage, spend, and your team’s balance.
Open the Console
console.river.aiSample workspace
BalanceView billing
$24,850.00

Available for training and inference

Tokens this month84.2M
Spend this month$5,150.00
Team runsView all runs
GLM-5.3-FlashResearch team · <1 minute agoActive
Qwen3.8-27B-FP8Research team · <1 minute agoActive
Kimi-K2.6-NVFP4Research team · 2 minutes agoVery long
GLM-5.3-FlashResearch team · 3 minutes agoActive

What’s new

Sign in with SSO

Connect your organization’s identity provider to River.

Ask us about SSO ↗
River on AWS Marketplace

Use River with your AWS account and keep billing in one place.

View on AWS Marketplace ↗

Documentation

Supervised Fine TuningReinforcement LearningPython ReferenceExamples
River Console, illustrated with sample data. Manage training, deployments, usage, and spend in one workspace.

04 Start building

Everything you need
to get started

Explore the models, inspect the code, and choose your starting point.

Read the documentation
01Choose your foundationThe River Cloud model catalog

Every model below is optimized for training and inference and tested for correctness. Context windows are shown in tokens. For on-prem model and hardware requirements, talk to our team.

Qwen3.8 · Dense
Qwen3.8 27B
262k
Qwen3.6 · MoE
Qwen3.6 35B
262k
Qwen3.5 · MoE
Qwen3.5 397B
262k
Kimi · MoE
Kimi K2.6
32k 262k
GLM · MoE
GLM 5.2
32k 262k
GLM · MoE
GLM 5.3 Flash
262k
DeepSeek · MoE
DeepSeek V4 Flash
262k
Nemotron · MoE
Nemotron 3.5 Lightning 30B
262k
02Explore the training recipesPython examples · GRPO & CISPO

Simplified research examples showing the shape of the API. Bring your own data preparation, reward functions, and evaluation.

A toy example: a minimal GRPO loop on GSM8K, training Kimi-K2.6-NVFP4. Reward starts low because Kimi tends to think for longer than the 128-token budget, then climbs above 0.9 reasonably quickly as it learns to answer within the limit.

rl_loop.py
import river_client as river
from datasets import load_dataset
from transformers import AutoTokenizer

MODEL      = "nvidia/Kimi-K2.6-NVFP4"
BATCH      = 256          # prompts per step
GROUP      = 4            # samples per prompt
MAX_TOKENS = 128
LORA_RANK  = 16
LR         = 4e-5         # learning rate

client = river.Client(api_key="...")
tok = AutoTokenizer.from_pretrained(MODEL, trust_remote_code=True)
gsm8k = load_dataset("openai/gsm8k", "main", split="train")   # math word problems

def reward(text, answer):
    # 1.0 if the \boxed{...} answer matches the GSM8K ground truth, else 0.0
    return float(extract_boxed(text) == extract_gsm8k_answer(answer))

def make_prompt(question):
    ...   # render the question with the chat template (+ "...answer inside \boxed{}" suffix)

with client.session() as session:
    model = session.create_model(
        base_model=MODEL,
        lora=river.LoraConfig(
            rank=LORA_RANK,
            train_attn=True,     # attention projections
            train_mlp=True,      # MLP / MoE experts
            train_unembed=True,  # unembedding (lm_head)
        ),
    )

    for step in range(len(gsm8k) // BATCH):
        rows = gsm8k.select(range(step * BATCH, (step + 1) * BATCH))
        prompts = [make_prompt(q) for q in rows["question"]]

        # 1. Sample a group of candidate answers per prompt
        groups = model.sample(
            prompts=prompts, num_samples=GROUP, max_tokens=MAX_TOKENS, stop=["<|im_end|>"],
        )

        # 2. Score, then center rewards into GRPO advantages (no std division)
        train_data = []
        for prompt, samples, answer in zip(prompts, groups, rows["answer"]):
            rewards = [reward(s.text, answer) for s in samples]
            baseline = sum(rewards) / len(rewards)
            if all(r == baseline for r in rewards):
                continue  # no signal — skip this group

            ptoks = tok.encode(prompt, add_special_tokens=False)
            for s, r in zip(samples, rewards):
                adv = r - baseline
                full_ids = ptoks + s.tokens
                train_data.append({
                    "input_ids": full_ids,
                    "attention_mask": [1] * len(full_ids),
                    "old_logprobs": [0.0] * (len(ptoks) - 1) + s.logprobs + [0.0],
                    "advantages": [0.0] * (len(ptoks) - 1) + [adv] * len(s.tokens) + [0.0],
                })

        # 3. One policy-gradient update
        if train_data:
            model.forward_backward(data=train_data, loss_fn="importance_sampling")
            model.optim_step(lr=LR)

    model.save_weights("final")
reward/mean · 29 steps
reward
rl_loop.py · Kimi-K2.6-NVFP4 · GSM8K · GRPO · hover to inspect any step
03Plan your computeRiver Cloud token pricing

Training and inference on River Cloud are billed per token. For deployment on your own GPUs, contact us about on-prem pricing.

Swipe to compare token prices

Model Context Prompt Cached Completion Training
Qwen3.8-27B-FP8 262k $1.80 / 1M $0.360 / 1M $5.50 / 1M $4.10 / 1M
Qwen3.5-9B 262k $0.66 / 1M $0.132 / 1M $1.99 / 1M $1.46 / 1M
Qwen3.6-35B-A3B-FP8 262k $0.33 / 1M $0.066 / 1M $0.82 / 1M $1.00 / 1M
Qwen3.5-122B-A10B-FP8 262k $1.00 / 1M $0.200 / 1M $3.00 / 1M $4.00 / 1M
Qwen3.5-397B-A17B-FP8 262k $3.32 / 1M $0.664 / 1M $8.30 / 1M $10.00 / 1M
Kimi-K2.6-NVFP4 32k $1.22 / 1M $0.244 / 1M $3.06 / 1M $3.67 / 1M
Kimi-K2.6-NVFP4-262k 262k $4.28 / 1M $0.856 / 1M $10.70 / 1M $12.84 / 1M
GLM-5.2-NVFP4 32k $1.46 / 1M $0.292 / 1M $3.67 / 1M $4.40 / 1M
GLM-5.2-NVFP4-262k 262k $5.14 / 1M $1.028 / 1M $12.84 / 1M $15.41 / 1M
GLM-5.3-Flash 262k $1.50 / 1M $0.300 / 1M $3.00 / 1M $8.00 / 1M
DeepSeek-V4-Flash-0731 262k $1.50 / 1M $0.300 / 1M $3.00 / 1M $8.00 / 1M
Nemotron-3.5-Lightning-30B-A3B-NVFP4 262k $0.30 / 1M $0.060 / 1M $0.80 / 1M $1.00 / 1M

Prices in USD per 1M tokens · Preview rates, subject to change · Cached prompt tokens billed at 20% of the prompt rate
Checkpoint storage billed at $0.10 / GB / month · Longer context lengths and additional models are priced on request — talk to our team

Our vision

Intelligence you own,
at every layer.

We’re building a future where your AI learns from you, works for you, and belongs to you—from how it learns to the hardware it runs on. River’s training and inference platform is one part of that larger vision.

Explore our vision

Talk to our team

What will you build
with River?

Bring your team’s AI to River Cloud or run River Cluster on your own GPUs. Tell us a little about your plans, and we’ll help you get started.

Prefer email? [email protected]

All fields are required unless marked optional.

Your details
I’m interested in

We’ll use these details to respond to your inquiry. Privacy policy