π§ Inside Modern AI SystemsΒΆ

A hands-on technical series focused on understanding how modern AI systems work internally by building and experimenting with their core components using PyTorch and TensorFlow/Keras.
Building AI Components from Scratch with PyTorch & TensorFlowΒΆ
Status: π§ Series in Progress
π― The GoalΒΆ
Modern AI systems are built on layers of abstractions.
Frameworks make it easy to use:
- Neural networks
- Transformers
- Large Language Models
- Training pipelines
- Inference systems
But abstraction can also hide the underlying mechanics.
This series is about looking underneath those abstractions.
The goal is to move from:
Use the Framework
β
Understand the Framework
β
Understand the Component
β
Understand the Mathematics
β
Build the Component
β
Understand the Performance
β
Understand the System
The central question is:
What is actually happening underneath the abstraction?
π§ What This Series Focuses OnΒΆ
This series focuses specifically on AI component internals.
It explores how the fundamental building blocks of modern AI systems work and how those components fit together.
The emphasis is on:
- Internal architecture
- Core mechanics
- Mathematics where useful
- Implementation
- Framework abstractions
- Performance
- Memory behavior
- Component relationships
- Practical experimentation
The series deliberately avoids turning into an enterprise architecture or cloud deployment series.
Those concerns belong to the Enterprise AI Engineering track.
π§© The Five-Part JourneyΒΆ
The series progresses through five major areas.
flowchart TD
A[Neural Network Internals]
B[Transformer Internals]
C[LLM Internals]
D[AI Training Internals]
E[AI Inference Internals]
A --> B
B --> C
C --> D
D --> E Phase 1 β Neural Network InternalsΒΆ
The journey begins with the fundamental building blocks of deep learning.
The focus includes concepts such as:
- Artificial neurons
- Layers and networks
- Forward propagation
- Backpropagation
- Loss functions
- Optimizers
- Weight initialization
The objective is to understand the mechanisms that make neural networks learn.
Phase 2 β Transformer InternalsΒΆ
The next stage moves into the architecture behind modern language and generative AI systems.
Topics include areas such as:
- Tokenization
- Embeddings
- Positional representations
- Self-Attention
- Multi-Head Attention
- Causal and cross attention
- Residual connections
- Layer normalization
- Feed-forward networks
- Transformer encoders and decoders
The goal is to understand how the Transformer is constructed from its individual components.
Phase 3 β LLM InternalsΒΆ
Once the Transformer foundation is established, the series moves into the internal mechanics of Large Language Models.
This includes areas such as:
- GPT-style architectures
- Autoregressive generation
- Logits and probabilities
- Sampling
- KV caching
- Efficient attention
- Modern attention variants
- Mixture of Experts
- Parameter-efficient adaptation
- Quantization
- Model compression
The emphasis is on understanding what happens inside the LLM during generation and optimization.
Phase 4 β AI Training InternalsΒΆ
The series then moves from individual model components into the mechanics of training.
This area explores:
- Dataset and DataLoader mechanics
- Batching
- Training loops
- Gradient accumulation
- Mixed precision
- Learning-rate scheduling
- Regularization
- Checkpointing
- Distributed training
The focus is on understanding the machinery behind model training rather than treating training as a single framework call.
Phase 5 β AI Inference InternalsΒΆ
The final phase focuses on what happens when trained models are actually used.
This includes areas such as:
- Inference pipelines
- Context handling
- Memory management
- KV-cache behavior
- Batch inference
- Streaming generation
- Throughput
- Latency
- Model evaluation
The objective is to understand the path from:
and the engineering constraints surrounding that process.
π¬ How the Components ConnectΒΆ
The individual topics are not isolated.
They form a dependency chain:
flowchart LR
A[Neural Networks]
B[Optimization]
C[Transformers]
D[LLM Architecture]
E[Training]
F[Inference]
A --> B
B --> C
C --> D
D --> E
D --> F
E --> F Understanding one layer makes the next layer easier to reason about.
For example:
Neurons
β
Neural Networks
β
Attention
β
Transformers
β
GPT / LLM Architecture
β
Training
β
Inference
This progression is intentional.
βοΈ PyTorch + TensorFlow/KerasΒΆ
Each major component can be studied through both:
PyTorchΒΆ
Used to examine the component through a flexible and explicit programming model.
TensorFlow/KerasΒΆ
Used to understand the equivalent abstraction and implementation in another major deep learning ecosystem.
The objective is not to declare a winner.
Instead, the comparison helps answer:
- What does each framework abstract?
- What remains visible to the engineer?
- How are the components represented?
- What are the performance implications?
- What are the implementation trade-offs?
ποΈ Standard Article StructureΒΆ
Articles in this series follow a consistent pattern.
A typical deep dive moves through:
Why It Exists
β
Core Concept
β
Internal Architecture
β
Mathematics
β
Implementation
β
PyTorch
β
TensorFlow / Keras
β
Framework Comparison
β
Performance
β
Relationship With Other Components
Where appropriate, articles may also include:
- Architecture diagrams
- Mermaid diagrams
- Numerical examples
- Experiments
- Benchmarks
- Visualizations
- Code walkthroughs
- Unit tests
π» Hands-On PhilosophyΒΆ
This is intended to be a build-and-understand series.
Instead of stopping at:
the goal is to understand what happens underneath that abstraction.
For example:
Framework API
β
Layer
β
Tensor Operations
β
Mathematical Transformation
β
GPU / CPU Computation
The same philosophy applies across:
- Attention
- Transformers
- Training
- Optimization
- Inference
- Memory
- Sampling
π Performance PerspectiveΒΆ
Understanding an AI component also means understanding its engineering characteristics.
Where relevant, the series will examine:
- Computational complexity
- Memory consumption
- GPU utilization
- Tensor operations
- Training cost
- Inference latency
- Throughput
- Memory bandwidth
- Scaling behavior
The question is not only:
Does it work?
but also:
Why does it behave the way it does?
π§ What You Should Be Able to Do After the SeriesΒΆ
By following the series, the intended outcome is that you can reason about modern AI systems from the inside rather than treating them as black boxes.
You should be able to:
- Explain the major components of neural networks
- Understand how Transformers are constructed
- Explain how attention works
- Understand the mechanics of LLM generation
- Reason about training loops and optimization
- Understand inference and memory behavior
- Compare PyTorch and TensorFlow/Keras implementations
- Identify important performance trade-offs
- Understand how individual AI components connect into larger systems
The ultimate goal is:
Understand the building blocks well enough to understand the system built from them.
π Areas You Will ExploreΒΆ
Without exposing the complete future publishing sequence, the series will progressively explore areas such as:
Neural Networks
β
Optimization
β
Tokenization
β
Embeddings
β
Attention
β
Transformers
β
LLMs
β
Generation
β
Efficient Inference
β
Training Systems
β
Distributed Training
β
Memory Management
β
Evaluation
The exact article sequence will evolve as the series progresses.
π§ Series StatusΒΆ
This is a long-term series in progress.
The roadmap is intentionally evolving rather than being treated as a fixed public publishing schedule.
New deep dives will be added progressively as the series develops.
Some topics may expand into multiple articles, while others may be combined or reordered based on:
- Technical dependencies
- New developments
- Experiments
- Production relevance
- Learning progression
π Relationship With the Other SeriesΒΆ
The three major content tracks have deliberately different goals.
flowchart TD
A[AI for Backend Engineers]
B[Inside Modern AI Systems]
C[Enterprise AI Engineering]
A --> A1[Learn AI]
B --> B1[Understand AI Internals]
C --> C1[Architect AI Systems]
A1 --> D[AI Engineering]
B1 --> D
C1 --> D π€ AI for Backend EngineersΒΆ
Learn AI
Connect AI concepts with software, backend, cloud, and production engineering.
π§ Inside Modern AI SystemsΒΆ
Understand AI
Understand and build the internal components behind modern AI systems.
π’ Enterprise AI EngineeringΒΆ
Architect AI
Design, secure, operate, and scale enterprise AI systems.
Together:
π» GitHub & ExperimentsΒΆ
The series will be supported by implementation work and experiments.
Expected supporting material includes:
- Source code
- Jupyter notebooks
- Framework implementations
- Experiments
- Benchmarks
- Visualizations
- Tests
- Reference implementations
Each published deep dive can link to its corresponding implementation when available.
π Content EcosystemΒΆ
The series is part of the broader Enterprise AI Engineering knowledge ecosystem.
flowchart LR
A[Inside Modern AI Systems]
A --> B[Deep Technical Articles]
A --> C[Source Code]
A --> D[Experiments]
A --> E[Architecture Diagrams]
B --> F[LinkedIn]
B --> G[Medium]
A --> H[Enterprise AI Engineering]
H --> I[Enterprise Architecture] The blog remains the canonical technical source.
LinkedIn and Medium provide broader distribution and discovery.
π Enterprise AI Engineering HandbookΒΆ
The Enterprise AI Engineering Handbook provides structured reference material across the broader AI engineering journey.
π https://enterpriseai.handbook.mihirkjha.com/
π» GitHubΒΆ
Implementation work and supporting projects:
π https://github.com/MihirKJha/
πΌ LinkedInΒΆ
Follow the technical journey and article announcements:
π https://www.linkedin.com/in/mihirkrjha/
π° Enterprise AI Engineering NewsletterΒΆ
Follow the broader technical journey through the Enterprise AI Engineering newsletter:
π https://www.linkedin.com/newsletters/enterprise-ai-engineering-7479222208079319041/
π¨βπ» About the AuthorΒΆ
Mihir Jha
Software Architect | AI Engineering | Cloud Architecture | Backend Engineering
Focused on bridging traditional software and cloud engineering with modern AI engineering to understand, design, and build scalable, secure, observable, and production-ready intelligent systems.