THE ENCYCLOPEDIA / 4 MIN READ
Hardware and Software of Artificial Intelligence
On this page
AI is implemented on physical substrates and through software stacks. Understanding these layers—from silicon to training frameworks to runtime agents—is essential to understanding what AI can and cannot do. This article complements the History and Recent Topics.
1. Hardware Foundations
1.1 General-Purpose Computing
Classical CPUs (Central Processing Units) execute general instructions. Early AI ran on these machines; symbolic reasoning, search, and expert systems are CPU-friendly because they manipulate symbols and rules rather than massive numeric matrices.
1.2 GPUs and Parallel Matrix Math
Neural network training is dominated by dense matrix multiplication. Graphics Processing Units (GPUs) are massively parallel, making them ideal for this workload:
- NVIDIA CUDA (2006 onward) turned GPUs into general compute devices.
- AlexNet’s 2012 ImageNet win was trained on GPUs, catalyzing the deep-learning era.
- Modern training runs use thousands of GPUs in parallel, often in clusters.
1.3 Specialized AI Accelerators
Dedicated hardware has emerged to cut cost and power:
- TPUs (Tensor Processing Units) — Google’s custom ASICs for tensor operations, used for large Transformer training and inference.
- NPUs in consumer chips (e.g., Apple’s Neural Engine, Huawei’s NPUs) accelerate on-device inference.
- Neuromorphic chips (IBM TrueNorth, Intel Loihi) mimic spiking neurons for low-power event-driven processing, though they remain niche.
- FPGAs and ASICs trade flexibility for efficiency in specific workloads.
1.4 Memory and Storage
- Training requires enormous memory bandwidth and capacity; models are often sharded across accelerators.
- Data centers provide high-bandwidth interconnects (e.g., NVIDIA NVLink, InfiniBand, Google’s custom networks).
1.5 Energy and Infrastructure
- Training frontier models consumes megawatt-scale electricity and generates heat, driving liquid cooling and specialized data centers.
- Inference is increasingly deployed at the edge (phones, cars, cameras) to reduce latency and privacy risk.
2. Software Stacks
2.1 Programming Languages
- Lisp (1958) dominated symbolic AI research.
- Prolog (1970s) supported logic programming for expert systems.
- Python became the lingua franca of modern ML due to its ecosystem.
- C++/CUDA and Rust underpin high-performance kernels and runtime systems.
2.2 Frameworks and Libraries
- TensorFlow (Google, 2015) and PyTorch (Meta, 2016) are the dominant deep-learning frameworks, offering automatic differentiation, GPU scheduling, and model deployment.
- JAX (Google) enables functional, high-performance research code.
- scikit-learn, XGBoost, and statsmodels serve classical ML and statistics.
- Hugging Face Transformers provides a unified interface to pretrained models.
2.3 Training Pipelines
- Data engineering: collection, cleaning, tokenization, and augmentation.
- Distributed training: data-parallel and model-parallel strategies; libraries like Megatron-LM and DeepSpeed scale training to thousands of GPUs.
- Optimization: stochastic gradient descent variants (Adam, SGD), learning-rate schedules, and mixed-precision training.
2.4 Inference and Serving
- Quantization and distillation shrink models for deployment.
- vLLM, TensorRT, ONNX Runtime, and llama.cpp optimize inference latency and memory.
- RAG (retrieval-augmented generation) connects models to external databases at inference time.
2.5 Agent and Tooling Software
Modern AI increasingly runs as agents that plan, call tools, browse, and remember:
- Frameworks: LangChain, LlamaIndex, OpenAI Functions/Tool-calling, and AutoGPT-style agents.
- Reasoning loops: chain-of-thought, ReAct (Reason+Act), and tree-of-thought prompting.
- Memory: vector databases (Pinecone, Weaviate, FAISS) give agents long-term recall.
3. Algorithms Underlying the Software
- Symbolic methods: search (A*), constraint solving, logic programming, planning.
- Classical ML: linear models, decision trees, SVMs, boosting, clustering, Bayesian inference.
- Neural architectures:
- CNNs for vision.
- RNNs/LSTMs for sequences (largely superseded by Transformers).
- Transformers using attention and self-attention for language, vision, and multimodal data.
- Diffusion models for generative image/video.
- Reinforcement learning for decision-making and control.
- Optimization: gradient descent, evolutionary algorithms, and Bayesian optimization.
4. The Convergence of Hardware and Software
A recurring pattern: algorithmic ideas meet specialized hardware, producing step changes. Examples:
- Backpropagation + GPUs → deep learning.
- Transformers + TPU clusters → large language models.
- Attention + efficient inference kernels → on-device assistants.
- Neuromorphic + event cameras → ultra-low-power sensing.
The field is co-evolving: software designs hardware (TPUs are shaped by TensorFlow), and hardware constrains what software can do.
5. Open Questions
- Energy efficiency: can we make intelligence orders-of-magnitude cheaper?
- Memory wall: models grow faster than memory bandwidth.
- Neuromorphic potential: do spiking networks unlock new capabilities?
- Alternative substrates: optical, analog, and biological computing remain speculative.
6. Sources and Further Reading
- Vaswani, A. et al. (2017). Attention Is All You Need.
- NVIDIA. CUDA Programming Guide.
- Google. Cloud TPU documentation.
- Hugging Face. Transformers documentation.
- Russell, S. & Norvig, P. (2021). Artificial Intelligence: A Modern Approach, 4th ed.
Sub-Articles
- Hardware Foundations
- GPU Computing
- Specialized AI Hardware
- Machine-Learning Frameworks
- Training Pipelines
- Inference and Serving
- Agents, Tools, and Agent Frameworks
- Algorithms Underlying AI
See the full sub-article index.
Continue to the History or Philosophy & Society.