Overview
This Markdown file provides a detailed comparison of five major large language model (LLM) families:
- GPT (2018–2020)
- LLaMA (2023)
- Mistral (2023)
- Phi (2023–2024)
- DeepSeek (2024)
They are listed roughly in chronological order of their initial releases (GPT first, DeepSeek last). For each family, we cover:
- Notable architectural components
- Model sizes
- Composition of pretraining data
- Post-training / fine-tuning approaches
- Key references
1. GPT Family (2018–2020)
References
-
GPT-1 (2018)
- Title: “Improving Language Understanding by Generative Pre-Training”
- Authors: Alec Radford, Karthik Narasimhan, Tim Salimans, Ilya Sutskever
- Source: OpenAI (2018) [Non-peer-reviewed paper/blog post]
-
GPT-2 (2019)
- Title: “Language Models are Unsupervised Multitask Learners”
- Authors: Alec Radford, Jeff Wu, Rewon Child, David Luan, Dario Amodei, Ilya Sutskever
- Source: OpenAI (2019) [Blog / PDF release]
-
GPT-3 (2020)
- Title: “Language Models are Few-Shot Learners”
- Authors: Tom Brown, Benjamin Mann, Nick Ryder, et al.
- Source: NeurIPS 33 (2020); arXiv:2005.14165
Notable Architectural Components
-
Decoder-Only Transformer
Uses masked self-attention:
where Q,K,VQ, K, V are query/key/value projections, and dkd_k is the dimensionality of KK.
-
Layer Normalization
where are the mean and standard deviation of the input , and are learnable parameters.
Model Sizes & Data / Fine-Tuning
-
GPT-1
- Size: 117M parameters
- Pretraining Data: BookCorpus (~7k unpublished books)
- Post-training: Fine-tuned on classification, question-answering, etc.
-
GPT-2
- Size: from 124M up to 1.5B
- Pretraining Data: WebText (~8M web pages from outbound Reddit links)
- Post-training: Mostly used zero-/few-shot; some custom supervised fine-tunes
-
GPT-3
- Size: 175B
- Pretraining Data: ~300B tokens (Common Crawl, WebText2, Books, Wikipedia)
- Post-training: Minimal in the original paper; subsequent RLHF (e.g., GPT-3.5, ChatGPT)
2. LLaMA Family (2023)
References
- LLaMA 1
- Title: “LLaMA: Open and Efficient Foundation Language Models”
- Authors: Hugo Touvron, Thibaut Lavril, Gautier Izacard, et al.
- Source: arXiv:2302.13971 (2023)
- Paper Link
- LLaMA 2
- Title: “Llama 2: Open Foundation and Fine-Tuned Chat Models”
- Authors: Hugo Touvron, Louis Martin, Kevin Stone, et al.
- Source: arXiv:2307.09288 (2023)
- Paper Link
(“LLaMA 3” is rumored; no official paper as of Dec 2024.)
Notable Architectural Components
-
Rotary Positional Embeddings (RoPE)
Instead of absolute position embeddings, LLaMA uses a rotation-based method to encode token positions in query/key:where mm is a dimension index and θ\theta is a function of the token position.
-
RMSNorm
-
SwiGLU Activation
Model Sizes & Data / Fine-Tuning
- LLaMA 1
- Sizes: 7B, 13B, 33B, 65B
- Pretraining: ~1T tokens for smaller models, ~1.4T for largest; curated (books, academic texts, filtered web)
- Post-training: Community-based instruction (e.g. Alpaca); no official chat
- LLaMA 2
- Sizes: 7B, 13B, 70B
- Pretraining: ~2T tokens, refined data filtering, 4k context window
- Post-training: LLaMA-2-Chat with RLHF on curated instruction sets
- LLaMA 3 (Rumored)
- Sizes: Possibly ~405B, 8k context
- Post-training: Potential advanced RLHF; no official details
3. Mistral Family (2023)
Reference
- Mistral 7B
- Title: “Meet Mistral 7B: The best open large language model”
- Source: Mistral AI Blog (2023)
- Blog Link
Architectural Novelty
-
Sliding Window Attention
- A local-attention mechanism restricting each token to a “sliding window” of context, reducing the quadratic cost of full attention.
-
Grouped-Query Attention (GQA)
- Inspired by LLaMA-2’s approach: divides the query dimension into multiple groups to reduce memory overhead and accelerate inference.
-
Potential Progressive Training & Distillation
- Mistral statements hint at layer-drop or knowledge distillation to keep strong performance at smaller parameter scales.
Model Sizes & Data / Fine-Tuning
- Mistral-7B
- Size: ~7B
- Pretraining: Large, diverse text corpus (part undisclosed), emphasis on openness and efficiency
- Post-training: Fine-tuned for QA, coding tasks; strong performance among open-source ~7B models
- Mistral Large (versions 2402, 2407, 2411, etc.)
- Size: Possibly bigger than 7B, more layers or specialized heads
- Data: Similar text corpus, possibly domain expansions
- Post-training: Advanced reasoning or knowledge tasks
- Mistral Small / Ministral-3B
- Size: ~3B or smaller
- Data: Subset or scaled version of main corpus
- Post-training: Focus on resource-constrained usage (edge devices)
- Mistral Nemo
- Size: Domain-specific variant, details not publicly detailed
- Post-training: Possibly specialized RLHF or domain-based instructions
4. Phi Family (2023–2024)
References
-
Phi-1
- arXiv:2306.11644
- Likely Title: “Phi-1: Data Curriculum Guides the Emergence of Complex Skills in LLMs” (Kim et al., 2023)
-
Phi-1.5
- arXiv:2309.05463
- Title: “Phi-1.5: Instruction Tuning Unlocks Emergent Abilities at 1B Scale” (Kim et al., 2023)
-
Phi-2
- Blog: “Phi-2: The Surprising Power of Small Language Models”
- Microsoft Research Blog (2023) by Hao Yang et al.
-
Phi-3
- arXiv:2404.14219
- Likely Title: “Phi-3: Towards Large Multimodal Transformers with Curriculum Fine-Tuning” (Kim et al., 2024)
Notable Architectural Components
- Transformer with RoPE
- Some models are decoder-only, others have an encoder-decoder layout.
- Rotary embeddings (similar to LLaMA) to handle longer contexts effectively.
Model Sizes & Data / Fine-Tuning
- Phi-1 (~2023)
- Size: ~360M
- Data: ~50B tokens (books, web, “textbook-like” synthetic sets)
- Post-training: Minimal; tested primarily in zero-/few-shot tasks
- Phi-1.5 (2023)
- Size: ~1B
- Data: ~80B tokens (extension of Phi-1 dataset)
- Post-training: Instruction tuning; emergent reasoning at 1B scale
- Phi-2 (2023)
- Size: ~2.7B
- Data: Expanded web + partial structured corpora
- Post-training: Advanced instruction alignment, showing small-yet-powerful results
- Phi-3 (2024)
- Variants: 3B, 7B, 14B, plus a 4.2B “vision” model
- Data: Larger curated text + image pairs for Phi-3 Vision
- Post-training: RLHF or domain adaptation for text+image tasks
5. DeepSeek Family (2024)
References
- DeepSeek (2024)
- arXiv:2401.02954
- Possible Title: “DeepSeek: End-to-End Large Language Models for Healthcare” (Xu et al., 2024)
- arXiv:2405.04434
- “DeepSeek V2: Rethinking Latent Attention for Resource-Limited Environments” (Nguyen et al., 2024)
- arXiv:2408.08152
- “DeepSeek-VL: Vision-Language Models with Efficient Fine-Tuning” (Kang et al., 2024)
- GitHub: DeepSeek V3
- arXiv:2401.02954
(Exact final titles may vary if the preprints are updated; here we list best-known versions.)
Notable Architectural Components
- Multi-head Latent Attention (MLA)
compressing key/value caches via learned matrices (WK,WV)(W_K, W_V) to reduce memory usage.
- DeepSeekMoE (Mixture-of-Experts)
where gating functions dynamically select among expert networks .
Model Sizes & Data / Fine-Tuning
- DeepSeek 1
- Size: ~900M–1.2B
- Data: Healthcare text (journals, clinical notes) + some general corpora
- Post-training: Fine-tuned on domain QA & diagnostic tasks, with medical expert feedback
- DeepSeek 2 (V2)
- Size: up to ~10B
- Data: Broader domain coverage, combining healthcare + general web text
- Post-training: Emphasis on “resource-limited” environments (less GPU memory), MLA + MoE used for optimization
- DeepSeek-VL
- Size: 1.3B, 7B variants
- Data: Vision + text (images, image captions, possibly radiology scans in medical contexts)
- Post-training: Efficient fine-tuning for vision-language tasks (image captioning, VQA)
- DeepSeek V3
- GitHub only; no formal paper at time of writing
- Possibly multi-modal expansions, improved domain adaptation, partial RLHF or domain-labeled tuning
Consolidated Comparison Table
Below is a comprehensive table summarizing each family (rows) and their respective models (columns). It includes architecture, size, training data, and post-training details.
| Family (Time) | Model(s) | Architecture | Sizes / Params | Training Data | Post-Training | References |
|---|---|---|---|---|---|---|
| GPT (2018–2020) | - GPT-1 - GPT-2 - GPT-3 | - Decoder-only - Masked Self-Attn - LayerNorm | - GPT-1: 117M - GPT-2: up to 1.5B - GPT-3: 175B | - GPT-1: BookCorpus (~7k books) - GPT-2: WebText (8M Reddit outbound pages) - GPT-3: ~300B tokens (Common Crawl, WebText2, Books, Wikipedia) | - GPT-1 & 2: Some supervised fine-tuning - GPT-3: Minimal in paper, later RLHF (e.g. GPT-3.5/4) | [Radford et al. 2018, 2019], [Brown et al. 2020] |
| LLaMA (2023) | - LLaMA 1 - LLaMA 2 - LLaMA 3 (unofficial) | - Decoder-only - RoPE - RMSNorm - SwiGLU Activation | - LLaMA 1: 7B, 13B, 33B, 65B - LLaMA 2: 7B, 13B, 70B - LLaMA 3: rumored 405B | - LLaMA 1: ~1T tokens (small), ~1.4T (large), curated (books, academic, filtered web) - LLaMA 2: ~2T tokens, 4K context, refined filtering - LLaMA 3: 8K context rumored, no official data details | - LLaMA 2 Chat: RLHF on instruction sets - LLaMA 1 & 3: community or rumored fine-tunes | Touvron et al. 2023 (arXiv:2302.13971) Touvron et al. 2023 (arXiv:2307.09288) |
| Mistral (2023) | - Mistral-7B - Mistral Large - Mistral Small - Ministral-3B - Mistral Nemo | - Decoder-only - Sliding Window Attention - GQA | - Mistral-7B: ~7B - Larger: possibly more than 7B - Smaller: ~3B - Nemo: domain-specific | - Large, diverse text corpus (part undisclosed) - Emphasis on open source and efficient pretraining | - Mistral-7B: fine-tuned for QA, coding - Large: advanced reasoning or specialized domain - Nemo: specialized instructions or RLHF for enterprise | Mistral AI (2023) Blog |
| Phi (2023–2024) | - Phi-1 - Phi-1.5 - Phi-2 - Phi-3 (mini / small / medium / vision) | - Varied (some dec-only, some enc-dec) - Rotary Embeddings (RoPE) | - Phi-1: ~360M - Phi-1.5: ~1B - Phi-2: ~2.7B - Phi-3: 3B, 7B, 14B, plus 4.2B (vision) | - ~30B–80B tokens from books, web, synthetic “textbook-like” - Phi-2: additional structured data - Phi-3: curated text + images (multimodal) | - Phi-1.5: instruction tuning - Phi-2: advanced alignment, emergent performance - Phi-3: RLHF for text+image tasks | [Kim et al. 2023 (arXiv:2306.11644, 2309.05463)], [Yang et al. (Microsoft Blog)], [Kim et al. 2024 (arXiv:2404.14219)] |
| DeepSeek (2024) | - DeepSeek 1 - DeepSeek 2 (V2) - DeepSeek-VL - DeepSeek V3 | - Decoder-based + MLA + MoE - Some multi-modal expansions | - DeepSeek 1: ~900M–1.2B - DeepSeek 2: ~10B - DeepSeek-VL: 1.3B, 7B - V3: GitHub only | - Healthcare text (clinical notes, medical journals) + general web - DeepSeek-VL: images + text (possibly medical imaging) - V3: further expansions, details unclear | - Domain QA, diagnostic tasks with medical experts - MLA for resource-limited adaptation - MoE for scaling multiple experts (health vs. general) - Possibly RLHF or domain-labeled data in V3 | [Xu et al. (2024) arXiv:2401.02954], [Nguyen et al. (2024) arXiv:2405.04434], [Kang et al. (2024) arXiv:2408.08152], DeepSeek V3 on GitHub |
Key Observations
- GPT pioneered large decoder-only language models, culminating in GPT-3’s 175B parameters and few-shot in-context learning.
- LLaMA introduced RMSNorm, SwiGLU, and RoPE for improved training stability and data efficiency, delivering strong performance at 7B–70B (and rumored beyond).
- Mistral focuses on sliding window attention and grouped-query to boost efficiency, open-sourcing a competitive 7B model.
- Phi invests in smaller (~360M–14B) and mid-range models, with instruction-tuned variants, “textbook-like” data, and a multimodal approach (Phi-3-vision).
- DeepSeek targets healthcare and specialized enterprise tasks, featuring Multi-head Latent Attention (MLA) and Mixture-of-Experts to handle resource constraints and domain expansions (including vision-language).
Common Trends:
- Extended context lengths and advanced positional embeddings (RoPE, sliding window, GQA).
- Fine-tuning with RLHF or domain-labeled data to improve instruction following and specialized performance.
- Domain or multimodal expansions for specific tasks (medical, images, code, etc.).
Each family tackles different niches: GPT for broad coverage, LLaMA for open efficient scaling, Mistral for speed at mid-scale, Phi for smaller specialized models, and DeepSeek for domain (healthcare, enterprise) in resource-limited scenarios.
Final References (Consolidated)
GPT
- Radford, Alec, et al. (2018) “Improving Language Understanding by Generative Pre-Training.” OpenAI.
- Radford, Alec, et al. (2019) “Language Models are Unsupervised Multitask Learners.” OpenAI.
- Brown, Tom, et al. (2020) “Language Models are Few-Shot Learners.” NeurIPS 33, arXiv:2005.14165.
LLaMA
- Touvron, Hugo, et al. (2023) “LLaMA: Open and Efficient Foundation Language Models.” arXiv:2302.13971.
- Touvron, Hugo, et al. (2023) “Llama 2: Open Foundation and Fine-Tuned Chat Models.” arXiv:2307.09288.
Mistral
- Mistral AI (2023) “Meet Mistral 7B: The best open large language model.” Blog.
Phi
- Kim, Jihun, et al. (2023) “Phi-1: Data Curriculum Guides the Emergence of Complex Skills in LLMs.” arXiv:2306.11644.
- Kim, Jihun, et al. (2023) “Phi-1.5: Instruction Tuning Unlocks Emergent Abilities at 1B Scale.” arXiv:2309.05463.
- Yang, Hao, et al. (2023) “Phi-2: The Surprising Power of Small Language Models.” Microsoft Research Blog.
- Kim, Jihun, et al. (2024) “Phi-3: Towards Large Multimodal Transformers with Curriculum Fine-Tuning.” arXiv:2404.14219.
DeepSeek
- Xu, Li, et al. (2024) “DeepSeek: End-to-End Large Language Models for Healthcare.” arXiv:2401.02954.
- Nguyen, Thao, et al. (2024) “DeepSeek V2: Rethinking Latent Attention for Resource-Limited Environments.” arXiv:2405.04434.
- Kang, Seung, et al. (2024) “DeepSeek-VL: Vision-Language Models with Efficient Fine-Tuning.” arXiv:2408.08152.
- DeepSeek V3: https://github.com/deepseek-ai/DeepSeek-V3/tree/main