Sharda University

Artificial Intelligence 102

Specialized for ECE

Lecture 2 · Models, apps and how you access them
Lecture 2 · Today

Just enough to use it well. Depth comes later.

TODAY
The common words: model, weight, parameter, 7B, open weight, API.
NOT TODAY
How the inside works. We open that box in later lectures.
YOUR SHEET
Some words move from “heard it” to “can explain it” by the end of this hour.
2.1 · What you already use

What happens when you type into ChatGPT

01 · YOU
You type a question
What is a MOSFET?
→
02 · INTERNET
The text goes to a server
Your phone sends it to the company’s data centre.
→
03 · DATA CENTRE
A model runs on GPUs
Large computers read your text and start the reply.
→
04 · BACK TO YOU
The reply comes word by word
A MOSFET is a voltage-controlled
Your phone does not think. It only sends your text and shows the reply. The work happens on a model far away.
Magic-killer

Chat apps are shells around a model

When you talk to ChatGPT you are talking to a model. ChatGPT is the app wrapped around it. The model is the brain.

2.1 · Shell and model

What is actually in front of you

YOU SEE
The shell
chatgpt.com, claude.ai, the Gemini app — text box, history, login, buttons.
→
SENDS
A request
Your text, plus the conversation so far, over the internet.
→
DOES THE WORK
The model
A file of learned numbers, running on someone else’s GPUs.
The model dropdown at the top of the chat window? That is you swapping the brain inside the shell.
2.2 · What is a model

A model is a file of learned numbers

A large file of numbers — the weights. The computer uses these numbers to make the prediction.
Nobody typed in its behaviour. It was trained: the numbers were changed again and again on data until the output was right.
Next: what these numbers are and what they do.
ON DISK
llama-3.2-3b.gguf
2.3 GB
llamamodel family (made by Meta) 3.2version 3b3 billion learned numbers .gguffile type, like .mp3 or .pdf
That is the whole model. One file. In a later lecture you download one yourself.
2.2 · Everything is numbers

Computers only work with numbers

A computer can only do arithmetic. So text, images and sound must first become numbers.
TEXT
Hi!
→
7210533
Each character has an ID number: H = 72, i = 105, ! = 33.
IMAGE
→
210 65 47232 154 44244 211 9458 111 176…
A grid of pixels. Each pixel = red, green, blue, each from 0 to 255.
SOUND
→
0.540.75−0.46−0.750.460.75…
The ADC samples the mic voltage: 44,100 numbers every second.
SENSOR
LM35
→
0.31
A temperature sensor gives a voltage: 0.31 V means 31 °C.
So a model takes numbers in, does maths, and gives numbers out.
2.2 · Weights and parameters

A weight is one learned number

y = w·x + b
INPUT x = 2 × w w = 0.5 + b b = 1 OUTPUT y = 2 w and b were not typed in by a person. Training found them.
Weight w
The multiplier. How strongly an input counts.
Bias b
The offset. Shifts the result up or down.
Parameters
All the learned numbers: weights + biases. In normal talk, “parameters” ≈ “weights”.
2.2 · ECE analogy

You already know weights: FIR filter taps

x[n] z⁻¹ z⁻¹ z⁻¹ × h₀× h₁× h₂× h₃ Σ y[n] h₀ … h₃ = coefficients = weights
IN A FILTER
You choose the coefficients. A 4-tap filter has 4 of them.
IN A MODEL
The same multiply-and-add. Training chooses the numbers. There are billions of them.
One knob = one number. The knobs are the model. Change them and the behaviour changes.
2.2 · A tiny model, worked example

A tiny model: should the cooling fan turn on?

INPUTSWEIGHTSINPUT × WEIGHT
Temperature50 °C
→
× 0.5
→
25
CPU load60 %
→
× 0.2
→
12
sum = 25 + 12 + (−30) = 7
Rule: if sum > 0, fan ON.
7 > 0
→
FAN ON
Three learned numbers: w₁, w₂ and b. These values came from training (next slide).
TRY IT · MOVE THE SLIDERS
Temperature50 °C
CPU load60 %
Weight w₁ (temperature)0.5
Weight w₂ (CPU load)0.2
Bias b−30
2.2 · What training does

Training: nudge a weight until the answer is right

1 · ONE EXAMPLE FROM DATA
Temperature 40 °C
CPU load 90 %
Correct answer: fan ON
→
2 · MODEL TRIES, w₂ = 0.1
0.5×40 + 0.1×90 − 30
= 20 + 9 − 30
= −1 → fan OFF
Wrong. It should be ON.
→
3 · NUDGE w₂ UP TO 0.2
0.5×40 + 0.2×90 − 30
= 20 + 18 − 30
= 8 → fan ON
Right.
Real training does this for every weight, on millions of examples. The computer does the nudging, not a person.
Training = finding good values for the weights.
A big model does the same thing with billions of weights.
2.3 · Parameter counts

What “7B” and “70B” actually mean

