transformer_lens.tools.model_registry.authorship module¶
Authorship of unsupported architectures, and organizations that look like preferred authors.
An architecture’s publishers are the Hub namespaces hosting its checkpoints. Its authors are the publisher with the most downloads and the publisher with the oldest repo. The two usually coincide; when they differ either can be the originator (a popular re-upload can lead downloads; a mirror, or a repo created empty and filled later, can predate the official one), so both are credited.
Organization gaps are non-preferred authors whose footprint in the architectures they author matches the typical preferred author’s: at least the median preferred author’s downloads and likes. Downloads alone admit automated pulls; likes alone admit hype.
- transformer_lens.tools.model_registry.authorship.architecture_authors(gap: dict) → list[str]¶
Namespaces credited with a gap architecture: top publisher, then earliest if different.
- transformer_lens.tools.model_registry.authorship.build_organization_gaps_report(gaps: list[dict], scan_info: dict | None = None, generated_at: str | None = None, preferred: Iterable[str] | None = None) → dict¶
Rank non-preferred authors of gap architectures that measure up to preferred authors.
- transformer_lens.tools.model_registry.authorship.is_preferred_author(author: str, preferred: Iterable[str] | None = None) → bool¶
Whether a Hub namespace is a preferred author (case-insensitive).
- transformer_lens.tools.model_registry.authorship.merge_publishers(old: Iterable[dict], new: Iterable[dict]) → list[dict]¶
Combine publisher records from two scrape passes of one architecture.
- transformer_lens.tools.model_registry.authorship.namespace_of(model_id: str) → str | None¶
Hub namespace of a repo id, or None for a legacy un-namespaced id.
- transformer_lens.tools.model_registry.authorship.record_publisher(publishers: dict[str, dict], model_id: str, downloads: int, likes: int, created_at: datetime | None) → None¶
Fold one scanned model into its architecture’s per-publisher tallies.
- transformer_lens.tools.model_registry.authorship.top_publishers(publishers: Iterable[dict]) → list[dict]¶
The MAX_PUBLISHERS most-downloaded publishers, plus the earliest one.