{"adoption": {"forks": 235, "observed_at": "2026-08-28T04:07:29.104416+00:00", "stars": 2907}, "canonical_url": "https://ross.abutalabs.com/products/direct-preference-optimization", "card": {"archived": false, "artifact_type": "library", "description": "Reference implementation for DPO (Direct Preference Optimization)", "domain": ["large-language-models", "machine-learning", "reinforcement-learning"], "enriched": true, "function": ["llm-training", "machine-learning", "deep-learning"], "health_score": 20, "homepage": null, "language": "Python", "license": "Apache-2.0", "license_family": "permissive", "maturity": "stable", "member_repos": ["eric-mitchell/direct-preference-optimization"], "name": "eric-mitchell/direct-preference-optimization", "platform": ["python"], "pushed_at": "2024-08-11T00:24:06+00:00", "repo": "eric-mitchell/direct-preference-optimization", "stars": 2907, "tags": ["dpo", "preference-optimization", "rlhf", "alignment", "fine-tuning", "huggingface", "reference-implementation", "gpu", "linux"], "topics": [], "urls": [], "use_cases": ["train a language model from human preference data", "run DPO fine-tuning on a HuggingFace causal LM", "align an LLM without training a separate reward model", "fine-tune Pythia or Llama on Anthropic-HH preference datasets", "compare DPO, conservative DPO, and IPO training losses", "run supervised fine-tuning before preference optimization"], "what_it_is": "A reference implementation of Direct Preference Optimization (DPO) for training language models from human preference data, built on HuggingFace models. It supports the two-stage pipeline of supervised fine-tuning followed by preference learning, including variants like conservative DPO and IPO.", "when_to_avoid": ["you need a production training framework with broad ecosystem support like TRL", "you only want to run inference on an already-aligned model", "you need RLHF with an explicit reward model or PPO", "you are not working with language models"], "when_to_choose": ["you want the canonical reference implementation of the DPO paper", "you need to fine-tune any HuggingFace causal LM with preference data", "you want to experiment with DPO variants like cDPO and IPO", "you need multi-GPU FSDP training for preference optimization"]}, "data_as_of": "2026-08-30T08:39:29.467469+00:00", "members": [{"path": "/products/direct-preference-optimization", "repo": "eric-mitchell/direct-preference-optimization", "role": "main", "score": 29}], "provenance": {"archived": {"kind": "observed", "observed_at": "2026-08-28T04:07:29.104416+00:00", "source": "github"}, "artifact_type": {"confidence": null, "enriched_at": "2026-08-30T07:34:23.431906+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "684b4bed41bc180a80bd2b5d3a530944a042f4913e40d08a1930dab3439d0a51", "fetched_at": "2026-08-28T04:07:29.104416+00:00", "kind": "readme", "missing": false, "url": "https://github.com/eric-mitchell/direct-preference-optimization"}], "taxonomy_version": 1}, "description": {"kind": "observed", "observed_at": "2026-08-28T04:07:29.104416+00:00", "source": "github"}, "domain": {"confidence": null, "enriched_at": "2026-08-30T07:34:23.431906+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "684b4bed41bc180a80bd2b5d3a530944a042f4913e40d08a1930dab3439d0a51", "fetched_at": "2026-08-28T04:07:29.104416+00:00", "kind": "readme", "missing": false, "url": "https://github.com/eric-mitchell/direct-preference-optimization"}], "taxonomy_version": 1}, "enriched": {"inputs": [], "kind": "computed", "method": "enrichment_status"}, "function": {"confidence": null, "enriched_at": "2026-08-30T07:34:23.431906+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "684b4bed41bc180a80bd2b5d3a530944a042f4913e40d08a1930dab3439d0a51", "fetched_at": "2026-08-28T04:07:29.104416+00:00", "kind": "readme", "missing": false, "url": "https://github.com/eric-mitchell/direct-preference-optimization"}], "taxonomy_version": 1}, "health_score": {"inputs": ["days_since_push", "days_since_release", "archived"], "kind": "computed", "method": "health_v1"}, "homepage": {"kind": "observed", "observed_at": "2026-08-28T04:07:29.104416+00:00", "source": "github"}, "language": {"kind": "observed", "observed_at": "2026-08-28T04:07:29.104416+00:00", "source": "github"}, "license": {"kind": "observed", "observed_at": "2026-08-28T04:07:29.104416+00:00", "source": "github"}, "license_family": {"inputs": ["license"], "kind": "computed", "method": "license_family"}, "maturity": {"confidence": null, "enriched_at": "2026-08-30T07:34:23.431906+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "684b4bed41bc180a80bd2b5d3a530944a042f4913e40d08a1930dab3439d0a51", "fetched_at": "2026-08-28T04:07:29.104416+00:00", "kind": "readme", "missing": false, "url": "https://github.com/eric-mitchell/direct-preference-optimization"}], "taxonomy_version": 1}, "member_repos": {"kind": "observed", "observed_at": "2026-08-28T04:07:29.104416+00:00", "source": "github"}, "name": {"kind": "observed", "observed_at": "2026-08-28T04:07:29.104416+00:00", "source": "github"}, "platform": {"confidence": null, "enriched_at": "2026-08-30T07:34:23.431906+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "684b4bed41bc180a80bd2b5d3a530944a042f4913e40d08a1930dab3439d0a51", "fetched_at": "2026-08-28T04:07:29.104416+00:00", "kind": "readme", "missing": false, "url": "https://github.com/eric-mitchell/direct-preference-optimization"}], "taxonomy_version": 1}, "pushed_at": {"kind": "observed", "observed_at": "2026-08-28T04:07:29.104416+00:00", "source": "github"}, "repo": {"kind": "observed", "observed_at": "2026-08-28T04:07:29.104416+00:00", "source": "github"}, "stars": {"kind": "observed", "observed_at": "2026-08-28T04:07:29.104416+00:00", "source": "github"}, "tags": {"confidence": null, "enriched_at": "2026-08-30T07:34:23.431906+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "684b4bed41bc180a80bd2b5d3a530944a042f4913e40d08a1930dab3439d0a51", "fetched_at": "2026-08-28T04:07:29.104416+00:00", "kind": "readme", "missing": false, "url": "https://github.com/eric-mitchell/direct-preference-optimization"}], "taxonomy_version": 1}, "topics": {"kind": "observed", "observed_at": "2026-08-28T04:07:29.104416+00:00", "source": "github"}, "urls": {"kind": "observed", "observed_at": "2026-08-28T04:07:29.104416+00:00", "source": "github"}, "use_cases": {"confidence": null, "enriched_at": "2026-08-30T07:34:23.431906+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "684b4bed41bc180a80bd2b5d3a530944a042f4913e40d08a1930dab3439d0a51", "fetched_at": "2026-08-28T04:07:29.104416+00:00", "kind": "readme", "missing": false, "url": "https://github.com/eric-mitchell/direct-preference-optimization"}], "taxonomy_version": 1}, "what_it_is": {"confidence": null, "enriched_at": "2026-08-30T07:34:23.431906+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "684b4bed41bc180a80bd2b5d3a530944a042f4913e40d08a1930dab3439d0a51", "fetched_at": "2026-08-28T04:07:29.104416+00:00", "kind": "readme", "missing": false, "url": "https://github.com/eric-mitchell/direct-preference-optimization"}], "taxonomy_version": 1}, "when_to_avoid": {"confidence": null, "enriched_at": "2026-08-30T07:34:23.431906+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "684b4bed41bc180a80bd2b5d3a530944a042f4913e40d08a1930dab3439d0a51", "fetched_at": "2026-08-28T04:07:29.104416+00:00", "kind": "readme", "missing": false, "url": "https://github.com/eric-mitchell/direct-preference-optimization"}], "taxonomy_version": 1}, "when_to_choose": {"confidence": null, "enriched_at": "2026-08-30T07:34:23.431906+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "684b4bed41bc180a80bd2b5d3a530944a042f4913e40d08a1930dab3439d0a51", "fetched_at": "2026-08-28T04:07:29.104416+00:00", "kind": "readme", "missing": false, "url": "https://github.com/eric-mitchell/direct-preference-optimization"}], "taxonomy_version": 1}}, "score": {"components": {"activity": 0, "longevity": 83, "rhythm": 35}, "computed_at": "2026-09-03T02:20:16.233290+00:00", "flags": ["no_releases"], "formula": "round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)", "inputs": {"age_days": 1168, "days_push": 753, "days_rel": null, "gap_med": null, "n_releases_24m": 0}, "score": 29, "version": 2}, "staleness": {"enrichment_outdated": false, "low_confidence": false, "scrape_days": 9, "stale_scrape": false}}