Lesson 141 — Advanced

Choosing a Multimodal Model

Sahi model chunna ab sirf "sabse accha benchmark wala" sawaal nahi hai — modalities, pricing units, context cost, latency aur privacy sab ek saath decide karte hain. Is lesson mein hum ek shortlist-plus-own-data-test ka tareeka banayenge jo har candidate pe same chalta hai.

⏱ 10 min• Advanced• Cross-modal Search & Retrieval

Modality se shuru karo

Kya hai?

Model choose karna matlab apne task ki modality list (kya input, kya output) se shuru karke candidates ko shortlist karna, phir unhe apne data pe test karke final karna. Ek hi benchmark score se decision nahi banta.

Kab kaam aata hai?

Naya multimodal feature shuru karte waqt, monthly bill surprise karte waqt, ya jab koi model apni language/format pe galat chalta ho. Aur har modality ke liye decision alag lena padta hai.

Kahan milta hai?

Model cards aur pricing pages, provider docs, aur tumhare apne eval harness mein. Ek spreadsheet: rows = candidates, columns = modalities, cost, latency, privacy.

Pehla sawaal hamesha ye hota hai: input mein kya jaana chahiye aur output mein kya aana chahiye. Ye list hi aadhe candidates hata deti hai — kuch models image lete hain par video nahi, kuch audio input lete hain par output text hi hai, aur kuch jobs ke liye dedicated managed services hain jo general model se behtar chalti hain.

Decision rule: Pehle modality support (hard filter), phir quality apne eval pe, phir cost/latency/privacy. Benchmark se sirf shortlist banti hai — final decision hamesha apne data se hota hai.

Pricing aur context cost

# Multimodal cost ka hisaab — text ke alawa bhi units hote hain
def turn_cost(images=0, audio_min=0, out_tokens=0, rate=None):
    c = 0.0
    c += images * rate["per_image"]        # resolution ke hisaab se bhi badal sakta hai
    c += audio_min * rate["per_audio_min"]  # silence bhi count hota hai
    c += out_tokens * rate["per_out_token"]
    return c

# Context window bhi image leti hai:
# 1 full-res screenshot = badi slice of window
# 5 screenshots = instruction + history + tool outputs squeeze
Common surprise: "Text sasta hai, media free lagega" wala assumption tootta hai pehle bill pe. Per-image/per-minute units aur resolution-dependent tokens milkar asli number bante hain — vendor demo pricing pe mat hisaab karo.

Latency by modality aur privacy

Har candidate ke latency ko stages mein todo — upload, prefill, first token/first audio, full completion. Sirf average dekh ke user experience ka andaza nahi lagta; p95 pe dekho, kyunki worst call hi yaad rehti hai.

Interview line: Privacy-first constraints (voice consent, face data, medical/legal scans) sabse pehle decide karo — wo shortlist hi chhoti kar deti hai, phir quality aur cost ka round chalega. Ulta kiya toh rework pakka.

API vs self-host vs managed services

Cost lens: Self-host ka break-even volume, skills aur hardware se aata hai — chhote scale pe API sasta, predictable high use pe self-host. Apna calculation karo, kisi aur ke blog numbers pe nahi.

Shortlist, phir apne data pe test

# Shortlist -> own-data test (2-3 candidates, exactly same harness)
cases = load_cases("eval/images") + load_cases("eval/audio")

def score(model, cases):
    hits, cost, latency = 0, 0.0, []
    for c in cases:
        r = model.ask(c.input, c.question)
        hits += int(judge(r, c.expected))
        cost += c.price(model)
        latency.append(r.ms)
    return {"acc": hits / len(cases), "cost": cost, "p95": p95(latency)}

for m in candidates:
    print(m.name, score(m, cases))
# public benchmarks aur demo clips: sirf shortlist tak
Final rule: Do-teen shortlisted candidates, apna data, ek harness. Agar koi vendor apne benchmark numbers ke alawa apne data pe test hi nahi karne deta, toh usse decision lo hi mat.

Exercise

Question: Model selection ka pehla hard filter kya hai — modality support ya vendor ka logo?

Question: Image ka token cost kis cheez pe depend karta hai — file size (KB) ya resolution?

Question: Streaming voice evaluation mein sabse important metric kaunsi hai — total time ya time to first audio?

Question: Ek narrow kaam (jaise document OCR) ke liye cloud ki purpose-built service ko kya kehte hain? (ek shabd)

Common mistakes

Desi example: Doctor ki prescription, seedhi dawai nahi

Doctor seedha "best medicine" nahi likhta — pehle symptom (modality), phir patient ki history (privacy), phir budget aur generic-vs-brand (API vs self-host) dekhta hai, phir chhota test. Tum bhi wahi karo model selection mein:

text
symptoms (modalities) -> filter -> options -> apne test cases -> final
inputs: image / audio / video?   outputs: text / audio?
constraints: privacy > quality > cost (apne case ke hisaab se)
benchmark scores = sirf shortlist, final prescription apne test se
Interview angle — yahan se sawaal aate hain
  • Q: Multimodal model selection ka framework kya hai? — Modality list se hard filter, phir apne data pe quality eval, phir cost/latency/privacy compare.
  • Q: Multimodal pricing text se kyun alag hai? — Per-image aur per-audio-minute units, resolution-dependent image tokens — media volume bill chalata hai.
  • Q: Ek image context window ko kaise affect karti hai? — Resolution-dependent tokens jo window budget se khaate hain; kuch screenshots hi instructions/history squeeze kar dete hain.
  • Q: API vs self-host kaise decide karoge? — Volume, skills aur privacy: chhote scale pe API, steady high volume + ops capacity pe self-host — per modality alag-alag.
  • Q: Vendor ke benchmark numbers kab ignore karoge? — Jab tak apne cases pe khud test na kar lo; demos hamesha best-case hote hain.
Lesson complete?

Model selection ka framework ready — modality filter, pricing math, latency/privacy constraints aur own-data eval sab clear. Agla lesson — Deep Research & Long-Horizon Scenarios — mein dekhenge ek lambi research task ko cited, structured report tak kaise le jaate hain.

Popular courses: Data Science Course in Lucknow · AI Course in Lucknow · Python Course in Lucknow · Power BI Course · Data Analytics Course