DEV Community

technonotes-hacker
technonotes-hacker

Posted on

AI - Weights

Model

  • A model is a files or folder , doing nothing. Until you bring something to run it.
  • Not an APP.

Parameters

  • When the say , " Trained Model " means --> Weights ( billions of number the model learnt ) , Config ( how to wire those numbers toger ) & Tokenizer ( Turns to text ).

Weights

  • Billion numbers with no instructions.
  • Safe container for a gaint grid of numbers.

Config

  • These are the instructions.
  • Small file describes the architecture.
  • How the numbers flow from one layer to another layer.

Tokenizer

  • Translator between human text and model math.
  • Spliting any sentence into chunks.
  • Tokenizer as to match the weights.
  • what type of transalation ? --> I type a sentence , what happens step by step --> Tokenizer ( chops the sentence into tokens ) i.e Text --> Tokens --> ID numbers --> Vevtors --> Math --> Vectors --> ID --> Text.
  • The model predicts the next token.
  • One token at a time.

What a model really is ?

  • Weights + Tokenizer + Config
  • You add the runtime ( transformers ,vLLM Engine , llama.cpp , Ollama ) & Hardware ( GPU ).

How it works in Office ?

  • NGC Catalog - Nvidia --> NVIDIA GPU Cloud , Its a hub and cloud platform providing GPU-optimized software, containers, pre-trained models, and SDKs for artificial intelligence (AI), machine learning (ML), and high-performance computing (HPC).
  • Model is downloaded and kept in Harbor and made as latest.
  • The model is an empty mathematical machine, and the model weights are the precise numbers that make it work.
  • Model --> network of billion blank mathematical equations , at this stage , the model cannot think, read, or reply. It is just empty logic.
  • Model Weights ( Fixed Number ) --> he computer reads the 10.03 GB file of pre-calculated decimal numbers and inserts those exact numbers into the blank equations.
  • Result --> When a user types a prompt, the system multiplies the user's words by these exact weight numbers. The numbers mathematically route the data through the network to calculate the exact words for the answer.

LLM

  1. Private Model --> Chatgpt , Claude
  2. Open Source --> llama , Mistral , Deepseek , Qwen
  • These are called Open Weights.
  • If any models are released , then they will release the "Model Weights" like Binary File or pkl file.
  • Data Card --> what type of data is the model is trained.
  • Training Data
  • Codebase ( Training / Inference )
  • License

Notes

  • Hugging face --> Common repo for Open Source Model.
  • If yon want to fine tune the model, how ? Unsloth.
  • Even using Transformer --> you can fine tune the model.
  • A pickle file is a binary file format generated by Python's built-in pickle module used to serialize complex Python objects and data structures into a byte stream for storage or transmission.

Top comments (0)