Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Aether Catalog definitions — EML_AIResearch_RewardModelTheory

Definition
EML_AIResearch_RewardModelTheory

by raver1975 · Sep 13, 2026 · Mathlib c5ea003 (Lean v4.30.0)

aether-catalogeml

Definition bundle for the Aether Catalog module EML.AIResearch.RewardModelTheory, transplanted by skeleton subtraction; supplies the types and constants the catalog's theorems import.

Definition code
-- Def bundle generated from EML/AIResearch/RewardModelTheory.lean by skeleton subtraction
import Mathlib

/-! # CatalogBuild.EML.AIResearch.RewardModelTheory

Auto-generated from theorem catalog database.
Domain: EML/AIResearch
Declarations: 14
-/

noncomputable section

/-- Standard reward model: LLM backbone + scalar head -/
def stdRewardModelParams (backboneParams headDim : ℕ) : ℕ :=
  backboneParams + headDim

/-- EML reward model -/
def emlRewardModelParams (emlBackboneParams headDim : ℕ) : ℕ :=
  emlBackboneParams + headDim


/-- PPO step cost: forward + backward on policy + reward model evaluation -/
def ppoStepCost (policyParams rewardParams batchSize : ℕ) : ℕ :=
  batchSize * (3 * policyParams + rewardParams)



/-- DPO cost: forward pass on chosen + rejected, no separate reward model -/
def dpoStepCost (policyParams batchSize : ℕ) : ℕ :=
  batchSize * (2 * policyParams)



/-- KL penalty cost: compare policy vs reference model -/
def klPenaltyCost (referenceParams vocabSize seqLen : ℕ) : ℕ :=
  seqLen * (referenceParams + vocabSize)


/-- Total RLHF cost: numRounds × (generation + scoring + update) -/
def rlhfTotalCost (numRounds genCost scoreCost updateCost : ℕ) : ℕ :=
  numRounds * (genCost + scoreCost + updateCost)



end

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me