# learnables/learn2learn

A PyTorch Library for Meta-learning Research

Repository: https://github.com/learnables/learn2learn
Canonical: https://ross.abutalabs.com/products/learn2learn
Homepage: http://learn2learn.net
Language: Python
License: MIT
License Family: permissive
Topics: pytorch, maml, meta-learning, learning2learn, learn2learn, metalearning, few-shot, meta-rl, meta-descent, meta-optimization, finetuning
Last push: 2025-12-16T20:53:41+00:00

## Health v2 (maintenance only)
Score: 48/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 57, release rhythm 8, longevity 100
- inputs: {"age_days": 2582, "days_push": 260, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2893, forks 359 (observed 2026-08-28T04:07:28.542313+00:00)

## What it is
learn2learn is a PyTorch library for meta-learning research, providing utilities for few-shot task creation, high-level wrappers for algorithms like MAML and ProtoNets, and differentiable optimization tools. It includes standardized vision benchmarks and meta-reinforcement learning environments to support fast prototyping and reproducible evaluation.

## Use cases
- implement MAML for few-shot image classification
- create few-shot learning tasks from any PyTorch dataset
- run meta-reinforcement learning experiments in gym environments
- benchmark few-shot learning algorithms on Omniglot and MiniImagenet
- implement learned optimizers and meta-descent algorithms
- do parameter-efficient finetuning with LoRA and adapters
- reproduce meta-learning research results fairly

## When to choose
- you need well-tested implementations of MAML, ProtoNets, Reptile, ANIL, and related algorithms
- you want to build custom meta-learning algorithms on top of low-level differentiable cloning utilities
- you need standardized few-shot benchmarks with pretrained backbones
- you are doing meta-reinforcement learning research with PyTorch

## When to avoid
- you need a production training framework rather than a research library
- you work outside PyTorch (e.g. TensorFlow or JAX)
- you need stable, supported meta-RL environments - the gym module is being reworked
- you just want off-the-shelf pretrained models without meta-learning

## Facets
- artifact type: library
- maturity: active
- function: machine-learning, deep-learning, llm-training, data-science
- domain: machine-learning, deep-learning, computer-vision, reinforcement-learning
- platform: python, cross-platform
- tags: pytorch, meta-learning, maml, few-shot-learning, meta-reinforcement-learning, meta-optimization, finetuning, lora, benchmarks, research, gpu

## Member repositories
- learnables/learn2learn (main) score 48

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:28.542313+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:48:15.767117+00:00, confidence not recorded.
  - readme: https://github.com/learnables/learn2learn (fetched 2026-08-28T04:07:28.542313+00:00, sha f67ea568ab23)
  - homepage: http://learn2learn.net (fetched 2026-08-29T09:50:28.736333+00:00, sha 8373ea76a782)
  - site_page: https://learn2learn.net/docs/learn2learn (fetched 2026-08-29T09:50:28.738862+00:00, sha bc574ccb2003)
  - site_page: https://learn2learn.net/docs/learn2learn.data (fetched 2026-08-29T09:50:28.740518+00:00, sha 0924d8429278)
  - site_page: https://learn2learn.net/docs/learn2learn.algorithms (fetched 2026-08-29T09:50:28.742689+00:00, sha 5b694f8cdc44)
  - site_page: https://learn2learn.net/docs/learn2learn.optim (fetched 2026-08-29T09:50:28.744833+00:00, sha 3791344d9d16)
  - site_page: https://learn2learn.net/docs/learn2learn.nn (fetched 2026-08-29T09:50:28.747365+00:00, sha d7e71ea75bdf)
  - site_page: https://learn2learn.net/docs/learn2learn.vision (fetched 2026-08-29T09:50:28.750068+00:00, sha 95004420acdd)
  - site_page: https://learn2learn.net/docs/learn2learn.gym (fetched 2026-08-29T09:50:28.752583+00:00, sha a9d2c8b2283d)
  - registry_pypi: https://pypi.org/pypi/learn2learn/json (fetched 2026-08-29T09:50:28.755975+00:00, sha 7f17799b35f9)
- Data as of 2026-08-30T08:39:29.467469+00:00.
