Skip to content

AI Developer Tool · Python

post-training-from-scratch

From-scratch, tested LLM post-training objectives: SFT packing and masking, DPO/IPO/SimPO, and GRPO/Dr.GRPO/DAPO

What it is

This repository provides a reference implementation of loss functions and utilities for post-training large language models, including SFT, preference optimization (DPO, cDPO, IPO, SimPO), and group-relative RL (GRPO, DAPO, Dr.GRPO). It includes a comprehensive test suite, documentation, and a toy end-to-end example to demonstrate usage.

  • dpo
  • grpo
  • llm
  • post-training
  • pytorch
  • reinforcement-learning
  • rlhf
  • sft
Scored at3299a8621 Nov 2026Changes since

Merit describes the code at this commit. Later pushes count once the owner rescans. How merit is scored

Tests, level by level

From the files read · changes no score

  1. Tests exist: yes.13 test files in the repository.
  2. Can run as committed: yes.No missing imports in the test files read.
  3. CI runs them: yes.The whole suite: .venv/bin/pytest
  4. They pass: not checked.Not checked: AI-Atlas reads code and never runs it.

Distribution based on AI work

1 / 2
NLP & LLMs: 50.0%Machine Learning: 41.2%MLOps: 5.9%Data Science: 2.9%
  • NLP & LLMs50%
  • Machine Learning41%
  • MLOps6%
  • Data Science3%

Each field's share of the project's AI work, as scoring counts it. It ranks in the field it is most about.

What the judge found

Read from the project's code at its scored commit.

Strengths3

  • Correctness verified by extensive test suite including independent references and gradchecks.
  • Clear, educational documentation with mathematical explanations and design notes.
  • Modular, reusable implementation of post-training objectives as plain tensor functions.

Limitations

The owner keeps this project's limitations private.

Around it on the NLP & LLMs board

Whole board
  1. 10WebsearchRAG System · Python70.9/100AdvancedJens Mittelbach
  2. 11EnclosureAI Developer Tool · Python70.7/100Advancedjerry howell
  3. 12post-training-from-scratchAI Developer Tool · Python69.7/100AdvancedGonzalo Fuentes
  4. 13tinymarsArchitecture Modification / Research · Python69.6/100AdvancedMario Gutierrez
  5. 14Fresta-DiamondLibrary / Framework · Python69.4/100AdvancedTiago Santos

More from Gonzalo Fuentes