Reinforcement Learning
Transformers
English
post-training
distillation
agentic-coding
composer-2.5
cursor
kimi-k2
grpo
dapo
diloco
openenv
trl
verl
research
methodology
Instructions to use Codeseys/composer-replication-framework with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Codeseys/composer-replication-framework with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Codeseys/composer-replication-framework", dtype="auto") - Notebooks
- Google Colab
- Kaggle
File size: 4,566 Bytes
ac05fbf b266c31 ac05fbf b266c31 ac05fbf b266c31 ac05fbf b266c31 ac05fbf b266c31 ac05fbf b266c31 c0a5ab7 b266c31 ac05fbf b266c31 c0a5ab7 ac05fbf | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 | [build-system]
requires = ["hatchling>=1.21"]
build-backend = "hatchling.build"
[project]
name = "composer-replication"
version = "0.1.0"
description = "Open replication framework for Cursor Composer 2.5: GRPO + SDPO + multi-teacher trace-replay DPO with optional DiLoCo outer loop."
readme = "README.md"
license = { file = "LICENSE" }
authors = [
{ name = "Codeseys", email = "bbaladithyab@gmail.com" }
]
keywords = [
"rl-training",
"rlvr",
"grpo",
"sdpo",
"simpo",
"taid",
"dpo",
"diloco",
"decoupled-diloco",
"agentic",
"coding-agents",
"composer-2-5",
"cursor",
"trl",
"verl",
"prime-rl",
"openenv",
"torchft",
"modal",
"huggingface-jobs",
]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
]
requires-python = ">=3.10"
dependencies = [
"torch>=2.0",
"transformers>=4.46",
]
[project.optional-dependencies]
# Real teacher-replay over OpenRouter
replay = [
"httpx>=0.27",
]
# DiLoCo outer-loop optimizer (single-process)
diloco = [
"torchft-nightly",
]
# Decoupled DiLoCo over serverless executors (per ADR-005)
serverless = [
"fsspec>=2024.6",
"huggingface_hub>=0.27", # for hf:// fsspec backend + HF Jobs
]
# Replaysim dataset normalization (per ADR-004)
#
# NOTE: data-juicer is intentionally NOT pinned as an extra. The package
# named "data-juicer" does not exist on PyPI (the closest match,
# "py-data-juicer==1.0.0", has broken transitive deps; later py-data-juicer
# releases work but install ~150 transitive packages). Users who want the
# DJNormalizer adapter should install data-juicer from source themselves —
# see docs/TROUBLESHOOTING.md ("monarch / data-juicer install"). The
# replaysim Python module imports data_juicer lazily, so the framework
# package imports cleanly without it; only DJNormalizer use-time fails.
replaysim = [
"composer-replication[replay]", # replaysim builds on the replay channel
]
# Production training (TRL GRPOTrainer subclass — Recipe A)
train = [
"trl>=0.12",
"peft>=0.13",
"accelerate>=1.0",
"datasets>=3.0",
]
# PRIME-RL recipe (Recipe C — per ADR-006)
# NOTE: a `prime-rl` extra used to be advertised here pinning
# `prime-rl>=0.5`. That pin is unsatisfiable: the `prime-rl` PyPI name is
# not registered. Prime Intellect publishes prime-rl from source only
# (https://github.com/PrimeIntellect-ai/prime-rl). The framework's
# composer_replication.recipes.prime_rl adapter handles its absence
# gracefully (the upstream parity test is skip-marked when prime-rl is
# not importable) and the in-file shadow-parity test still verifies the
# loss formula independently. The extra is dropped — see
# docs/TROUBLESHOOTING.md ("prime-rl install") for installation guidance.
# NOTE: a `monarch` extra used to be advertised here pinning
# `monarch>=0.4.1`. That pin is unsatisfiable: PyPI's `monarch` package
# is unrelated to Meta's actor framework and tops out at 0.1.11. The real
# Meta Monarch is published as `torchmonarch-nightly` and ships only as
# nightly wheels with platform constraints. Per ADR-006, full Monarch
# integration is a v0.2+ bet and the `composer_replication.recipes.monarch`
# module is a documentation skeleton (importing it does NOT require
# monarch installed). The extra is dropped — see docs/TROUBLESHOOTING.md
# ("monarch / data-juicer install") for installation guidance.
# Everything for development
dev = [
"pytest>=8.0",
"ruff>=0.6",
"composer-replication[replay,diloco,train]",
]
[project.urls]
Homepage = "https://huggingface.co/Codeseys/composer-replication-framework"
Documentation = "https://huggingface.co/Codeseys/composer-replication-framework/blob/main/docs/INTEGRATION_ARCHITECTURE.md"
Repository = "https://huggingface.co/Codeseys/composer-replication-framework"
Issues = "https://huggingface.co/Codeseys/composer-replication-framework/discussions"
[tool.hatch.build.targets.wheel]
packages = ["composer_replication"]
[tool.hatch.build.targets.sdist]
include = [
"/composer_replication",
"/README.md",
"/LICENSE",
"/CITATION.cff",
"/CITATION.bib",
]
[tool.ruff]
line-length = 100
target-version = "py310"
[tool.ruff.lint]
select = ["E", "F", "W", "I", "N", "UP", "B"]
ignore = ["E501", "E741"]
|