M = million, B = billion. 7B = seven billion learned numbers in the file.
110MBERT-base (Google, 2018)
1.5BGPT-2 (OpenAI, 2019)
8BLlama 3.1 8B — runs on a laptop
70BLlama 3.1 70B — needs a workstation
405BLlama 3.1 405B — needs a server
1T+Largest open models today (next slide)
More parameters
Usually more capable: better at long instructions and rare facts.
…but slower and costlier
More numbers to store and multiply for every word.
Bigger is not automatically better. Picking a size is an engineering decision.
2.3 · Scale · published sizes and outside guesses, Oct 2026

How big are the big ones?

PUBLISHED BY THE MAKER · open-weight models
Llama 3.1 405B · Meta
405B
Kimi K2 · Moonshot
1T · 32B
DeepSeek V4-Pro
1.6T · 49B
Qwen3.8 flagship · Alibaba
2.4T · 95B
Kimi K3 · Moonshot
2.8T · 104B
GUESSED BY OUTSIDERS · closed models · companies do not publish sizes
Claude 3.5 Sonnet · Anthropic
Microsoft research paper, Dec 2024
≈175B est.
GPT-4o · OpenAI
Microsoft research paper, Dec 2024
≈200B est.
GPT-4 · OpenAI
leaks, 2023 (SemiAnalysis, G. Hotz)
≈1.8T est.
Gemini 3 Pro · Google
one analyst, Nov 2025 (LifeArchitect)
≈3T est.
total active per word estimate — not confirmed by the company No public guess yet for GPT-6, Claude 5.5 or Gemini 4.
2.3 · Families & tiers · Oct 2026

One family, several size points

CLAUDE TIER
CHARACTER
USE IT WHEN
Haiku
Smallest, fastest, cheapest
Many simple jobs, quick answers
Sonnet
Balanced everyday model
Most daily tasks and most of this course
Opus
Large, strong reasoning
Hard problems where a wrong answer costs a lot
Fable
Top tier, above Opus, most costly
Long, difficult jobs that run for hours
Same idea elsewhere: OpenAI has GPT-6 Luna, Sol and Astra; Google has Gemini Flash and Gemini 4 Argon. Picking a tier is a cost-versus-capability trade, like choosing a component grade.
2.3 · Memory

How much memory does a model need?

memory ≈ parameters × bytes per parameter
+ some extra for the conversation
SIZE
FP16 · 2 B
8-BIT · 1 B
4-BIT · ~0.5 B
RUNS ON (4-BIT)
1B
2 GB
1 GB
~1 GB
A phone
7B
14 GB
7 GB
~4–5 GB
A normal laptop
30B
60 GB
30 GB
~18–20 GB
A gaming GPU or 32 GB Mac
70B
140 GB
70 GB
~40 GB
A workstation
405B
810 GB
405 GB
~230 GB
A multi-GPU server
Fewer bits per number = quantization, the same idea as in your ADC. In a later lesson you will run one of these on your own machine.
2.3 · Cost

If big models need so much hardware, why is it cheap for us?

ONE GPU CLUSTER GPUGPUGPUGPU same model, shared Student, DelhiEngineer, PuneDoctor, Chennai Coder, BerlinTeacher, Lagos… millions more 2 s0.5 s3 s1 s0.8 s…
YOU RENT A SLICE
One reply uses the GPUs for milliseconds to a few seconds. You do not buy the hardware.
THEY SHARE IT
The same GPUs serve a very large number of users at the same time.
EACH ONE PAYS FOR USE
That is the business model. ECE view: time-division multiplexing on one trunk line.
2.3 · Cost

The model does not remember your chat

Every time you press send, the app sends the whole conversation to the model again.
You send msg 1
m1
1 piece sent
You send msg 2
m1r1m2
3 pieces sent
You send msg 3
m1r1m2r2m3
5 pieces sent
m = your messager = model replyYou pay for every piece, every time.
This is why a very long chat gets slower, costs more, and can get worse. Start a new chat for a new topic.
2.3 · Cost · API prices, Oct 2026

What it actually costs

A token is a piece of a word. 1 million tokens ≈ 750,000 English words.
MODEL · USD PER 1M TOKENS
INPUT
OUTPUT
GPT-6 Luna · OpenAI
$0.10
$0.50
Claude Haiku 5.5 · Anthropic
$0.10
$0.50
Gemini 3.8 Flash · Google
$0.75
$3.75
DeepSeek V4-Pro · open weight
$1.32
$3.96
GPT-6.1 Sol · OpenAI
$2
$10
Claude Sonnet 5.5 · Anthropic
$2
$10
Gemini 4 Argon · Google
$2
$10
Claude Opus 5.5 · Anthropic
$4
$20
GPT-6 Astra · Claude Fable 5.1
$10
$50
ONE CHAT MESSAGE · SONNET 5.5
in  1,000 tok × $2/1M  = $0.002
out  500 tok × $10/1M = $0.005
$0.007 ≈ 67 paise
Same message on GPT-6 Luna: about 3 paise. Rate used: $1 = ₹95.
APP SUBSCRIPTIONS
ChatGPT Plus and Claude Pro: about $20 a month (₹1,999–2,399 in India). A flat fee for the same models.
Output costs more than input. Prices from each maker’s pricing page; Gemini prices are launch prices; DeepSeek is its peak-hour rate.
2.4 · Access

