LibreYOLO license and provenance audit
LibreYOLO's wedge is being genuinely MIT. That only holds if every ported
file and every hosted weight has clean, documented provenance. This skill is
the audit discipline; the policy source of truth is the "Licensing policy"
section of AGENTS.md.
The hard rules (non-negotiable)
- Only MIT / Apache-2.0 (and compatibly-licensed) upstreams may be
copied, adapted, paraphrased, or derived from. GPL, AGPL, LGPL,
proprietary, unknown, or no-license upstreams may not, in any form.
- No clean-room laundering. Never rewrite, rename, or restructure
incompatibly-licensed code to obscure where it came from. A GPL function
with new variable names is still a derivative. If provenance is tainted,
the options are: re-derive from a genuinely clean source (paper, spec,
compatibly-licensed implementation) with the new provenance documented,
or drop the feature. Which option applies is the maintainer's
decision; surface it, do not pick silently.
- Contamination protocol. If you may have been exposed to or influenced
by incompatible code while working (read an AGPL repo "for reference",
pasted a snippet of unknown origin), stop, flag it explicitly to the
maintainer, and do not contribute the affected code. Flagging is never
the wrong move; quiet contribution is.
- License compatibility is non-negotiable (REVIEW.md axiom). In PR
review, a licensing doubt is a blocking finding, not a nit.
- Keep third-party CV library names out of committed text (code, docs, PR
titles/descriptions) unless a comparison is technically necessary.
Code license vs weights license (audit them separately)
They routinely differ and each can independently block:
- Code: the architecture/implementation you port. Must be MIT/Apache-2.0
(or public domain, e.g. the Darknet lineage).
- Weights: learned parameters. Carry their own license, often inherited
from training data terms (Gaze360 makes L2CS weights non-redistributable;
some upstream checkpoints are CC-BY-NC even where the code is Apache-2.0;
VisDrone training data makes a fine-tune CC-BY-NC-SA). Redistributable is
the only bar for hosting weights: Apache code + NC weights means ship the
code and host the weights with the NC license shipped verbatim, the card
tagged correctly, and a non-commercial banner leading the card (SegFormer
and
-visdrone precedents); downstream users are responsible for complying
with the weight license. Weights whose terms forbid redistribution (L2CS /
Gaze360) are never hosted.
- Datasets: gate before hosting or wiring auto-download; that gate lives
in
skills/libreyolo-upload-hf-dataset.
Quick decision table (source license, what it means here):
| Upstream license |
Port code? |
Host weights? |
| MIT / Apache-2.0 / BSD / public domain |
yes, with attribution |
yes, with LICENSE+NOTICE |
| CC-BY (weights/data) |
n/a |
yes, attribute |
| CC-BY-NC (redistributable, non-commercial) |
no |
yes — license verbatim + non-commercial banner on the card; users responsible for compliance |
| Research-only / redistribution forbidden |
no |
no (link upstream when a CDN exists) |
| GPL / AGPL / LGPL |
no |
no (weights from AGPL code are a maintainer call; ask) |
| Custom (DINOv3-style, Deci, model-specific) |
maintainer call |
if the terms clearly permit redistribution, host with the license verbatim + banner (NVIDIA SCL / SegFormer precedent); ambiguous terms are a maintainer call — document verbatim |
| Unknown / no license |
treat as all-rights-reserved: no |
no |
The four notice surfaces (what changes when)
| Surface |
Covers |
Changes when |
NOTICE (root) |
Bundled third-party source code under non-MIT licenses kept verbatim in-tree (e.g. the DINOv3 backbone under its custom license) |
You vendor non-MIT-licensed files |
THIRD_PARTY_NOTICES.txt |
Every project LibreYOLO derives or ports code from, with license text, copyright, and the LibreYOLO module that uses it |
Any new port, adaptation, or derived module |
weights/LICENSE_NOTICE.txt |
Per-family summary of weight licenses and upstreams (no weights ship in-tree; this documents the HF-hosted ones) |
New family weights, new variant, license change |
libreyolo/models/<family>/NOTICE |
Per-family attribution shipped next to the ported code (timm-derived classifiers, nafnet, pidnet, eomt, mobilesam, clip have them) |
New ported family; follow the siblings' format |
Plus per-HF-repo LICENSE + NOTICE files, owned by
skills/libreyolo-upload-hf-model / -dataset.
The audit invariant: a new ported family with no notices diff is a red
flag. The release process (Gate F in skills/libreyolo-release) checks
exactly this; catch it at PR time instead. Conversely, never patch a missing
notice silently during a release: surface it, because the missing notice may
mean the provenance was never checked at all.
Auditing a family's provenance (the checklist)
For "is family X clean?" or PR review of a new port:
- Identify the true upstream. The repo the code was actually derived
from, not the paper's official repo if those differ. Check the family's
NOTICE,
THIRD_PARTY_NOTICES.txt entry, and the conversion script header
(weights/convert_<family>_weights.py).
- Read that upstream's LICENSE at the pinned commit. Licenses change
over a repo's history; the pin matters. Watch for repos that are
"Apache-2.0" at root with GPL files vendored inside (it happens; the
RTMDet assigner incident started exactly there).
- Check sub-components separately. Backbones, assigners, tokenizers,
loss functions often have their own upstreams (a Swin backbone inside a
detector, a BERT tower inside an open-vocab model). Each needs its own
provenance line.
- Check the weights' terms, including training-data conditions
(Gaze360, ImageNet terms, NC dataset fine-tunes).
- Confirm all four surfaces (table above) carry matching entries.
- Verify attribution claims are true: "state-dict key remapping only,
learned parameters unchanged" must match what the converter actually
does.
Past incidents worth knowing (they shaped these rules): a GPL-derived
assigner was replaced by a re-port from an Apache upstream with notices
fixed; a head with unclear provenance was re-derived from an MIT source with
bitwise parity as proof; NC-licensed depth weights were flagged for hosting
against policy and escalated rather than hidden. The pattern in all three:
detect, surface, re-derive from clean source or escalate. Never quietly
rename.
When asked "can we add model X?"
Answer with the split verdict: code license (portable or not), weights
license (hostable or not), dataset story (trainable/finetunable or not), and
any custom-license sub-components. "Yes to code, no to hosting b/l weights,
s is Apache" is a normal, useful answer. Put the verdict in the issue before
any porting starts; it is the cheapest point to stop.
Related
AGENTS.md "Licensing policy": the policy this skill operationalizes.
skills/libreyolo-port-model/ section 1: the pre-port license check.
skills/libreyolo-upload-hf-model/, skills/libreyolo-upload-hf-dataset/:
per-repo LICENSE/NOTICE contracts and the dataset redistribution gate.
skills/libreyolo-release/ Gate F: the release-time notices sync check.
1---2name: libreyolo-license-audit3description: Audit and maintain LibreYOLO's licensing and provenance surfaces, and handle contamination correctly. Use when adding ported code or weights (which notice files must change), when reviewing a PR for license risk, when someone asks "can we use/host/ship X?", when a family's provenance is questioned, or when GPL/AGPL/NC-licensed material may have touched the work. Covers the four notice surfaces and when each changes, the code-vs-weights license distinction, the decision table for common licenses, the contamination protocol, and the hard rules: no clean-room laundering, surface decisions to the maintainer instead of quietly "fixing" them.4---56# LibreYOLO license and provenance audit78LibreYOLO's wedge is being genuinely MIT. That only holds if every ported9file and every hosted weight has clean, documented provenance. This skill is10the audit discipline; the policy source of truth is the "Licensing policy"11section of `AGENTS.md`.1213## The hard rules (non-negotiable)14151. **Only MIT / Apache-2.0 (and compatibly-licensed) upstreams** may be16 copied, adapted, paraphrased, or derived from. GPL, AGPL, LGPL,17 proprietary, unknown, or no-license upstreams may not, in any form.182. **No clean-room laundering.** Never rewrite, rename, or restructure19 incompatibly-licensed code to obscure where it came from. A GPL function20 with new variable names is still a derivative. If provenance is tainted,21 the options are: re-derive from a genuinely clean source (paper, spec,22 compatibly-licensed implementation) with the new provenance documented,23 or drop the feature. Which option applies is the **maintainer's24 decision**; surface it, do not pick silently.253. **Contamination protocol.** If you may have been exposed to or influenced26 by incompatible code while working (read an AGPL repo "for reference",27 pasted a snippet of unknown origin), stop, flag it explicitly to the28 maintainer, and do not contribute the affected code. Flagging is never29 the wrong move; quiet contribution is.304. **License compatibility is non-negotiable** (REVIEW.md axiom). In PR31 review, a licensing doubt is a blocking finding, not a nit.325. Keep third-party CV library names out of committed text (code, docs, PR33 titles/descriptions) unless a comparison is technically necessary.3435## Code license vs weights license (audit them separately)3637They routinely differ and each can independently block:3839- **Code**: the architecture/implementation you port. Must be MIT/Apache-2.040 (or public domain, e.g. the Darknet lineage).41- **Weights**: learned parameters. Carry their own license, often inherited42 from *training data terms* (Gaze360 makes L2CS weights non-redistributable;43 some upstream checkpoints are CC-BY-NC even where the code is Apache-2.0;44 VisDrone training data makes a fine-tune CC-BY-NC-SA). **Redistributable is45 the only bar for hosting weights**: Apache code + NC weights means ship the46 code and host the weights with the NC license shipped verbatim, the card47 tagged correctly, and a non-commercial banner leading the card (SegFormer48 and `-visdrone` precedents); downstream users are responsible for complying49 with the weight license. Weights whose terms forbid redistribution (L2CS /50 Gaze360) are never hosted.51- **Datasets**: gate before hosting or wiring auto-download; that gate lives52 in `skills/libreyolo-upload-hf-dataset`.5354Quick decision table (source license, what it means here):5556| Upstream license | Port code? | Host weights? |57|---|---|---|58| MIT / Apache-2.0 / BSD / public domain | yes, with attribution | yes, with LICENSE+NOTICE |59| CC-BY (weights/data) | n/a | yes, attribute |60| CC-BY-NC (redistributable, non-commercial) | **no** | yes — license verbatim + non-commercial banner on the card; users responsible for compliance |61| Research-only / redistribution forbidden | **no** | **no** (link upstream when a CDN exists) |62| GPL / AGPL / LGPL | **no** | **no** (weights from AGPL *code* are a maintainer call; ask) |63| Custom (DINOv3-style, Deci, model-specific) | maintainer call | if the terms clearly permit redistribution, host with the license verbatim + banner (NVIDIA SCL / SegFormer precedent); ambiguous terms are a maintainer call — document verbatim |64| Unknown / no license | treat as all-rights-reserved: **no** | **no** |6566## The four notice surfaces (what changes when)6768| Surface | Covers | Changes when |69|---|---|---|70| `NOTICE` (root) | Bundled third-party **source code under non-MIT licenses** kept verbatim in-tree (e.g. the DINOv3 backbone under its custom license) | You vendor non-MIT-licensed files |71| `THIRD_PARTY_NOTICES.txt` | Every project LibreYOLO **derives or ports code from**, with license text, copyright, and the LibreYOLO module that uses it | Any new port, adaptation, or derived module |72| `weights/LICENSE_NOTICE.txt` | Per-family summary of **weight** licenses and upstreams (no weights ship in-tree; this documents the HF-hosted ones) | New family weights, new variant, license change |73| `libreyolo/models/<family>/NOTICE` | Per-family attribution shipped next to the ported code (timm-derived classifiers, nafnet, pidnet, eomt, mobilesam, clip have them) | New ported family; follow the siblings' format |7475Plus per-HF-repo `LICENSE` + `NOTICE` files, owned by76`skills/libreyolo-upload-hf-model` / `-dataset`.7778**The audit invariant: a new ported family with no notices diff is a red79flag.** The release process (Gate F in `skills/libreyolo-release`) checks80exactly this; catch it at PR time instead. Conversely, never patch a missing81notice silently during a release: surface it, because the missing notice may82mean the provenance was never checked at all.8384## Auditing a family's provenance (the checklist)8586For "is family X clean?" or PR review of a new port:87881. **Identify the true upstream.** The repo the code was actually derived89 from, not the paper's official repo if those differ. Check the family's90 NOTICE, `THIRD_PARTY_NOTICES.txt` entry, and the conversion script header91 (`weights/convert_<family>_weights.py`).922. **Read that upstream's LICENSE at the pinned commit.** Licenses change93 over a repo's history; the pin matters. Watch for repos that are94 "Apache-2.0" at root with GPL files vendored inside (it happens; the95 RTMDet assigner incident started exactly there).963. **Check sub-components separately.** Backbones, assigners, tokenizers,97 loss functions often have their own upstreams (a Swin backbone inside a98 detector, a BERT tower inside an open-vocab model). Each needs its own99 provenance line.1004. **Check the weights' terms**, including training-data conditions101 (Gaze360, ImageNet terms, NC dataset fine-tunes).1025. **Confirm all four surfaces** (table above) carry matching entries.1036. **Verify attribution claims are true**: "state-dict key remapping only,104 learned parameters unchanged" must match what the converter actually105 does.106107Past incidents worth knowing (they shaped these rules): a GPL-derived108assigner was replaced by a re-port from an Apache upstream with notices109fixed; a head with unclear provenance was re-derived from an MIT source with110bitwise parity as proof; NC-licensed depth weights were flagged for hosting111against policy and escalated rather than hidden. The pattern in all three:112detect, surface, re-derive from clean source or escalate. Never quietly113rename.114115## When asked "can we add model X?"116117Answer with the split verdict: code license (portable or not), weights118license (hostable or not), dataset story (trainable/finetunable or not), and119any custom-license sub-components. "Yes to code, no to hosting b/l weights,120s is Apache" is a normal, useful answer. Put the verdict in the issue before121any porting starts; it is the cheapest point to stop.122123## Related124125- `AGENTS.md` "Licensing policy": the policy this skill operationalizes.126- `skills/libreyolo-port-model/` section 1: the pre-port license check.127- `skills/libreyolo-upload-hf-model/`, `skills/libreyolo-upload-hf-dataset/`:128 per-repo LICENSE/NOTICE contracts and the dataset redistribution gate.129- `skills/libreyolo-release/` Gate F: the release-time notices sync check.