Skip to content

constants

Constants for analytics calculations.

Centralized configuration values used across statistics and deletion risk analysis modules.

TOP_TAGS_LIMIT module-attribute

TOP_TAGS_LIMIT = 40

Maximum number of top tags to include in statistics.

TOP_STYLES_LIMIT module-attribute

TOP_STYLES_LIMIT = 30

Maximum number of top styles to include in statistics.

LOW_USAGE_THRESHOLD module-attribute

LOW_USAGE_THRESHOLD = 0.01

Threshold (as percentage) for flagging models with low usage.

Models with monthly usage below this percentage of category total are flagged. Example: 0.1 means < 0.1% of category usage is considered low.

PARAMETER_BUCKETS module-attribute

PARAMETER_BUCKETS = [
    (0, 3000000000, "< 3B"),
    (3000000000, 6000000000, "3B-6B"),
    (6000000000, 9000000000, "6B-9B"),
    (9000000000, 13000000000, "9B-13B"),
    (13000000000, 20000000000, "13B-20B"),
    (20000000000, 35000000000, "20B-35B"),
    (35000000000, 70000000000, "35B-70B"),
    (70000000000, float("inf"), "> 70B"),
]

Parameter count buckets as (min, max, label) tuples.

Each tuple defines a parameter range and its display label. The last bucket uses infinity to capture all larger models.