Rana Maninder Singh
Lesson 2 of 8Choosing & Using AI Models

The model landscape: families, sizes, open vs closed weights

Lesson opener

In one line: Read a model as family + size + weight licence — those three fields explain more than a blog ranking.

Why it matters: A Noida team that copies "the best model" from a tweet cannot tell a 7B open-weight file from a closed-weight API, and then cannot host or budget.

Before this lesson: What an AI model actually is.

Before you start

ResourceLink
PreviousWhat an AI model actually is
NextHow to compare models
Prerequisitesaim1
Time~50 minutes

What you will learn

By the end of this lesson you will be able to:

  1. Parse a model card into family, size, and weight licence.
  2. Explain what a family is (a training lineage, not a score).
  3. Treat size (parameters) as a cost-and-hardware hint, not a quality proof.
  4. Contrast open weights (you can download the file) with closed weights (you call an API).
  5. Refuse a card that is missing licence or size when the ticket needs self-hosting.
  6. Keep brand names out of the decision table — they belong in the snapshot.

Three fields that actually travel

FieldMeaningWhat it is not
FamilyA lineage (same trainer, similar tokenizer and habits)A guarantee it wins next month
SizeRough parameter count (7B, 70B, "large")Proof it is smarter
WeightsOpen = you can download the file. Closed = you only call a hosted API"Open" is not automatically free of licence limits

A mixture-of-experts card may advertise a huge total and a smaller active count. For RAM, the active count plus the expert map both matter. For a first pass, write both numbers on the ticket if the card shows them.

WHY Family tells you what the model was trained to do. Size tells you what machine you need. Licence tells you whether legal will let you keep a copy.

WHEN Before a bake-off: fill those three fields for every candidate. Rankings come later, on your eval (aim6).

Cost. Closed-weight APIs meter per token or per request. Open-weight files have no per-token vendor invoice, but GPUs, electricity, and the engineer's time do. A "free download" is not a zero-rupee production plan.

Open vs closed is a control question

Closed weights: the vendor keeps the file. You send data out (unless they offer a private region). You cannot fine-tune the raw file unless they sell that as a product.

Open weights: you can load the file on a machine you control. The licence may still block commercial use, or demand share-alike. Read the licence field. "Open weights" is not the same sentence as "public domain."

Indian banks and hospitals often need the data to stay in a VPC. That is a weights + region decision, not a leaderboard decision.

Demo 1 — Parse a model card

Cards in this course use generic ids. Snapshot names stay out of the body.

def parse_card(card: dict) -> dict:
    required = ("id", "family", "size_label", "weights")
    missing = [k for k in required if not str(card.get(k) or "").strip()]
    if missing:
        raise ValueError("missing:" + ",".join(missing))
    if card["weights"] not in {"open", "closed"}:
        raise ValueError("weights")
    return {
        "id": card["id"],
        "family": card["family"],
        "size_label": card["size_label"],
        "weights": card["weights"],
    }

card = parse_card(
    {"id": "chat-mid-a", "family": "family-a", "size_label": "medium", "weights": "closed"}
)
print(card["family"])
print(card["weights"])
assert card["id"] == "chat-mid-a"

Expected output:

family-a
closed

Demo 2 — Self-host filter

def may_self_host(card: dict) -> str:
    if card.get("weights") != "open":
        return "refuse-closed-weights"
    if not str(card.get("size_label") or "").strip():
        return "refuse-missing-size"
    return "ok-download-then-licence"

print(may_self_host({"weights": "closed", "size_label": "large"}))
print(may_self_host({"weights": "open", "size_label": "7B"}))
assert may_self_host({"weights": "open", "size_label": ""}) == "refuse-missing-size"

Expected output:

refuse-closed-weights
ok-download-then-licence

Demo 3 — Size is not a trophy

def size_hint(size_label: str) -> str:
    label = size_label.lower()
    if label in {"7b", "8b", "small"}:
        return "laptop-or-small-gpu"
    if label in {"70b", "large", "medium"}:
        return "server-gpu-or-api"
    return "read-the-card"

print(size_hint("7B"))
print(size_hint("70B"))
assert size_hint("small") == "laptop-or-small-gpu"

Expected output:

laptop-or-small-gpu
server-gpu-or-api

Guided practice: missing licence field

def parse_card(card: dict) -> dict:
    required = ("id", "family", "size_label", "weights")
    missing = [k for k in required if not str(card.get(k) or "").strip()]
    if missing:
        raise ValueError("missing:" + ",".join(missing))
    if card["weights"] not in {"open", "closed"}:
        raise ValueError("weights")
    return dict(card)

try:
    parse_card({"id": "x", "family": "family-b", "size_label": "7B", "weights": ""})
    status = "leaked"
except ValueError as exc:
    status = str(exc)
print(status)
assert status.startswith("missing:")

Expected output:

missing:weights

Independent practice: count open cards

Deliverable: print how many cards in a list have weights == "open".

cards = [
    {"id": "a", "weights": "closed"},
    {"id": "b", "weights": "open"},
    {"id": "c", "weights": "open"},
    {"id": "d", "weights": "closed"},
]
n_open = sum(1 for c in cards if c["weights"] == "open")
print(n_open)
assert n_open == 2

Expected output:

2

Common mistake

The deliberate mistake

Symptom: legal asks "can we put this in our VPC?" and engineering answers with a blog rank.

Diagnosis: the card's weight licence was never read.

Correction: write open vs closed, then read the licence PDF, then talk hardware.

Prevention: no bake-off row without family, size, and weights.

Snapshot — checked September 2026

Names below are catalog labels on this date. They are not a ranking and they do not belong in the quiz.

Where this connects

What you can now do:

  • Parse a card into family, size, weights.
  • Filter for self-host.
  • Treat size as a hardware hint.

Next lesson: How to compare models. Six axes on a scorecard — still no leaderboard.