Three ways to reach a model

A · THE COMPANY’S APP
Open the website or app
chatgpt.com
claude.ai
gemini.google.com
Easiest. You use it today.
B · AN API
Call it from your own code
Your program sends text to the company’s server and gets the reply back. You pay per use.
For building your own tools. Later lecture.
C · RUN IT LOCALLY
Download the weights
The model file runs on your own laptop. No internet needed.
Only possible with open-weight models. Later lecture.
Door C only works if the maker gives you the file. That is what “open” and “closed” mean.
2.4 · Openness

Closed models: you rent the access

GPT, Claude, Gemini and Grok are closed. Only the company that trained them can run them.
The weight file never leaves their servers. You reach it through their app or their API (doors A and B), and you pay per use.
Can you download the weights?No
Can you run it offline?No
Does your data leave your machine?Yes
Is it usually the most capable?Yes, today
2.4 · Openness

Open-weight models: the file is yours

Llama, Qwen, DeepSeek, Mistral, Kimi and Gemma publish the weight file. You download it and run it on your own system.
The only limit is whether your machine can hold that many numbers — remember the memory table.
Which models your laptop can run: you find out yourself in a later lecture.
Can you download the weights?Yes
Can you run it offline?Yes
Does your data leave your machine?No
Can you modify or fine-tune it?Yes
2.4 · Openness

“Open weight” is not “open source”

OPEN WEIGHT
You get the numbers
You can run it, ship it, fine-tune it. You cannot rebuild it — the training data and the recipe stayed private.
Most “open” models you will meet are this.
TRULY OPEN SOURCE
You get the recipe too
Weights, training data, training code, evaluation. Someone else could rebuild the model from scratch.
Rare.
The ECE parallel: open weight is a datasheet plus a shipped chip. Open source is the full mask set.
2.4 · The main makers · as of Oct 2026

Who makes which model, and where you use it

COMPANY
MODEL FAMILY
OPEN?
WHERE YOU USE IT
OpenAI
GPT-6 (Luna, Sol, Astra)
Closed
ChatGPT
Anthropic
Claude Haiku, Sonnet, Opus 5.5 · Fable 5.1
Closed
claude.ai, Claude app
Google
Gemini 4 Argon, Gemini Flash · Gemma 4 is open
Closed
Gemini app
Meta
Muse Spark · Llama, Muse Glimmer
Mixed
Meta AI, WhatsApp, Instagram
xAI
Grok 4.7
Closed
grok.com, X
DeepSeek
DeepSeek V4 (Pro, Flash)
Open weight
DeepSeek app
Alibaba
Qwen3.8
Open weight
Qwen app
Mistral
Mistral Medium 3.5, Mistral Large
Open weight
Le Chat
Moonshot
Kimi K3
Open weight
kimi.com
Version numbers change every few months. Learn the pattern: maker → family → open or closed → app.
2.4 · More doors · as of Oct 2026

Apps where you pick the model yourself

Perplexity
Search with sources. Paid plans let you pick GPT, Claude or Gemini.
OpenRouter
One account, hundreds of models from many makers. Has a chat page.
T3 Chat
A fast chat app with a long model list.
Poe
Chat with many models and bots in one app.
GitHub Copilot
Coding help in your editor. Model picker: Claude, GPT, Gemini, Grok and more.
Cursor
A code editor built around AI. You choose the model.
LM Studio · LOCAL
A chat app on your own laptop. You pick an open-weight file and it runs offline. Door C.
Same models, different shells. The shell is a choice. So is the model.
2.5 · Before you use it

Interpolation that looks like reasoning

STRONG
Rephrasing, summarising, translating
Boilerplate code and common patterns
Explaining well-documented concepts
Anything with a million similar examples online
SHAKY OR WORSE
Long exact arithmetic
Precise citations and part numbers
Truly new problems with no similar example
Knowing that it does not know
Fluency and accuracy are separate things. Sounding sure is not the same as being correct.
2.5 · Hallucination

A model will invent a datasheet value and sound completely sure

Today you only need to see it happen. Why it happens comes in a later lecture — and it is not a bug that someone forgot to fix.

THE RULECheck every number, part number and citation against the datasheet or a real source.
Activity · 5–8 min, in pairs

Break the chatbot

ATTACK 01
Math traps
Long multiplication, letter counting, unit conversions with a twist.
ATTACK 02
Fake citations
Ask for papers on a niche topic, then try to find them.
ATTACK 03
Invented part numbers
Ask for the pinout of an IC that does not exist. Watch it answer anyway.
Optional homework: a one-page map — great at / shaky at / fails at — with a screenshot for every claim.
Check yourself

Point at any AI app and answer three questions

01
Which model is behind this?
02
Is it open or closed?
03
Why would I pick it over the alternative?
Take this home

The brain is portable

ChatGPT and Claude are shells. The same model can go into your own app, for your own use case.

One model
→
ChatGPT / claude.ai
A WhatsApp bot for your club
A datasheet reader for your lab
Your idea
Next lecture · Agents and harnesses: how a model starts to do work, not only talk.