PyTorch is the industry-standard open-source machine learning framework that provides tensor computation with strong GPU acceleration and a tape-based autograd system for building deep neural networks. The repository is a massive monolithic C++/Python codebase that implements the core tensor library (ATen), the autograd engine, the JIT/TorchScript compiler, the TorchDynamo compiler, the TorchInductor backend, distributed training primitives (c10d), quantization, mobile deployment, and extensive Python bindings. The architecture is layered: the C++ core (c10, ATen) provides foundational tensor types and dispatch; torch/csrc bridges Python and C++; torch/_dynamo and torch/_inductor implement the modern torch.compile() stack; torch.distributed provides data-parallel, tensor-parallel, and pipeline-parallel training; and torch.ao hosts quantization, pruning, and other model optimization techniques. Key entry points include the Python package root (torch/__init__.py), the C++ Python bindings (torch/csrc/Module.cpp), the autograd engine (torch/csrc/autograd/), the dynamo compiler (torch/_dynamo/convert_frame.py), and the inductor backend (torch/_inductor/compile_fx.py). The system relies on external dependencies including CUDA, cuDNN, NCCL, MKL, and various vendor libraries, with extensive build configuration via CMake and setuptools.
llama.cpp is a high-performance C/C++ inference engine for large language models (LLMs) and vision-language models (VLMs). It loads models in the GGUF format and runs them on a wide range of hardware, including CPU, CUDA, Metal, Vulkan, SYCL, OpenCL, Hexagon DSP, and more. The project provides a core library (`llama.cpp` and `ggml`), a CLI client (`llama-cli`), an OpenAI-compatible HTTP server (`llama-server`), a Svelte-based web UI, and a suite of tools for quantization, perplexity evaluation, and model conversion. It supports dozens of model architectures (LLaMA, Mistral, Qwen, Gemma, DeepSeek, etc.) and advanced features like speculative decoding, grammar-based sampling, flash attention, and LoRA adapters. The architecture is modular: the `ggml` tensor library provides a pluggable backend abstraction, while model-specific graph builders in `src/models/` construct computation graphs. The project is actively maintained with frequent releases and broad community adoption.