From 5706f2c9bacf4d2cf08fef0cfb6982890ce2f102 Mon Sep 17 00:00:00 2001 From: Vijay Janapa Reddi Date: Tue, 19 May 2026 07:08:01 -0700 Subject: [PATCH] Retire glossary JSON pipeline --- book/cli/commands/maintenance.py | 112 +- book/docs/BINDER.md | 4 +- .../contents/backmatter/glossary/README.md | 284 +- .../backmatter/glossary/vol1_glossary.json | 3709 ----------------- .../benchmarking/benchmarking_glossary.json | 502 --- .../contents/vol1/conclusion/conclusion.qmd | 45 +- .../vol1/conclusion/conclusion_glossary.json | 194 - .../data_engineering/data_engineering.qmd | 1 - .../data_engineering_glossary.json | 423 -- .../vol1/data_selection/data_selection.qmd | 13 +- .../data_selection_glossary.json | 25 - .../vol1/frameworks/frameworks_glossary.json | 306 -- .../vol1/hw_acceleration/hw_acceleration.qmd | 5 +- .../hw_acceleration_glossary.json | 278 -- .../introduction/introduction_glossary.json | 352 -- .../contents/vol1/ml_ops/ml_ops_glossary.json | 285 -- .../contents/vol1/ml_systems/ml_systems.qmd | 39 +- .../vol1/ml_systems/ml_systems_glossary.json | 265 -- .../ml_workflow/ml_workflow_glossary.json | 313 -- .../vol1/model_serving/model_serving.qmd | 43 +- .../model_serving/model_serving_glossary.json | 11 - .../nn_architectures_glossary.json | 336 -- .../nn_computation_glossary.json | 418 -- .../vol1/optimizations/model_compression.qmd | 9 +- .../model_compression_glossary.json | 348 -- .../responsible_engr/responsible_engr.qmd | 9 +- .../responsible_engr_glossary.json | 117 - .../vol1/training/training_glossary.json | 338 -- .../backmatter/glossary/vol2_glossary.json | 1860 --------- .../edge_intelligence/edge_intelligence.qmd | 1 - .../edge_intelligence_glossary.json | 257 -- .../vol2/responsible_ai/responsible_ai.qmd | 1 - .../responsible_ai_glossary.json | 264 -- .../contents/vol2/robust_ai/robust_ai.qmd | 1 - .../vol2/robust_ai/robust_ai_glossary.json | 411 -- .../security_privacy/security_privacy.qmd | 1 - .../security_privacy_glossary.json | 264 -- .../vol2/sustainable_ai/sustainable_ai.qmd | 1 - .../sustainable_ai_glossary.json | 327 -- book/tools/scripts/glossary/ORGANIZATION.md | 91 - book/tools/scripts/glossary/README.md | 48 - .../scripts/glossary/build_global_glossary.py | 242 -- .../scripts/glossary/generate_glossary.py | 265 -- .../scripts/quizzes/build_prior_vocab.py | 89 +- book/vscode-ext/package.json | 2 +- book/vscode-ext/scripts/smoke_extension_ux.py | 2 +- .../src/commands/publishCommands.ts | 4 +- book/vscode-ext/src/constants.ts | 2 +- 48 files changed, 187 insertions(+), 12730 deletions(-) delete mode 100644 book/quarto/contents/vol1/backmatter/glossary/vol1_glossary.json delete mode 100644 book/quarto/contents/vol1/benchmarking/benchmarking_glossary.json delete mode 100644 book/quarto/contents/vol1/conclusion/conclusion_glossary.json delete mode 100644 book/quarto/contents/vol1/data_engineering/data_engineering_glossary.json delete mode 100644 book/quarto/contents/vol1/data_selection/data_selection_glossary.json delete mode 100644 book/quarto/contents/vol1/frameworks/frameworks_glossary.json delete mode 100644 book/quarto/contents/vol1/hw_acceleration/hw_acceleration_glossary.json delete mode 100644 book/quarto/contents/vol1/introduction/introduction_glossary.json delete mode 100644 book/quarto/contents/vol1/ml_ops/ml_ops_glossary.json delete mode 100644 book/quarto/contents/vol1/ml_systems/ml_systems_glossary.json delete mode 100644 book/quarto/contents/vol1/ml_workflow/ml_workflow_glossary.json delete mode 100644 book/quarto/contents/vol1/model_serving/model_serving_glossary.json delete mode 100644 book/quarto/contents/vol1/nn_architectures/nn_architectures_glossary.json delete mode 100644 book/quarto/contents/vol1/nn_computation/nn_computation_glossary.json delete mode 100644 book/quarto/contents/vol1/optimizations/model_compression_glossary.json delete mode 100644 book/quarto/contents/vol1/responsible_engr/responsible_engr_glossary.json delete mode 100644 book/quarto/contents/vol1/training/training_glossary.json delete mode 100644 book/quarto/contents/vol2/backmatter/glossary/vol2_glossary.json delete mode 100644 book/quarto/contents/vol2/edge_intelligence/edge_intelligence_glossary.json delete mode 100644 book/quarto/contents/vol2/responsible_ai/responsible_ai_glossary.json delete mode 100644 book/quarto/contents/vol2/robust_ai/robust_ai_glossary.json delete mode 100644 book/quarto/contents/vol2/security_privacy/security_privacy_glossary.json delete mode 100644 book/quarto/contents/vol2/sustainable_ai/sustainable_ai_glossary.json delete mode 100644 book/tools/scripts/glossary/ORGANIZATION.md delete mode 100644 book/tools/scripts/glossary/README.md delete mode 100644 book/tools/scripts/glossary/build_global_glossary.py delete mode 100644 book/tools/scripts/glossary/generate_glossary.py diff --git a/book/cli/commands/maintenance.py b/book/cli/commands/maintenance.py index b3167481e1..24b3a4e3cb 100644 --- a/book/cli/commands/maintenance.py +++ b/book/cli/commands/maintenance.py @@ -336,11 +336,11 @@ class MaintenanceCommand: return False if ns.topic == "glossary": - if ns.action not in (None, "build"): - console.print("[red]❌ Supported action: maintain glossary build[/red]") + if ns.action not in (None, "paths"): + console.print("[red]❌ Supported action: maintain glossary paths[/red]") return False volume = "vol1" if ns.vol1 and not ns.vol2 else "vol2" if ns.vol2 and not ns.vol1 else None - return self._maintain_glossary_build(volume=volume) + return self._maintain_glossary_paths(volume=volume) if ns.topic == "images": if ns.action not in (None, "compress"): @@ -844,104 +844,24 @@ class MaintenanceCommand: console.print("[dim] (dry-run — no files modified)[/dim]") return True - def _maintain_glossary_build(self, volume: str = None) -> bool: - """Build deduplicated volume glossary JSON files from chapter glossaries.""" + def _maintain_glossary_paths(self, volume: str = None) -> bool: + """Show the canonical glossary source files.""" book_dir = self.config_manager.book_dir volumes = [volume] if volume else ["vol1", "vol2"] - built = 0 - - def standardize_term_name(term: str) -> str: - return re.sub(r"[_\s]+", " ", term.strip().lower()) - - def find_best_definition(definitions_with_chapters): - if len(definitions_with_chapters) == 1: - return definitions_with_chapters[0]["definition"] - - priority_chapters = ["nn_computation", "training", "ml_systems", "nn_architectures"] - for chapter_name in priority_chapters: - for item in definitions_with_chapters: - if item["chapter"] == chapter_name and not item["definition"].startswith("Alternative definition:"): - return item["definition"] - - clean_definitions = [] - for item in definitions_with_chapters: - def_text = item["definition"] - if "Alternative definition:" in def_text: - def_text = def_text.split("Alternative definition:")[0].strip() - clean_definitions.append((def_text, item["chapter"])) - best_def, _ = max(clean_definitions, key=lambda x: len(x[0])) - return best_def.rstrip(".") + console.print("[bold]Glossary source of truth[/bold]") + console.print("The book renders glossary content directly from the volume QMD files.") + console.print("Glossary JSON generation has been retired to avoid stale parallel sources.\n") for vol in volumes: - source_files = sorted((book_dir / "contents" / vol).glob("**/*_glossary.json")) - if not source_files: - console.print(f"[yellow]⚠️ No chapter glossary JSON files found for {vol}[/yellow]") - continue + path = book_dir / "contents" / vol / "backmatter" / "glossary" / "glossary.qmd" + label = "Volume I" if vol == "vol1" else "Volume II" + if path.exists(): + console.print(f"[green]✓[/green] {label}: {path}") + else: + console.print(f"[red]✗[/red] {label}: missing {path}") + return False - chapter_data = {} - for json_path in source_files: - try: - with open(json_path, "r", encoding="utf-8") as handle: - data = json.load(handle) - chapter = data["metadata"]["chapter"] - chapter_data[chapter] = data["terms"] - except Exception as exc: - console.print(f"[yellow]⚠️ Skipping {json_path}: {exc}[/yellow]") - - term_groups = defaultdict(list) - for chapter, terms in chapter_data.items(): - for term_entry in terms: - std_name = standardize_term_name(term_entry["term"]) - term_groups[std_name].append( - { - "original_term": term_entry["term"], - "definition": term_entry["definition"], - "chapter": chapter, - } - ) - - clean_terms = [] - for _, group in sorted(term_groups.items()): - term_names = [item["original_term"] for item in group] - best_term_name = min(term_names, key=lambda x: (len(x), "_" in x, x.lower())) - best_definition = find_best_definition(group) - unique_chapters = sorted({item["chapter"] for item in group}) - chapter_source = unique_chapters[0] - - clean_term = { - "term": best_term_name.lower(), - "definition": best_definition, - "chapter_source": chapter_source, - "aliases": [], - "see_also": [], - } - if len(unique_chapters) > 1: - clean_term["appears_in"] = unique_chapters - clean_terms.append(clean_term) - - clean_terms.sort(key=lambda x: x["term"]) - glossary = { - "metadata": { - "type": "volume_glossary", - "volume": vol, - "version": "1.0.0", - "generated": datetime.now().isoformat(), - "total_terms": len(clean_terms), - "source": f"aggregated_from_{vol}_chapter_glossaries", - "standardized": True, - "description": f"Glossary for {vol.upper()} built from chapter glossaries", - }, - "terms": clean_terms, - } - - output_path = book_dir / "contents" / vol / "backmatter" / "glossary" / f"{vol}_glossary.json" - output_path.parent.mkdir(parents=True, exist_ok=True) - with open(output_path, "w", encoding="utf-8") as handle: - json.dump(glossary, handle, indent=2, ensure_ascii=False) - console.print(f"[green]✅ Built {vol} glossary ({len(clean_terms)} terms): {output_path}[/green]") - built += 1 - - return built > 0 + return True def _find_images_for_compression(self, min_size_mb: int): """Find large images under contents for bulk compression.""" diff --git a/book/docs/BINDER.md b/book/docs/BINDER.md index 31037e6601..09831d9481 100644 --- a/book/docs/BINDER.md +++ b/book/docs/BINDER.md @@ -90,7 +90,7 @@ Intuitive commands that work on both individual chapters and the entire book. | Command | Description | Example | |---------|-------------|---------| | `validate ` | Run Binder-native validation checks | `./binder validate inline-refs` | -| `maintain ...` | Run Binder-native maintenance utilities | `./binder maintain glossary build` | +| `maintain ...` | Run Binder-native maintenance utilities | `./binder maintain glossary paths` | | `setup` | Configure environment | `./binder setup` | | `clean` | Clean configs & artifacts | `./binder clean` | | `switch ` | Switch active config | `./binder switch pdf` | @@ -146,7 +146,7 @@ Exit semantics: ### 🧰 Maintenance Namespace -- `./binder maintain glossary build [--vol1|--vol2]` +- `./binder maintain glossary paths [--vol1|--vol2]` - `./binder maintain images compress [-f ... | --all] [--smart-compression] [--apply]` - `./binder maintain repo-health [--json] [--min-size-mb N]` diff --git a/book/quarto/contents/backmatter/glossary/README.md b/book/quarto/contents/backmatter/glossary/README.md index 6e44f15981..fb00b4fd62 100644 --- a/book/quarto/contents/backmatter/glossary/README.md +++ b/book/quarto/contents/backmatter/glossary/README.md @@ -1,278 +1,28 @@ -# ML Systems Textbook Glossary System {#sec-ml-systems-textbook-glossary-system} +# Glossary Maintenance -This directory contains the comprehensive glossary system for the ML Systems textbook. The glossary provides definitions for 611+ technical terms used throughout the book, with automatic cross-references and interactive tooltips. +The book has two independent glossaries: -## 📚 What This System Provides {#sec-ml-systems-textbook-glossary-system-system-provides-e08f} +- Volume 1: `book/quarto/contents/vol1/backmatter/glossary/glossary.qmd` +- Volume 2: `book/quarto/contents/vol2/backmatter/glossary/glossary.qmd` -### For Readers {#sec-ml-systems-textbook-glossary-system-readers-e678} -- **Interactive tooltips** when hovering over terms throughout the book -- **Comprehensive alphabetical glossary** with 611+ terms across 26 letter sections -- **Cross-chapter references** showing where terms appear or are discussed -- **Academic-quality definitions** suitable for both undergraduate and graduate students +These QMD files are the source of truth and the published artifacts. The PDF, +HTML, and EPUB configurations render these files directly. -### For Authors/Maintainers {#sec-ml-systems-textbook-glossary-system-authorsmaintainers-27b8} -- **Automated term aggregation** from individual chapter glossaries -- **Intelligent deduplication** and similarity detection -- **Cross-reference validation** ensuring all links work properly -- **Quality assurance** through rule-based and LLM-based consolidation +The previous JSON-based glossary pipeline has been retired. Do not add +chapter-level or regenerated JSON files for glossary data. Those files created a +stale parallel source of truth and were not read directly by the book build. -## 🏗️ System Architecture {#sec-ml-systems-textbook-glossary-system-system-architecture-a055} +## Update Workflow -### Data Flow {#sec-ml-systems-textbook-glossary-system-data-flow-b3a7} -``` -Chapter Glossaries → Volume Glossaries → Published Glossary Pages - (vol1: 16 files) (vol1_glossary.json) (vol1/glossary.qmd) - (vol2: 7 files) (vol2_glossary.json) (vol2/glossary.qmd) - ↓ ↓ ↓ - Source of Aggregated Volume-specific - truth & deduplicated user-facing pages -``` +1. Edit the appropriate volume's `glossary.qmd`. +2. Keep Volume 1 and Volume 2 terms separate. +3. Add only terms that are useful to readers of that volume. +4. Rebuild the affected volume. -Each volume has its own self-contained glossary with no cross-volume dependencies. +Useful command: -### File Structure {#sec-ml-systems-textbook-glossary-system-file-structure-a801} -``` -quarto/contents/ -├── vol1/ # Volume 1 chapters -│ ├── introduction/ -│ │ └── introduction_glossary.json # Chapter-specific terms -│ ├── [... more vol1 chapters ...] -│ └── backmatter/glossary/ -│ ├── vol1_glossary.json # Vol1 aggregated terms -│ └── glossary.qmd # Vol1 glossary page -│ -├── vol2/ # Volume 2 chapters -│ ├── infrastructure/ -│ │ └── infrastructure_glossary.json -│ ├── [... more vol2 chapters ...] -│ └── backmatter/glossary/ -│ ├── vol2_glossary.json # Vol2 aggregated terms -│ └── glossary.qmd # Vol2 glossary page -│ -└── backmatter/glossary/ - └── README.md # This documentation -``` - -## 🔄 How It Works {#sec-ml-systems-textbook-glossary-system-works-b18b} - -### 1. Chapter Glossaries (Source of Truth) {#sec-ml-systems-textbook-glossary-system-1-chapter-glossaries-source-truth-312f} -Each chapter has its own JSON glossary file containing terms specific to that chapter: - -```json -{ - "metadata": { - "chapter": "introduction", - "total_terms": 27, - "generated_date": "2024-09-15" - }, - "terms": [ - { - "term": "artificial intelligence", - "definition": "A field of computer science focused on creating systems that can perform tasks typically requiring human intelligence...", - "chapter_source": "introduction", - "aliases": [], - "see_also": [] - } - ] -} -``` - -### 2. Global Glossary (Aggregated Data) {#sec-ml-systems-textbook-glossary-system-2-global-glossary-aggregated-data-8694} -The global glossary aggregates all chapter terms, handles deduplication, and manages cross-chapter references: - -```json -{ - "metadata": { - "type": "global_glossary", - "version": "1.0", - "total_terms": 611, - "source": "aggregated_from_chapter_glossaries" - }, - "terms": [ - { - "term": "artificial intelligence", - "definition": "A field of computer science focused on creating systems...", - "appears_in": ["introduction", "ml_systems", "responsible_ai"], - "chapter_source": "introduction", - "aliases": [], - "see_also": [] - } - ] -} -``` - -### 3. Published Glossary (User-Facing) {#sec-ml-systems-textbook-glossary-system-3-published-glossary-userfacing-1e82} -The final QMD file provides the user-facing glossary page with proper Quarto formatting and cross-references. - -## 🛠️ Processing Scripts {#sec-ml-systems-textbook-glossary-system-processing-scripts-6943} - -All processing scripts are located in `tools/scripts/glossary/`: - -### Core Scripts {#sec-ml-systems-textbook-glossary-system-core-scripts-e183} - -1. **`build_global_glossary.py`** - Main aggregation script - - Reads all 22 chapter glossary files - - Deduplicates and merges similar terms - - Handles multi-chapter attribution - - Generates the global glossary JSON - -2. **`generate_glossary.py`** - Page generation script - - Reads the global glossary JSON - - Generates the final QMD page with proper formatting - - Automatically discovers chapter section IDs for cross-references - - Creates alphabetical organization with term counts - -### Quality Assurance Scripts {#sec-ml-systems-textbook-glossary-system-quality-assurance-scripts-d080} - -3. **`smart_consolidation.py`** - Intelligent similarity detection - - Detects 115+ groups of potentially similar terms - - Uses multiple similarity metrics (sequence matching, word overlap, subset detection) - - Provides framework for LLM-based consolidation decisions - - Logs all decisions for review - -4. **`rule_based_consolidation.py`** - Academic best practices - - Applies standard consolidation rules (singular/plural, acronyms, formatting) - - Follows academic publishing guidelines - - Handles common formatting inconsistencies - - Prioritizes foundational chapters for definitions - -5. **`consolidate_similar_terms.py`** - Manual consolidation rules - - Implements specific consolidation rules for known issues - - Handles edge cases not caught by automated systems - - Provides fine-grained control over term merging - -### Utility Scripts {#sec-ml-systems-textbook-glossary-system-utility-scripts-2f7f} - -6. **`clean_global_glossary.py`** - Cleanup and validation - - Validates JSON structure and required fields - - Checks for orphaned references - - Provides data quality reports - -## 📝 Usage Instructions {#sec-ml-systems-textbook-glossary-system-usage-instructions-7699} - -### For Content Authors {#sec-ml-systems-textbook-glossary-system-content-authors-7406} - -#### Adding New Terms {#sec-ml-systems-textbook-glossary-system-adding-new-terms-b437} -1. Edit the appropriate chapter glossary file: `quarto/contents/core/[chapter]/[chapter]_glossary.json` -2. Add your term following the JSON schema -3. Run the rebuild process (see below) - -#### Editing Existing Terms {#sec-ml-systems-textbook-glossary-system-editing-existing-terms-3624} -1. Find the term in its source chapter glossary -2. Update the definition or metadata -3. Run the rebuild process to propagate changes - -### For Maintainers {#sec-ml-systems-textbook-glossary-system-maintainers-975c} - -#### Complete Rebuild Process {#sec-ml-systems-textbook-glossary-system-complete-rebuild-process-78a5} ```bash -# 1. Aggregate chapter glossaries into global glossary -python3 tools/scripts/glossary/build_global_glossary.py - -# 2. Generate the published glossary page -python3 tools/scripts/glossary/generate_glossary.py - -# 3. Optional: Run quality assurance -python3 tools/scripts/glossary/smart_consolidation.py # Analysis only -python3 tools/scripts/glossary/rule_based_consolidation.py # Apply fixes +./binder maintain glossary paths ``` -#### Quality Assurance Workflow {#sec-ml-systems-textbook-glossary-system-quality-assurance-workflow-2e81} -```bash -# Check for similar terms that need consolidation -python3 tools/scripts/glossary/smart_consolidation.py - -# Apply academic best practices -python3 tools/scripts/glossary/rule_based_consolidation.py - -# Rebuild after fixes -python3 tools/scripts/glossary/build_global_glossary.py -python3 tools/scripts/glossary/generate_glossary.py -``` - -## 📊 Current Statistics {#sec-ml-systems-textbook-glossary-system-current-statistics-bb2b} - -- **Total Terms**: 611 unique terms (down from 810 raw terms after deduplication) -- **Chapter Coverage**: 22 chapters with individual glossaries -- **Multi-Chapter Terms**: 104 terms that appear in multiple chapters -- **Single-Chapter Terms**: 507 terms specific to one chapter -- **Alphabetical Sections**: 26 letter sections (A-Z) -- **Similar Term Groups**: 115 groups identified for potential consolidation - -## 🔧 Technical Features {#sec-ml-systems-textbook-glossary-system-technical-features-4036} - -### Automatic Cross-Reference Resolution {#sec-ml-systems-textbook-glossary-system-automatic-crossreference-resolution-f11f} -The system automatically discovers actual section IDs from chapter files rather than relying on hardcoded mappings. This ensures cross-references always work correctly. - -### Intelligent Deduplication {#sec-ml-systems-textbook-glossary-system-intelligent-deduplication-0f55} -- **Singular/Plural Merging**: "adversarial example" + "adversarial examples" → "adversarial example" -- **Acronym Standardization**: "GPU" + "graphics processing unit" → "graphics processing unit (GPU)" -- **Formatting Consistency**: "Moore's law" vs "moores law" → "Moore's law" - -### Multi-Chapter Attribution {#sec-ml-systems-textbook-glossary-system-multichapter-attribution-410a} -Terms appearing in multiple chapters are properly attributed: -- **Single Chapter**: "Chapter: @sec-introduction" -- **Multiple Chapters**: "Appears in: @sec-dl-primer, @sec-dnn-architectures, @sec-frameworks" - -### Interactive Integration {#sec-ml-systems-textbook-glossary-system-interactive-integration-0b2a} -The glossary integrates with the book through: -- **Lua Filters**: Automatic term detection and tooltip injection -- **CSS Styling**: Responsive tooltips that don't get cut off -- **Cross-References**: Clickable links between glossary and chapters - -## 🚀 Future Enhancements {#sec-ml-systems-textbook-glossary-system-future-enhancements-890b} - -### Planned Features {#sec-ml-systems-textbook-glossary-system-planned-features-8032} -- **LLM Integration**: Automatic term consolidation using Claude/GPT APIs -- **Term Validation**: Automatic checking for undefined terms used in chapters -- **Synonym Detection**: Advanced similarity detection for related concepts -- **Export Formats**: PDF, EPUB, and standalone HTML versions - -### Quality Improvements {#sec-ml-systems-textbook-glossary-system-quality-improvements-fccd} -- **Definition Quality Scoring**: Automatic assessment of definition clarity -- **Coverage Analysis**: Detection of missing key terms -- **Consistency Checking**: Validation of term usage across chapters - -## 📋 Maintenance Notes {#sec-ml-systems-textbook-glossary-system-maintenance-notes-d4ad} - -### Best Practices {#sec-ml-systems-textbook-glossary-system-best-practices-8327} -1. **Chapter glossaries are the source of truth** - always edit there first -2. **Run full rebuild after any changes** to ensure consistency -3. **Use quality assurance scripts** regularly to catch issues -4. **Test cross-references** in full website builds, not isolated files -5. **Review consolidation logs** when running automated tools - -### Common Issues {#sec-ml-systems-textbook-glossary-system-common-issues-afab} -- **Cross-references not working**: Usually means viewing single file vs full website -- **Duplicate terms**: Use smart consolidation to identify and fix -- **Missing definitions**: Check individual chapter files for completeness -- **Broken acronyms**: Update rule-based consolidation for new patterns - -## 🆘 Troubleshooting {#sec-ml-systems-textbook-glossary-system-troubleshooting-8d50} - -### Cross-References Show as "?" {#sec-ml-systems-textbook-glossary-system-crossreferences-show-f00a} -This usually means you're viewing the glossary in isolation. Cross-references only work in the full website build: -```bash -quarto render # Full website -# OR -quarto preview # Development server -``` - -### Terms Not Appearing {#sec-ml-systems-textbook-glossary-system-terms-appearing-54ce} -1. Check if term exists in chapter glossary -2. Verify JSON syntax is valid -3. Run build script to regenerate global glossary -4. Check for case sensitivity issues - -### Consolidation Issues {#sec-ml-systems-textbook-glossary-system-consolidation-issues-d66b} -1. Review similarity detection results: `smart_consolidation.py` -2. Check consolidation logs in `quarto/contents/backmatter/glossary/` -3. Manually edit problem terms in chapter files -4. Re-run the full rebuild process - ---- - -**Last Updated**: September 2024 -**System Version**: 1.0 -**Total Terms**: 611 -**Coverage**: Complete for all 22 chapters +This prints the canonical glossary files that the book uses. diff --git a/book/quarto/contents/vol1/backmatter/glossary/vol1_glossary.json b/book/quarto/contents/vol1/backmatter/glossary/vol1_glossary.json deleted file mode 100644 index c24e87d766..0000000000 --- a/book/quarto/contents/vol1/backmatter/glossary/vol1_glossary.json +++ /dev/null @@ -1,3709 +0,0 @@ -{ - "metadata": { - "type": "volume_glossary", - "volume": "vol1", - "version": "1.0.0", - "generated": "2026-02-12T23:40:56.860332", - "total_terms": 476, - "source": "aggregated_from_vol1_chapter_glossaries", - "standardized": true, - "description": "Glossary for VOL1 built from chapter glossaries" - }, - "terms": [ - { - "term": "3dmark", - "definition": "Graphics performance benchmark suite that evaluates real-time 3D rendering capabilities, measuring triangle throughput, texture fill rates, and modern features like ray tracing and DLSS performance.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "a/b testing", - "definition": "A controlled experimental method for comparing two versions of a system or model by randomly dividing users into groups and measuring performance differences between the variants", - "chapter_source": "ml_ops", - "aliases": [], - "see_also": [], - "appears_in": [ - "ml_ops", - "ml_workflow" - ] - }, - { - "term": "activation checkpointing", - "definition": "A memory optimization technique that reduces memory usage during backpropagation by selectively discarding and recomputing activations instead of storing all intermediate results.", - "chapter_source": "training", - "aliases": [], - "see_also": [] - }, - { - "term": "activation function", - "definition": "A mathematical function applied to the weighted sum of inputs in a neural network neuron to introduce nonlinearity, enabling the network to learn complex patterns beyond simple linear combinations.", - "chapter_source": "frameworks", - "aliases": [], - "see_also": [], - "appears_in": [ - "frameworks", - "nn_architectures", - "nn_computation", - "training" - ] - }, - { - "term": "activation-based pruning", - "definition": "A pruning method that evaluates the average activation values of neurons or filters over a dataset to identify and remove neurons that consistently produce low activations and contribute little information to the network's decision process.", - "chapter_source": "optimizations", - "aliases": [], - "see_also": [] - }, - { - "term": "active learning", - "definition": "An approach that intelligently selects the most informative examples for human annotation based on model uncertainty, reducing the amount of labeled data needed for effective training.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "adam optimization", - "definition": "An adaptive learning rate optimization algorithm that combines momentum and RMSprop by maintaining exponentially decaying averages of both gradients and squared gradients for each parameter.", - "chapter_source": "training", - "aliases": [], - "see_also": [] - }, - { - "term": "ai triad", - "definition": "A framework modeling ML systems as three interdependent components: data that guides behavior, algorithms that learn patterns, and computational infrastructure that enables training and inference. Limitations in any component constrain the capabilities of the others.", - "chapter_source": "introduction", - "aliases": [], - "see_also": [] - }, - { - "term": "alerting", - "definition": "Automated notification systems that inform teams when metrics exceed predefined thresholds or anomalies are detected in production ML systems.", - "chapter_source": "ml_ops", - "aliases": [], - "see_also": [] - }, - { - "term": "alexnet", - "definition": "A groundbreaking convolutional neural network architecture that won the 2012 ImageNet challenge, reducing error rates from 26% to 16% and sparking the deep learning renaissance.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [], - "appears_in": [ - "benchmarking", - "introduction", - "nn_architectures" - ] - }, - { - "term": "all-reduce", - "definition": "A collective communication operation in distributed computing where each process contributes data and all processes receive the combined result, commonly used for gradient aggregation in distributed training.", - "chapter_source": "training", - "aliases": [], - "see_also": [] - }, - { - "term": "alphafold", - "definition": "A landmark AI system developed by DeepMind that predicts the three-dimensional structure of proteins from their amino acid sequences, solving the decades-old protein folding problem and demonstrating how large-scale ML systems can accelerate scientific discovery.", - "chapter_source": "introduction", - "aliases": [], - "see_also": [] - }, - { - "term": "apache kafka", - "definition": "A distributed streaming platform that handles real-time data feeds using a publish-subscribe messaging system, commonly used for building ML data pipelines with high throughput and fault tolerance.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "apache spark", - "definition": "An open-source distributed computing framework that enables large-scale data processing across clusters of computers, revolutionizing ETL operations with in-memory computing capabilities.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "application-specific integrated circuit", - "definition": "A specialized chip designed for specific tasks that offers maximum efficiency by abandoning general-purpose flexibility, exemplified by Cerebras Wafer-Scale Engine for machine learning training.", - "chapter_source": "training", - "aliases": [], - "see_also": [] - }, - { - "term": "application-specific integrated circuit (asic)", - "definition": "Custom chips designed for specific computational tasks that offer superior performance and energy efficiency compared to general-purpose processors, exemplified by Google's TPUs and Bitcoin mining ASICs", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [], - "appears_in": [ - "benchmarking", - "hw_acceleration" - ] - }, - { - "term": "architectural efficiency", - "definition": "The dimension of model optimization that focuses on how computations are performed efficiently during training and inference by exploiting sparsity, factorizing large components, and dynamically adjusting computation based on input complexity.", - "chapter_source": "optimizations", - "aliases": [], - "see_also": [] - }, - { - "term": "arithmetic intensity", - "definition": "The ratio of floating-point operations to bytes of memory accessed (FLOPs/byte), used in roofline analysis to determine whether workloads are memory-bound or compute-bound and to guide optimization priorities.", - "chapter_source": "conclusion", - "aliases": [], - "see_also": [] - }, - { - "term": "artificial general intelligence", - "definition": "AI systems capable of matching human-level performance across all cognitive tasks, requiring novel distributed architectures, energy-efficient hardware, and unprecedented infrastructure scale.", - "chapter_source": "conclusion", - "aliases": [], - "see_also": [] - }, - { - "term": "artificial intelligence", - "definition": "The field of computer science focused on creating systems that can perform tasks typically requiring human intelligence, such as perception, reasoning, learning, and decision-making.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [], - "appears_in": [ - "benchmarking", - "conclusion", - "introduction", - "ml_systems", - "nn_computation" - ] - }, - { - "term": "artificial neural network", - "definition": "A computational model inspired by biological neural networks, consisting of interconnected nodes (neurons) organized in layers that can learn patterns from data through adjustable weights and biases.", - "chapter_source": "nn_computation", - "aliases": [], - "see_also": [] - }, - { - "term": "artificial neurons", - "definition": "Basic computational units in neural networks that mimic biological neurons, taking multiple inputs, applying weights and biases, and producing an output signal through an activation function.", - "chapter_source": "introduction", - "aliases": [], - "see_also": [] - }, - { - "term": "attention mechanism", - "definition": "A neural network component that computes weighted connections between elements based on their content, allowing dynamic focus on relevant parts of the input rather than fixed architectural connections.", - "chapter_source": "nn_architectures", - "aliases": [], - "see_also": [] - }, - { - "term": "automatic differentiation", - "definition": "A computational technique that automatically calculates exact derivatives of functions implemented as computer programs by systematically applying the chain rule at the elementary operation level, essential for training neural networks through gradient-based optimization.", - "chapter_source": "frameworks", - "aliases": [], - "see_also": [] - }, - { - "term": "automatic mixed precision", - "definition": "A training technique that automatically manages the use of different numerical precisions (FP16, FP32) to optimize memory usage and computational speed while maintaining model accuracy.", - "chapter_source": "training", - "aliases": [], - "see_also": [] - }, - { - "term": "automl", - "definition": "Automated Machine Learning that uses machine learning itself to automate model design decisions, including architecture search, hyperparameter optimization, and feature selection to create efficient models without manual intervention.", - "chapter_source": "optimizations", - "aliases": [], - "see_also": [] - }, - { - "term": "autoscaling", - "definition": "Dynamic adjustment of compute resources based on workload demand, automatically scaling up during peak usage and scaling down during low usage to optimize costs and performance.", - "chapter_source": "ml_ops", - "aliases": [], - "see_also": [] - }, - { - "term": "backpropagation", - "definition": "An algorithm that computes gradients of the loss function with respect to network weights by propagating error signals backward through the network layers, enabling systematic weight updates during training.", - "chapter_source": "frameworks", - "aliases": [], - "see_also": [], - "appears_in": [ - "frameworks", - "nn_architectures", - "nn_computation", - "training" - ] - }, - { - "term": "bandwidth", - "definition": "The maximum rate of data transfer across a communication channel or memory interface, typically measured in bytes per second and critical for optimizing data movement in AI accelerators.", - "chapter_source": "hw_acceleration", - "aliases": [], - "see_also": [] - }, - { - "term": "batch inference", - "definition": "The process of using a trained machine learning model to make predictions or decisions on new, previously unseen data.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [], - "appears_in": [ - "benchmarking", - "ml_ops", - "ml_systems" - ] - }, - { - "term": "batch ingestion", - "definition": "A data processing pattern that collects and processes data in groups or batches at scheduled intervals, suitable for scenarios where real-time processing is not critical.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "batch normalization", - "definition": "A technique that normalizes inputs to each layer to have zero mean and unit variance, which stabilizes training and often allows for higher learning rates and faster convergence.", - "chapter_source": "frameworks", - "aliases": [], - "see_also": [], - "appears_in": [ - "frameworks", - "nn_architectures", - "training" - ] - }, - { - "term": "batch processing", - "definition": "The technique of processing multiple data samples simultaneously to amortize computation and memory access costs, improving overall throughput in neural network training and inference", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [], - "appears_in": [ - "benchmarking", - "data_engineering", - "hw_acceleration" - ] - }, - { - "term": "batch size", - "definition": "The number of training examples processed simultaneously during one iteration of neural network training, affecting both computational efficiency and gradient estimation quality.", - "chapter_source": "nn_computation", - "aliases": [], - "see_also": [] - }, - { - "term": "batch throughput optimization", - "definition": "Techniques for maximizing the number of samples processed per unit time when handling multiple inputs simultaneously, leveraging parallelism and batching efficiencies.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "batched operations", - "definition": "Matrix computations that process multiple inputs simultaneously, converting matrix-vector operations into more efficient matrix-matrix operations to improve hardware utilization.", - "chapter_source": "training", - "aliases": [], - "see_also": [] - }, - { - "term": "benchmark engineering", - "definition": "The systematic design and development of performance evaluation frameworks, involving test harness creation, metric selection, and result interpretation methodologies.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "benchmark harness", - "definition": "Systematic infrastructure component that controls test execution, manages input delivery, and collects performance measurements under controlled conditions to ensure reproducible evaluations.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "benchmarking", - "definition": "Systematic evaluation of compute performance, algorithmic effectiveness, and data quality in machine learning systems to optimize performance across diverse workloads and ensure reproducibility.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "bert", - "definition": "Bidirectional Encoder Representations from Transformers, a transformer-based language model introduced by Google in 2018 that revolutionized natural language processing through masked language modeling pre-training.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "bfloat16", - "definition": "A 16-bit floating-point format developed by Google Brain that maintains the same dynamic range as FP32 but with reduced precision, making it particularly suitable for deep learning training.", - "chapter_source": "training", - "aliases": [], - "see_also": [] - }, - { - "term": "bias", - "definition": "A learnable parameter added to the weighted sum in each neuron that allows the activation function to shift, providing additional flexibility for the network to fit complex patterns.", - "chapter_source": "nn_computation", - "aliases": [], - "see_also": [] - }, - { - "term": "bias terms", - "definition": "Learnable parameters in neural networks that shift the activation function, allowing neurons to activate even when all inputs are zero, providing additional flexibility for fitting complex patterns.", - "chapter_source": "nn_computation", - "aliases": [], - "see_also": [] - }, - { - "term": "binarization", - "definition": "An extreme quantization technique that reduces neural network weights and activations to binary values (typically -1 and +1), achieving maximum compression but often requiring specialized training procedures and hardware support.", - "chapter_source": "optimizations", - "aliases": [], - "see_also": [] - }, - { - "term": "biological neuron", - "definition": "A cell in the nervous system that receives, processes, and transmits information through electrical and chemical signals, serving as inspiration for artificial neural networks.", - "chapter_source": "nn_computation", - "aliases": [], - "see_also": [] - }, - { - "term": "bitter lesson", - "definition": "Richard Sutton's 2019 observation that general methods leveraging computation consistently outperform approaches encoding human expertise, suggesting that systems engineering enabling computational scale is central to AI advancement.", - "chapter_source": "introduction", - "aliases": [], - "see_also": [] - }, - { - "term": "black box", - "definition": "A system where you can observe the inputs and outputs but cannot see or understand the internal workings, particularly problematic in AI when systems make important decisions affecting people's lives without providing explanations for their reasoning.", - "chapter_source": "introduction", - "aliases": [], - "see_also": [] - }, - { - "term": "blas", - "definition": "Basic Linear Algebra Subprograms, a specification for low-level routines that perform common linear algebra operations such as vector addition, scalar multiplication, dot products, and matrix operations, forming the computational foundation of modern ML frameworks.", - "chapter_source": "frameworks", - "aliases": [], - "see_also": [] - }, - { - "term": "bounding box", - "definition": "A rectangular annotation that identifies object locations in images by drawing a box around each object of interest, commonly used in computer vision training datasets.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "brittleness", - "definition": "The tendency of rule-based AI systems to fail completely when encountering inputs that fall outside their programmed scenarios, no matter how similar those inputs might be to what they were designed to handle.", - "chapter_source": "introduction", - "aliases": [], - "see_also": [] - }, - { - "term": "caching", - "definition": "A technique for storing frequently accessed data in high-speed storage systems to reduce retrieval latency and improve system performance in ML pipelines.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "calibration", - "definition": "The process in post-training quantization of analyzing a representative dataset to determine optimal quantization parameters, including scale factors and zero points, that minimize accuracy loss when converting from high to low precision", - "chapter_source": "ml_workflow", - "aliases": [], - "see_also": [], - "appears_in": [ - "ml_workflow", - "optimizations" - ] - }, - { - "term": "canary deployment", - "definition": "A deployment strategy where new model versions receive a small percentage of production traffic to validate behavior before full rollout, enabling early detection of issues with minimal user impact", - "chapter_source": "ml_ops", - "aliases": [], - "see_also": [], - "appears_in": [ - "ml_ops", - "ml_workflow" - ] - }, - { - "term": "cap theorem", - "definition": "A distributed systems principle stating that a data store can only provide two of the three guarantees: Consistency, Availability, and Partition Tolerance.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "carbon footprint", - "definition": "The total greenhouse gas emissions, typically measured in CO2 equivalent, produced directly and indirectly by training and operating an ML system.", - "chapter_source": "responsible_engr", - "aliases": [], - "see_also": [] - }, - { - "term": "cerebras wafer-scale engine", - "definition": "A revolutionary single-wafer processor containing 2.6 trillion transistors and 850,000 cores, designed to eliminate inter-device communication bottlenecks in large-scale machine learning training.", - "chapter_source": "training", - "aliases": [], - "see_also": [] - }, - { - "term": "chain rule", - "definition": "The calculus rule enabling computation of derivatives for composite functions, fundamental to backpropagation.", - "chapter_source": "nn_computation", - "aliases": [], - "see_also": [] - }, - { - "term": "channelwise quantization", - "definition": "A quantization granularity approach where each channel in a layer uses its own set of quantization parameters, providing more precise representation than layerwise quantization while maintaining hardware efficiency.", - "chapter_source": "optimizations", - "aliases": [], - "see_also": [] - }, - { - "term": "ci/cd pipelines", - "definition": "Continuous Integration and Continuous Delivery automated workflows that streamline model development by integrating testing, validation, and deployment processes.", - "chapter_source": "ml_ops", - "aliases": [], - "see_also": [] - }, - { - "term": "classification labels", - "definition": "Simple categorical annotations that assign specific tags or categories to data examples, representing the most basic form of supervised learning annotation.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "cloudsuite", - "definition": "Benchmark suite developed at EPFL that addresses modern datacenter workloads including web search, data analytics, and media streaming, measuring end-to-end performance across network, storage, and compute dimensions.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "cold-start performance", - "definition": "Time required for a system to transition from idle state to active execution, particularly important in serverless environments where models are loaded on demand.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "collaborative filtering", - "definition": "A technique used in recommendation systems that predicts user preferences by identifying patterns in interactions from many users, leveraging the collective behavior of the crowd rather than just item properties.", - "chapter_source": "ml_systems", - "aliases": [], - "see_also": [] - }, - { - "term": "communication tax", - "definition": "The performance penalty incurred in distributed systems due to the latency and bandwidth costs of synchronizing state between nodes.", - "chapter_source": "training", - "aliases": [], - "see_also": [] - }, - { - "term": "compound ai systems", - "definition": "AI architectures that combine multiple specialized models and components working together, rather than relying on a single monolithic model, enabling modularity, specialization, and improved interpretability.", - "chapter_source": "conclusion", - "aliases": [], - "see_also": [] - }, - { - "term": "computational graph", - "definition": "A directed graph representing the sequence of operations in neural network computation, enabling automatic differentiation.", - "chapter_source": "frameworks", - "aliases": [], - "see_also": [], - "appears_in": [ - "frameworks", - "nn_computation" - ] - }, - { - "term": "computer engineering", - "definition": "An engineering discipline that emerged in the late 1960s to address the growing complexity of integrating hardware and software systems, combining expertise from electrical engineering and computer science to design and build complex computing systems.", - "chapter_source": "introduction", - "aliases": [], - "see_also": [] - }, - { - "term": "concept drift", - "definition": "The phenomenon where the statistical relationship between input features and target outputs changes over time, distinct from data drift where only input distributions change, causing model performance to degrade", - "chapter_source": "ml_ops", - "aliases": [], - "see_also": [], - "appears_in": [ - "ml_ops", - "ml_workflow" - ] - }, - { - "term": "conditional computation", - "definition": "A dynamic optimization technique where different parts of a neural network are selectively activated based on input characteristics, reducing computational load by skipping unnecessary computations for specific inputs.", - "chapter_source": "optimizations", - "aliases": [], - "see_also": [] - }, - { - "term": "connectionism", - "definition": "An approach to AI modeling that emphasizes learning and intelligence emerging from simple interconnected units, serving as the theoretical foundation for neural networks and contrasting with symbolic AI approaches.", - "chapter_source": "introduction", - "aliases": [], - "see_also": [] - }, - { - "term": "consensus labeling", - "definition": "A quality control approach that collects multiple annotations for the same data point to identify controversial cases and improve label reliability through inter-annotator agreement.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "containerization", - "definition": "Packaging applications and their dependencies into portable, isolated containers using tools like Docker to ensure consistent execution across different environments.", - "chapter_source": "ml_ops", - "aliases": [], - "see_also": [] - }, - { - "term": "containerized microservices", - "definition": "Architectural pattern using lightweight containers to package individual services, enabling scalable, maintainable deployment of ML systems across distributed environments.", - "chapter_source": "ml_ops", - "aliases": [], - "see_also": [] - }, - { - "term": "continuous integration", - "definition": "A software development practice where code changes are automatically integrated, tested, and validated multiple times per day to detect issues early in the development cycle.", - "chapter_source": "ml_workflow", - "aliases": [], - "see_also": [] - }, - { - "term": "convolution", - "definition": "A mathematical operation fundamental to convolutional neural networks that applies filters (kernels) to input data to extract features such as edges, textures, or patterns, particularly effective for processing images and spatial data.", - "chapter_source": "frameworks", - "aliases": [], - "see_also": [] - }, - { - "term": "convolution operation", - "definition": "A mathematical operation that slides a filter (kernel) across input data to detect local features, forming the foundation of convolutional neural networks for spatial pattern recognition.", - "chapter_source": "nn_architectures", - "aliases": [], - "see_also": [] - }, - { - "term": "convolutional neural network", - "definition": "A specialized neural network architecture designed for processing grid-like data such as images, using convolutional layers that apply filters to detect local features.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [], - "appears_in": [ - "benchmarking", - "nn_architectures", - "nn_computation" - ] - }, - { - "term": "cp decomposition", - "definition": "CANDECOMP/PARAFAC decomposition that expresses a tensor as a sum of rank-one components, used to compress neural network layers by reducing the number of parameters while preserving computational functionality.", - "chapter_source": "optimizations", - "aliases": [], - "see_also": [] - }, - { - "term": "credit assignment problem", - "definition": "The challenge of determining which weights in a multi-layer network contributed to prediction errors.", - "chapter_source": "nn_computation", - "aliases": [], - "see_also": [] - }, - { - "term": "crisp-dm", - "definition": "Cross-Industry Standard Process for Data Mining, a structured methodology developed in 1996 that defines six phases for data projects: business understanding, data understanding, data preparation, modeling, evaluation, and deployment.", - "chapter_source": "ml_workflow", - "aliases": [], - "see_also": [] - }, - { - "term": "cross-entropy loss", - "definition": "A loss function commonly used in classification tasks that measures the difference between predicted probability distributions and true class labels, providing strong gradients for effective learning.", - "chapter_source": "nn_computation", - "aliases": [], - "see_also": [] - }, - { - "term": "crowdsourcing", - "definition": "A collaborative data collection approach that leverages distributed individuals via the internet to perform annotation tasks, enabling scalable dataset creation through platforms like Amazon Mechanical Turk.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "cublas", - "definition": "NVIDIA's CUDA Basic Linear Algebra Subprograms library that provides GPU-accelerated implementations of standard linear algebra operations, enabling high-performance matrix computations on NVIDIA graphics processing units.", - "chapter_source": "frameworks", - "aliases": [], - "see_also": [] - }, - { - "term": "cuda", - "definition": "NVIDIA's parallel computing platform and programming model that enables general-purpose computing on graphics processing units (GPUs), allowing machine learning frameworks to leverage massive parallelism for accelerated tensor operations.", - "chapter_source": "frameworks", - "aliases": [], - "see_also": [] - }, - { - "term": "cuda (compute unified device architecture)", - "definition": "NVIDIA's parallel computing platform and programming model that enables developers to use GPUs for general-purpose computing beyond graphics rendering.", - "chapter_source": "hw_acceleration", - "aliases": [], - "see_also": [] - }, - { - "term": "dartmouth conference", - "definition": "The legendary 8-week workshop at Dartmouth College in 1956 where AI was officially born, organized by John McCarthy, Marvin Minsky, Nathaniel Rochester, and Claude Shannon, where the term artificial intelligence was first coined.", - "chapter_source": "introduction", - "aliases": [], - "see_also": [] - }, - { - "term": "data augmentation", - "definition": "The process of artificially expanding training datasets by creating modified versions of existing data through transformations like rotation, scaling, or noise injection.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "data cascades", - "definition": "Systemic failures where data quality issues compound over time, creating downstream negative consequences such as model failures, costly rebuilding, or project termination.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "data center", - "definition": "A facility that houses computer systems and associated components such as telecommunications and storage systems, typically containing thousands of servers for cloud computing operations.", - "chapter_source": "ml_systems", - "aliases": [], - "see_also": [] - }, - { - "term": "data contracts", - "definition": "Explicit agreements between data producers and consumers defining schema, quality expectations, and service levels to prevent downstream breakage.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "data curation", - "definition": "The process of selecting, organizing, and maintaining high-quality datasets by removing irrelevant information, correcting errors, and ensuring data meets specific standards for machine learning applications.", - "chapter_source": "ml_workflow", - "aliases": [], - "see_also": [] - }, - { - "term": "data drift", - "definition": "The phenomenon where the statistical properties of input data change over time, causing machine learning model performance to degrade even when the underlying code remains unchanged", - "chapter_source": "ml_ops", - "aliases": [], - "see_also": [], - "appears_in": [ - "ml_ops", - "ml_workflow" - ] - }, - { - "term": "data governance", - "definition": "The framework of policies, procedures, and technologies that ensure data security, privacy, compliance, and ethical use throughout the machine learning pipeline.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "data ingestion", - "definition": "The process of collecting and importing raw data from various sources into a system where it can be stored, processed, and prepared for machine learning applications", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [], - "appears_in": [ - "data_engineering", - "ml_workflow" - ] - }, - { - "term": "data lake", - "definition": "A storage repository that holds structured, semi-structured, and unstructured data in its native format, using schema-on-read approaches for flexible data analysis.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "data lineage", - "definition": "The documentation and tracking of data flow through various transformations and processes, providing visibility into data origins and modifications for compliance and debugging", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [], - "appears_in": [ - "data_engineering", - "ml_ops" - ] - }, - { - "term": "data parallelism", - "definition": "A distributed training strategy that splits the dataset across multiple devices while each device maintains a complete copy of the model, enabling parallel computation of gradients.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [], - "appears_in": [ - "benchmarking", - "frameworks", - "training" - ] - }, - { - "term": "data pipeline", - "definition": "The infrastructure and workflows that automate the movement and transformation of data from sources through processing stages to final storage or consumption.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "data quality", - "definition": "The degree to which data meets requirements for accuracy, completeness, consistency, and timeliness, directly impacting machine learning model performance.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "data quality multiplier", - "definition": "The concept that improvements in data quality (like cleaner labels) yield multiplicative rather than additive gains in model performance compared to model tweaks.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "data validation", - "definition": "The systematic verification that collected data meets quality standards, is properly formatted, and contains accurate information suitable for machine learning model training and evaluation", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [], - "appears_in": [ - "data_engineering", - "ml_workflow" - ] - }, - { - "term": "data versioning", - "definition": "The practice of tracking and managing different versions of datasets over time, similar to code versioning, to ensure reproducibility and enable rollback to previous data states when needed", - "chapter_source": "ml_ops", - "aliases": [], - "see_also": [], - "appears_in": [ - "ml_ops", - "ml_workflow" - ] - }, - { - "term": "data warehouse", - "definition": "A centralized repository optimized for analytical queries (OLAP) that stores integrated, structured data from multiple sources in a standardized schema.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "data-centric approach", - "definition": "A machine learning paradigm that prioritizes improving data quality, diversity, and curation rather than solely focusing on model architecture improvements to achieve better performance.", - "chapter_source": "conclusion", - "aliases": [], - "see_also": [] - }, - { - "term": "data-centric computing", - "definition": "Systems optimized for the efficient ingestion of data and iterative refinement of model parameters, where the programmer's job is to curate data.", - "chapter_source": "introduction", - "aliases": [], - "see_also": [] - }, - { - "term": "dataflow architecture", - "definition": "Specialized computing architecture where instruction execution is determined by data availability rather than a program counter, enabling highly parallel processing of neural network operations.", - "chapter_source": "hw_acceleration", - "aliases": [], - "see_also": [] - }, - { - "term": "dataflow challenges", - "definition": "Technical difficulties in managing data movement and dependencies in hardware accelerators, including memory bandwidth limitations and synchronization requirements.", - "chapter_source": "hw_acceleration", - "aliases": [], - "see_also": [] - }, - { - "term": "datasheets for datasets", - "definition": "Documentation for training data that captures provenance, collection methodology, demographic composition, and known limitations affecting model behavior.", - "chapter_source": "responsible_engr", - "aliases": [], - "see_also": [] - }, - { - "term": "dead letter queue", - "definition": "A separate storage mechanism for data that fails processing, allowing for later analysis and potential reprocessing of problematic data without blocking the main pipeline.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "deep learning", - "definition": "A subfield of machine learning that uses artificial neural networks with multiple layers to automatically learn hierarchical representations from data without explicit feature engineering.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [], - "appears_in": [ - "benchmarking", - "nn_architectures", - "nn_computation" - ] - }, - { - "term": "demographic parity", - "definition": "A fairness criterion requiring that the probability of receiving a positive prediction is independent of group membership across protected attributes.", - "chapter_source": "responsible_engr", - "aliases": [], - "see_also": [] - }, - { - "term": "dennard scaling", - "definition": "The observation that as transistors became smaller, their power density remained constant, enabling higher performance at the same power envelope. Its breakdown around 2005 ended the era of free frequency scaling.", - "chapter_source": "ml_systems", - "aliases": [], - "see_also": [] - }, - { - "term": "dense layer", - "definition": "A fully-connected neural network layer where each neuron receives input from all neurons in the previous layer, enabling comprehensive information integration across features.", - "chapter_source": "nn_architectures", - "aliases": [], - "see_also": [], - "appears_in": [ - "nn_architectures", - "nn_computation" - ] - }, - { - "term": "dense matrix-matrix multiplication", - "definition": "The fundamental computational operation in neural networks that dominates training time, accounting for 60-90% of computation in typical models.", - "chapter_source": "training", - "aliases": [], - "see_also": [] - }, - { - "term": "deployment constraints", - "definition": "Operational limitations such as hardware resources, network connectivity, regulatory requirements, and integration requirements that influence how machine learning models are implemented in production environments.", - "chapter_source": "ml_workflow", - "aliases": [], - "see_also": [] - }, - { - "term": "deployment paradigm", - "definition": "A distinct approach to hosting and executing ML models characterized by specific resource constraints and operational properties, such as Cloud ML, Edge ML, Mobile ML, or TinyML.", - "chapter_source": "ml_systems", - "aliases": [], - "see_also": [] - }, - { - "term": "devops", - "definition": "Software development practice that combines development and operations teams to shorten development cycles and deliver high-quality software through automation and collaboration.", - "chapter_source": "ml_ops", - "aliases": [], - "see_also": [] - }, - { - "term": "dhrystone", - "definition": "Integer-based benchmark introduced in 1984 that measures integer and string operations in DMIPS (Dhrystone MIPS), designed to complement floating-point benchmarks with typical programming constructs.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "diabetic retinopathy", - "definition": "A diabetes complication that damages blood vessels in the retina, serving as a leading cause of preventable blindness and a key application area for medical AI screening systems.", - "chapter_source": "ml_workflow", - "aliases": [], - "see_also": [] - }, - { - "term": "differential privacy", - "definition": "A mathematical framework for quantifying and limiting the privacy loss when releasing statistical information about datasets, ensuring individual privacy while enabling useful data analysis", - "chapter_source": "conclusion", - "aliases": [], - "see_also": [], - "appears_in": [ - "conclusion", - "data_engineering" - ] - }, - { - "term": "disaggregated evaluation", - "definition": "The practice of breaking down model performance metrics by demographic groups or other factors to reveal disparities that are hidden by aggregate measures.", - "chapter_source": "responsible_engr", - "aliases": [], - "see_also": [] - }, - { - "term": "distributed computing", - "definition": "An approach that processes data across multiple machines or processors simultaneously, enabling scalable handling of large datasets through frameworks like Apache Spark.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "distributed intelligence", - "definition": "The placement of computational capabilities across multiple devices and locations rather than relying on a single centralized system, enabling local processing and decision-making.", - "chapter_source": "ml_systems", - "aliases": [], - "see_also": [] - }, - { - "term": "distributed training", - "definition": "A method of training machine learning models across multiple machines or devices to handle larger datasets and models that exceed single-device computational or memory capacity.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [], - "appears_in": [ - "benchmarking", - "conclusion", - "training" - ] - }, - { - "term": "distribution shift", - "definition": "A change in the statistical properties of data between training and deployment, or over time during deployment. Types include covariate shift (input distribution changes), label shift (output distribution changes), and concept drift (relationship between inputs and outputs changes).", - "chapter_source": "introduction", - "aliases": [], - "see_also": [] - }, - { - "term": "dlrm", - "definition": "Deep Learning Recommendation Model, an architecture developed by Meta that combines categorical embeddings with a bottom multi-layer perceptron (MLP) and top MLP to handle the massive scale and sparsity of recommendation system workloads.", - "chapter_source": "nn_architectures", - "aliases": [], - "see_also": [] - }, - { - "term": "domain-specific architecture", - "definition": "Hardware designs tailored to optimize specific computational workloads, trading flexibility for improved performance and energy efficiency compared to general-purpose processors.", - "chapter_source": "hw_acceleration", - "aliases": [], - "see_also": [] - }, - { - "term": "dropout", - "definition": "A regularization technique that randomly sets a fraction of input units to zero during training to prevent overfitting and improve generalization.", - "chapter_source": "nn_architectures", - "aliases": [], - "see_also": [] - }, - { - "term": "dying relu", - "definition": "A failure mode where ReLU neurons become permanently inactive, outputting zero for all inputs due to negative pre-activations.", - "chapter_source": "nn_computation", - "aliases": [], - "see_also": [] - }, - { - "term": "dying relu problem", - "definition": "A phenomenon where ReLU neurons become permanently inactive and output zero for all inputs, preventing them from contributing to learning when weighted inputs consistently produce negative values.", - "chapter_source": "training", - "aliases": [], - "see_also": [] - }, - { - "term": "dynamic graph", - "definition": "A computational graph that is built and modified during program execution, allowing for flexible model architectures and easier debugging but potentially limiting optimization opportunities compared to static graphs.", - "chapter_source": "frameworks", - "aliases": [], - "see_also": [] - }, - { - "term": "dynamic pruning", - "definition": "A model optimization technique that removes unnecessary parameters from neural networks while maintaining predictive performance, reducing model size and computational cost by eliminating redundant weights, neurons, or layers.", - "chapter_source": "optimizations", - "aliases": [], - "see_also": [] - }, - { - "term": "dynamic quantization", - "definition": "The process of reducing numerical precision in neural networks by mapping high-precision weights and activations to lower-bit representations, significantly reducing memory usage and computational requirements", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [], - "appears_in": [ - "benchmarking", - "optimizations" - ] - }, - { - "term": "dynamic random access memory (dram)", - "definition": "A type of volatile memory that stores data in capacitors and requires periodic refresh cycles, commonly used as main memory in computer systems.", - "chapter_source": "hw_acceleration", - "aliases": [], - "see_also": [] - }, - { - "term": "dynamic voltage and frequency scaling (dvfs)", - "definition": "Power management technique that adjusts processor voltage and clock frequency based on workload demands to optimize energy consumption while maintaining performance.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "eager execution", - "definition": "An execution mode where operations are evaluated immediately as they are called in the code, providing intuitive debugging and development experience but potentially sacrificing some optimization opportunities available in graph-based execution.", - "chapter_source": "frameworks", - "aliases": [], - "see_also": [] - }, - { - "term": "early exit architectures", - "definition": "Neural network designs that include multiple prediction heads at different depths, allowing samples to exit early when confident predictions can be made, reducing average computational cost per inference.", - "chapter_source": "optimizations", - "aliases": [], - "see_also": [] - }, - { - "term": "edge computing", - "definition": "A distributed computing paradigm that brings computation and data storage closer to the sources of data, reducing latency and bandwidth usage.", - "chapter_source": "conclusion", - "aliases": [], - "see_also": [], - "appears_in": [ - "conclusion", - "hw_acceleration", - "ml_systems" - ] - }, - { - "term": "edge deployment", - "definition": "A deployment strategy where machine learning models run locally on devices at the network edge rather than in centralized cloud servers, reducing latency and enabling operation without constant internet connectivity.", - "chapter_source": "ml_workflow", - "aliases": [], - "see_also": [] - }, - { - "term": "efficiency frontier", - "definition": "The optimal trade-off curve between accuracy and computational cost (latency, energy, or memory), where no model exists that is both more accurate and more efficient.", - "chapter_source": "nn_architectures", - "aliases": [], - "see_also": [] - }, - { - "term": "efficientnet", - "definition": "A family of neural network architectures discovered through Neural Architecture Search that achieves better accuracy-efficiency trade-offs by using compound scaling to balance network depth, width, and input resolution.", - "chapter_source": "optimizations", - "aliases": [], - "see_also": [] - }, - { - "term": "eliza", - "definition": "One of the first chatbots created by MIT's Joseph Weizenbaum in 1966 that could simulate human conversation through pattern matching and substitution, notable because people began forming emotional attachments to this simple program.", - "chapter_source": "introduction", - "aliases": [], - "see_also": [] - }, - { - "term": "elt (extract, load, transform)", - "definition": "A data processing paradigm that first loads raw data into the target system before applying transformations, providing flexibility for evolving analytical needs.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "embedded systems", - "definition": "Computer systems with dedicated functions within larger mechanical or electrical systems, typically designed for specific tasks with real-time computing constraints.", - "chapter_source": "ml_systems", - "aliases": [], - "see_also": [] - }, - { - "term": "emergent behaviors", - "definition": "Unexpected system-wide patterns or characteristics that arise from the interaction of individual components, often becoming apparent only when systems operate at scale or in real-world conditions.", - "chapter_source": "ml_workflow", - "aliases": [], - "see_also": [] - }, - { - "term": "encoder-decoder", - "definition": "An architectural pattern where an encoder processes input into a compressed representation and a decoder generates output from this representation, commonly used in sequence-to-sequence tasks.", - "chapter_source": "nn_architectures", - "aliases": [], - "see_also": [] - }, - { - "term": "end-to-end benchmarks", - "definition": "Comprehensive evaluation methodology that assesses entire AI system pipelines including data processing, model execution, post-processing, and infrastructure components.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "energy bandwidth", - "definition": "The constraint in battery-powered systems where the energy cost of transmitting data exceeds the energy cost of processing it locally, dictating edge processing.", - "chapter_source": "ml_systems", - "aliases": [], - "see_also": [] - }, - { - "term": "energy efficiency", - "definition": "The measure of computational work performed per unit of energy consumed, typically expressed as operations per joule and crucial for battery-powered and data center deployments", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [], - "appears_in": [ - "benchmarking", - "hw_acceleration" - ] - }, - { - "term": "energy star", - "definition": "EPA certification program that establishes energy efficiency standards for computing equipment, requiring systems to meet strict efficiency requirements during operation and sleep modes.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "epoch", - "definition": "One complete pass through the entire training dataset during neural network training, consisting of multiple batch iterations depending on dataset size and batch size.", - "chapter_source": "frameworks", - "aliases": [], - "see_also": [], - "appears_in": [ - "frameworks", - "nn_computation" - ] - }, - { - "term": "equal opportunity", - "definition": "A fairness criterion requiring equal true positive rates among qualified applicants across different demographic groups.", - "chapter_source": "responsible_engr", - "aliases": [], - "see_also": [] - }, - { - "term": "equalized odds", - "definition": "A fairness criterion requiring that both true positive and false positive rates are equal across different demographic groups.", - "chapter_source": "responsible_engr", - "aliases": [], - "see_also": [] - }, - { - "term": "etl (extract, transform, load)", - "definition": "A traditional data processing paradigm that transforms data before loading it into a data warehouse, resulting in ready-to-query formatted data.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "experiment tracking", - "definition": "The systematic recording and management of machine learning experiments, including hyperparameters, model versions, training data, and performance metrics, to enable comparison and reproducibility", - "chapter_source": "ml_ops", - "aliases": [], - "see_also": [], - "appears_in": [ - "ml_ops", - "ml_workflow" - ] - }, - { - "term": "expert systems", - "definition": "AI systems from the mid-1970s that captured human expert knowledge in specific domains, exemplified by MYCIN for diagnosing blood infections, representing a shift from general AI to domain-specific applications.", - "chapter_source": "introduction", - "aliases": [], - "see_also": [] - }, - { - "term": "farmbeats", - "definition": "A Microsoft Research project that applies machine learning and IoT technologies to agriculture, using edge computing to collect real-time data on soil conditions and crop health while demonstrating distributed AI systems in challenging real-world environments.", - "chapter_source": "introduction", - "aliases": [], - "see_also": [] - }, - { - "term": "feature engineering", - "definition": "The process of manually designing and extracting relevant features from raw data to improve machine learning model performance, largely automated in deep learning systems.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [], - "appears_in": [ - "data_engineering", - "nn_computation" - ] - }, - { - "term": "feature map", - "definition": "The output of a convolutional layer representing the response of learned filters to different spatial locations in the input, capturing detected features at various positions.", - "chapter_source": "nn_architectures", - "aliases": [], - "see_also": [] - }, - { - "term": "feature store", - "definition": "A specialized data storage system that provides standardized, reusable features for machine learning, enabling feature sharing across multiple models and teams", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [], - "appears_in": [ - "data_engineering", - "ml_ops" - ] - }, - { - "term": "federated learning", - "definition": "A machine learning approach that trains algorithms across decentralized edge devices or servers holding local data samples, without exchanging the raw data.", - "chapter_source": "conclusion", - "aliases": [], - "see_also": [], - "appears_in": [ - "conclusion", - "frameworks", - "ml_systems", - "ml_workflow" - ] - }, - { - "term": "feedback loop", - "definition": "A phenomenon where a model's outputs influence its own future training data, potentially reinforcing and amplifying initial biases over time.", - "chapter_source": "responsible_engr", - "aliases": [], - "see_also": [] - }, - { - "term": "feedback loops", - "definition": "Cyclical processes where outputs from later stages of the machine learning lifecycle inform and influence decisions in earlier stages, enabling continuous system improvement and adaptation.", - "chapter_source": "ml_workflow", - "aliases": [], - "see_also": [] - }, - { - "term": "feedforward network", - "definition": "A neural network architecture where information flows in one direction from input to output layers without cycles, forming the foundation for many deep learning models.", - "chapter_source": "nn_architectures", - "aliases": [], - "see_also": [], - "appears_in": [ - "nn_architectures", - "nn_computation" - ] - }, - { - "term": "field-programmable gate array", - "definition": "Reconfigurable hardware that can be programmed for specific tasks, offering flexibility between general-purpose processors and application-specific integrated circuits, useful for custom ML accelerations.", - "chapter_source": "training", - "aliases": [], - "see_also": [] - }, - { - "term": "field-programmable gate array (fpga)", - "definition": "A reconfigurable integrated circuit that can be programmed after manufacturing to implement custom digital circuits and specialized computations.", - "chapter_source": "hw_acceleration", - "aliases": [], - "see_also": [] - }, - { - "term": "five-pillar framework", - "definition": "An organizational structure for ML systems engineering comprising five interconnected disciplines: Data Engineering, Training Systems, Deployment Infrastructure, Operations and Monitoring, and Ethics and Governance.", - "chapter_source": "introduction", - "aliases": [], - "see_also": [] - }, - { - "term": "floating-point unit (fpu)", - "definition": "A specialized processor component designed to perform arithmetic operations on floating-point numbers with high precision and efficiency.", - "chapter_source": "hw_acceleration", - "aliases": [], - "see_also": [] - }, - { - "term": "flops", - "definition": "Floating Point Operations Per Second, a measure of computational throughput that quantifies the number of mathematical operations involving decimal numbers a system can perform.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [], - "appears_in": [ - "benchmarking", - "nn_computation", - "optimizations" - ] - }, - { - "term": "forward pass", - "definition": "The computation phase where input data flows through a neural network's layers to produce outputs, involving matrix multiplications and activation function applications.", - "chapter_source": "training", - "aliases": [], - "see_also": [] - }, - { - "term": "forward propagation", - "definition": "The process of computing neural network predictions by passing input data through successive layers, applying weights, biases, and activation functions at each stage.", - "chapter_source": "nn_computation", - "aliases": [], - "see_also": [] - }, - { - "term": "foundation model", - "definition": "Large-scale machine learning models trained on broad data that can be adapted to a wide range of downstream tasks, serving as a base for specialized applications.", - "chapter_source": "ml_systems", - "aliases": [], - "see_also": [] - }, - { - "term": "four pillars framework", - "definition": "A data engineering framework organizing concerns into Quality, Reliability, Scalability, and Governance to manage the data lifecycle.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "fp16", - "definition": "16-bit floating-point numerical representation that reduces memory usage and accelerates computation while maintaining acceptable precision for many machine learning applications.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "fp16 computation", - "definition": "The use of 16-bit floating-point arithmetic for neural network operations to reduce memory usage and increase computational speed on modern hardware accelerators.", - "chapter_source": "training", - "aliases": [], - "see_also": [] - }, - { - "term": "fp32", - "definition": "32-bit floating-point numerical representation that provides standard precision for mathematical computations but requires more memory and computational resources than lower-precision formats.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "fp32 to int8", - "definition": "A common quantization transformation that converts 32-bit floating point weights and activations to 8-bit integers, achieving roughly 4x memory reduction while maintaining acceptable accuracy for many models.", - "chapter_source": "optimizations", - "aliases": [], - "see_also": [] - }, - { - "term": "framework decomposition", - "definition": "The systematic breakdown of neural network frameworks into hardware-mappable components, enabling efficient distribution of operations across processing elements.", - "chapter_source": "hw_acceleration", - "aliases": [], - "see_also": [] - }, - { - "term": "gemm", - "definition": "General Matrix Multiply operations that follow the pattern C = αAB + βC, representing the fundamental computational kernel underlying most neural network operations including fully connected layers and convolutional layers.", - "chapter_source": "frameworks", - "aliases": [], - "see_also": [] - }, - { - "term": "gemv", - "definition": "General Matrix-Vector multiplication operations that compute the product of a matrix and a vector, commonly used in neural network computations and requiring careful optimization for memory access patterns.", - "chapter_source": "frameworks", - "aliases": [], - "see_also": [] - }, - { - "term": "generalization", - "definition": "The ability of a machine learning model to perform well on unseen data that differs from the training set, often improved through diverse and high-quality training data.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "generalization gap", - "definition": "The difference between a model's performance on training data and its performance on unseen real-world data. A large generalization gap indicates the model has memorized training examples rather than learning transferable patterns.", - "chapter_source": "introduction", - "aliases": [], - "see_also": [] - }, - { - "term": "generative ai", - "definition": "A category of artificial intelligence systems capable of creating new content such as text, images, audio, or video based on learned patterns from training data.", - "chapter_source": "conclusion", - "aliases": [], - "see_also": [] - }, - { - "term": "gpt-2", - "definition": "A 1.5-billion parameter autoregressive language model released by OpenAI in 2019, serving as a primary Lighthouse Model for analyzing memory bandwidth constraints in Transformer inference.", - "chapter_source": "nn_architectures", - "aliases": [], - "see_also": [] - }, - { - "term": "gpu", - "definition": "Graphics Processing Unit, a specialized electronic circuit designed to rapidly manipulate and alter memory to accelerate the creation of images and parallel processing tasks.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [], - "appears_in": [ - "benchmarking", - "ml_systems" - ] - }, - { - "term": "graceful degradation", - "definition": "A system design principle where services continue functioning with reduced capabilities when faced with partial failures or data unavailability.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "gradient accumulation", - "definition": "A technique that simulates larger batch sizes by accumulating gradients from multiple smaller batches before updating model parameters, enabling training with limited memory.", - "chapter_source": "training", - "aliases": [], - "see_also": [] - }, - { - "term": "gradient clipping", - "definition": "A regularization technique that prevents gradient explosion by limiting the magnitude of gradients during backpropagation, typically by scaling gradients when their norm exceeds a threshold.", - "chapter_source": "frameworks", - "aliases": [], - "see_also": [], - "appears_in": [ - "frameworks", - "training" - ] - }, - { - "term": "gradient compression", - "definition": "A technique used in distributed training to reduce the communication overhead by compressing gradient information exchanged between computing nodes.", - "chapter_source": "conclusion", - "aliases": [], - "see_also": [] - }, - { - "term": "gradient descent", - "definition": "An optimization algorithm that iteratively adjusts neural network parameters in the direction that minimizes the loss function, using gradients to determine update directions and magnitudes.", - "chapter_source": "frameworks", - "aliases": [], - "see_also": [], - "appears_in": [ - "frameworks", - "nn_architectures", - "nn_computation", - "training" - ] - }, - { - "term": "gradient synchronization", - "definition": "The process in distributed training where locally computed gradients are aggregated across devices to ensure all devices update their parameters consistently.", - "chapter_source": "training", - "aliases": [], - "see_also": [] - }, - { - "term": "gradient-based pruning", - "definition": "A pruning method that uses gradient information during training to identify neurons or filters with smaller gradient magnitudes, which contribute less to reducing the loss function and can be safely removed.", - "chapter_source": "optimizations", - "aliases": [], - "see_also": [] - }, - { - "term": "graphics processing unit", - "definition": "A specialized processor originally designed for rendering graphics that provides parallel processing capabilities essential for efficient neural network computation and training.", - "chapter_source": "nn_computation", - "aliases": [], - "see_also": [], - "appears_in": [ - "nn_computation", - "training" - ] - }, - { - "term": "graphics processing unit (gpu)", - "definition": "A specialized processor originally designed for graphics rendering that provides massive parallel computing capabilities well-suited for neural network computations.", - "chapter_source": "hw_acceleration", - "aliases": [], - "see_also": [] - }, - { - "term": "green ai", - "definition": "A movement in AI research and practice that prioritizes computational efficiency and energy consumption as primary metrics alongside traditional performance metrics like accuracy.", - "chapter_source": "responsible_engr", - "aliases": [], - "see_also": [] - }, - { - "term": "green500", - "definition": "Ranking system that evaluates the world's most powerful supercomputers based on energy efficiency measured in FLOPS per watt rather than raw computational performance.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "ground truth", - "definition": "The objective reality or actual state of the phenomenon being observed, used as the reference standard (labels) for training and evaluating machine learning models.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "groupwise quantization", - "definition": "A quantization approach where parameters are divided into groups, with each group sharing quantization parameters, offering a balance between compression and accuracy by providing more granular control than layerwise methods.", - "chapter_source": "optimizations", - "aliases": [], - "see_also": [] - }, - { - "term": "gru", - "definition": "Gated Recurrent Unit, a simplified variant of LSTM that uses fewer gates while maintaining the ability to capture long-term dependencies in sequential data.", - "chapter_source": "nn_architectures", - "aliases": [], - "see_also": [] - }, - { - "term": "hardware abstraction", - "definition": "The layer in ML frameworks that provides a unified interface to diverse computing hardware (CPUs, GPUs, TPUs, accelerators) while handling device-specific optimizations and memory management behind the scenes.", - "chapter_source": "frameworks", - "aliases": [], - "see_also": [] - }, - { - "term": "hardware acceleration", - "definition": "The use of specialized computing hardware to perform certain operations faster and more efficiently than software running on general-purpose processors.", - "chapter_source": "hw_acceleration", - "aliases": [], - "see_also": [] - }, - { - "term": "hardware accelerator", - "definition": "Specialized computing hardware designed to efficiently execute specific types of computations, such as GPUs for parallel processing or TPUs for machine learning workloads.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "hardware-aware design", - "definition": "The practice of designing neural network architectures specifically optimized for target hardware platforms, considering factors like memory hierarchy, compute units, and data movement patterns to maximize efficiency.", - "chapter_source": "optimizations", - "aliases": [], - "see_also": [] - }, - { - "term": "hdfs (hadoop distributed file system)", - "definition": "A distributed file system designed to store large datasets across clusters of commodity hardware, providing scalability and fault tolerance for big data applications.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "hidden layer", - "definition": "An intermediate layer in a neural network between input and output layers that learns abstract representations by transforming data through learned weights and activation functions.", - "chapter_source": "nn_computation", - "aliases": [], - "see_also": [] - }, - { - "term": "hidden state", - "definition": "The internal memory of recurrent neural networks that carries information from previous time steps, enabling the network to maintain context across sequential inputs.", - "chapter_source": "nn_architectures", - "aliases": [], - "see_also": [] - }, - { - "term": "hierarchical processing", - "definition": "A multi-tier system architecture where data and intelligence flow between different levels of the computing stack, from sensors to edge devices to cloud systems.", - "chapter_source": "ml_systems", - "aliases": [], - "see_also": [] - }, - { - "term": "high bandwidth memory (hbm)", - "definition": "An advanced memory technology that provides much higher bandwidth than traditional DRAM by using 3D stacking and wide interfaces, critical for data-intensive AI workloads.", - "chapter_source": "hw_acceleration", - "aliases": [], - "see_also": [] - }, - { - "term": "horizontal scaling", - "definition": "Increasing system capacity by adding more machines or instances rather than upgrading existing hardware, providing better fault tolerance and load distribution.", - "chapter_source": "ml_ops", - "aliases": [], - "see_also": [] - }, - { - "term": "hybrid machine learning", - "definition": "The integration of multiple ML paradigms such as cloud, edge, mobile, and tiny ML to form unified distributed systems that leverage complementary strengths.", - "chapter_source": "ml_systems", - "aliases": [], - "see_also": [] - }, - { - "term": "hybrid parallelism", - "definition": "A distributed training approach that combines data parallelism and model parallelism to leverage the benefits of both strategies for training very large models.", - "chapter_source": "training", - "aliases": [], - "see_also": [] - }, - { - "term": "hyperparameter", - "definition": "A configuration setting that controls the learning process but is not learned from data, such as learning rate, batch size, or network architecture choices.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [], - "appears_in": [ - "benchmarking", - "frameworks", - "nn_computation" - ] - }, - { - "term": "hyperparameters", - "definition": "Configuration settings that control the learning process of machine learning algorithms but are not learned from data, such as learning rate, batch size, and network architecture parameters.", - "chapter_source": "ml_workflow", - "aliases": [], - "see_also": [] - }, - { - "term": "hyperscale data center", - "definition": "Large-scale data center facilities containing thousands of servers and covering extensive floor space, designed to efficiently support massive computing workloads.", - "chapter_source": "ml_systems", - "aliases": [], - "see_also": [] - }, - { - "term": "imagenet", - "definition": "A massive visual database containing over 14 million labeled images across 20,000+ categories, created by Stanford's Fei-Fei Li starting in 2009, whose annual challenge became instrumental in driving breakthrough advances in computer vision", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [], - "appears_in": [ - "benchmarking", - "introduction" - ] - }, - { - "term": "imperative programming", - "definition": "A programming paradigm where operations are executed immediately as they are encountered in the code, allowing for natural control flow and easier debugging but potentially limiting optimization opportunities.", - "chapter_source": "frameworks", - "aliases": [], - "see_also": [] - }, - { - "term": "inference", - "definition": "The operational phase where trained neural networks make predictions on new data using fixed parameters, without weight updates.", - "chapter_source": "hw_acceleration", - "aliases": [], - "see_also": [], - "appears_in": [ - "hw_acceleration", - "nn_computation" - ] - }, - { - "term": "information-compute ratio (icr)", - "definition": "A metric quantifying the efficiency of data selection, defined as the ratio of model performance gain to the computational cost (FLOPs) required to achieve it. Maximizing ICR is the primary goal of data selection strategies.", - "chapter_source": "data_selection", - "aliases": [], - "see_also": [] - }, - { - "term": "infrastructure as code", - "definition": "Practice of managing and provisioning computing infrastructure through machine-readable configuration files rather than manual processes, enabling version control and automation.", - "chapter_source": "ml_ops", - "aliases": [], - "see_also": [] - }, - { - "term": "instruction set architecture (isa)", - "definition": "The interface between software and hardware that defines the set of instructions a processor can execute, including data types and addressing modes.", - "chapter_source": "hw_acceleration", - "aliases": [], - "see_also": [] - }, - { - "term": "int8", - "definition": "8-bit integer numerical representation used in quantized neural networks to reduce memory usage and accelerate inference while attempting to maintain model accuracy.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "int8 quantization", - "definition": "A numerical precision reduction technique that represents model weights and activations using 8-bit integers instead of 32-bit floating point numbers, reducing memory usage and enabling faster inference on specialized hardware", - "chapter_source": "hw_acceleration", - "aliases": [], - "see_also": [], - "appears_in": [ - "hw_acceleration", - "optimizations" - ] - }, - { - "term": "internet of things", - "definition": "A network of physical objects embedded with sensors, software, and other technologies that connect and exchange data with other devices and systems over the internet.", - "chapter_source": "ml_systems", - "aliases": [], - "see_also": [] - }, - { - "term": "intersectional analysis", - "definition": "Evaluation that considers combinations of demographic attributes (e.g., race and gender simultaneously) to detect concentrated harms not visible in single-factor analysis.", - "chapter_source": "responsible_engr", - "aliases": [], - "see_also": [] - }, - { - "term": "iops", - "definition": "Input/Output Operations Per Second; a storage performance metric measuring the number of read/write operations a device can handle per second, critical for random access workloads like training data loading.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "iron law of ml systems", - "definition": "A quantitative framework decomposing ML system performance into three terms: Data (limited by bandwidth), Compute (limited by FLOPS), and Latency (limited by overhead). Formulated as T = D_vol/BW + O/(R_peak * eta) + L_lat.", - "chapter_source": "introduction", - "aliases": [], - "see_also": [] - }, - { - "term": "iterative pruning", - "definition": "A gradual pruning strategy that removes parameters in multiple stages with fine-tuning between each stage, allowing the model to adapt to reduced capacity and typically achieving better accuracy than one-shot pruning.", - "chapter_source": "optimizations", - "aliases": [], - "see_also": [] - }, - { - "term": "jax", - "definition": "A numerical computing library developed by Google Research that combines NumPy's API with functional programming transformations including automatic differentiation, just-in-time compilation, and automatic vectorization for high-performance machine learning research.", - "chapter_source": "frameworks", - "aliases": [], - "see_also": [] - }, - { - "term": "jit compilation", - "definition": "Just-In-Time compilation that analyzes and optimizes code at runtime, enabling frameworks to balance the flexibility of eager execution with the performance benefits of graph optimization by compiling frequently used functions.", - "chapter_source": "frameworks", - "aliases": [], - "see_also": [] - }, - { - "term": "k-anonymity", - "definition": "A privacy technique that ensures each record in a dataset is indistinguishable from at least k-1 other records by generalizing quasi-identifiers.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "kernel", - "definition": "A small matrix of learnable weights used in convolutional layers to detect specific features through the convolution operation, also called a filter.", - "chapter_source": "nn_architectures", - "aliases": [], - "see_also": [] - }, - { - "term": "kernel fusion", - "definition": "An optimization technique that combines multiple computational operations into a single kernel to reduce memory transfers and improve performance on parallel processors.", - "chapter_source": "hw_acceleration", - "aliases": [], - "see_also": [] - }, - { - "term": "key performance indicators", - "definition": "Specific, measurable metrics used to evaluate the success and effectiveness of machine learning systems, such as accuracy, precision, recall, latency, and throughput.", - "chapter_source": "ml_workflow", - "aliases": [], - "see_also": [] - }, - { - "term": "keyword spotting (kws)", - "definition": "A technology that detects specific wake words or phrases in audio streams, typically used in voice-activated devices with constraints on power consumption and latency.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "knowledge distillation", - "definition": "A model compression technique where a smaller \"student\" network learns to mimic the behavior of a larger \"teacher\" network by training on the teacher's soft output probabilities rather than just hard labels", - "chapter_source": "conclusion", - "aliases": [], - "see_also": [], - "appears_in": [ - "conclusion", - "optimizations" - ] - }, - { - "term": "l0-norm constraint", - "definition": "A regularization technique that counts the number of non-zero parameters in a model, used in structured pruning to directly control model sparsity by penalizing the number of active weights.", - "chapter_source": "optimizations", - "aliases": [], - "see_also": [] - }, - { - "term": "lapack", - "definition": "Linear Algebra Package that extends BLAS with higher-level linear algebra operations including matrix decompositions, eigenvalue problems, and linear system solutions, providing essential mathematical foundations for machine learning computations.", - "chapter_source": "frameworks", - "aliases": [], - "see_also": [] - }, - { - "term": "latency", - "definition": "The time delay between a request for data and the delivery of that data, critical in real-time applications where immediate responses are required.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [], - "appears_in": [ - "benchmarking", - "hw_acceleration", - "ml_systems" - ] - }, - { - "term": "latency constraints", - "definition": "Real-time requirements that limit the maximum acceptable delay for model inference, driving optimization decisions in deployment scenarios where response time is critical.", - "chapter_source": "optimizations", - "aliases": [], - "see_also": [] - }, - { - "term": "layer normalization", - "definition": "A normalization technique that normalizes inputs across the features dimension for each sample, commonly used in transformer architectures to stabilize training.", - "chapter_source": "nn_architectures", - "aliases": [], - "see_also": [] - }, - { - "term": "layerwise quantization", - "definition": "A quantization granularity where all parameters within a single layer share the same quantization parameters, providing computational efficiency but potentially limiting representational precision compared to finer-grained approaches.", - "chapter_source": "optimizations", - "aliases": [], - "see_also": [] - }, - { - "term": "learning rate", - "definition": "A hyperparameter that determines the step size for weight updates during gradient descent optimization, critically affecting training stability and convergence speed.", - "chapter_source": "frameworks", - "aliases": [], - "see_also": [], - "appears_in": [ - "frameworks", - "nn_computation" - ] - }, - { - "term": "learning rate scheduling", - "definition": "The systematic adjustment of learning rates during training, using strategies like step decay, exponential decay, or cosine annealing to improve convergence and final model performance.", - "chapter_source": "training", - "aliases": [], - "see_also": [] - }, - { - "term": "lifecycle coherence", - "definition": "The principle that all stages of ML development should align with overall system objectives, maintaining consistency in data handling, model architecture, and evaluation criteria.", - "chapter_source": "ml_workflow", - "aliases": [], - "see_also": [] - }, - { - "term": "linear scaling failure", - "definition": "The phenomenon where increasing computing resources (e.g., doubling GPUs) results in sub-linear performance gains due to communication overhead and synchronization costs.", - "chapter_source": "training", - "aliases": [], - "see_also": [] - }, - { - "term": "linpack", - "definition": "Benchmark developed at Argonne National Laboratory that measures system performance by solving dense systems of linear equations, famous for its use in Top500 supercomputer rankings.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "llama", - "definition": "Large Language Model Meta AI, a family of open foundation models that popularized efficient architectural choices like RMSNorm and SwiGLU, serving as a modern reference point for large-scale Transformer efficiency.", - "chapter_source": "nn_architectures", - "aliases": [], - "see_also": [] - }, - { - "term": "load balancing", - "definition": "Distribution of incoming requests across multiple server instances to prevent bottlenecks, improve response times, and ensure high availability.", - "chapter_source": "ml_ops", - "aliases": [], - "see_also": [] - }, - { - "term": "logits", - "definition": "The raw, unnormalized scores output by the last layer of a neural network before the activation function (like Softmax) converts them into probabilities.", - "chapter_source": "nn_computation", - "aliases": [], - "see_also": [] - }, - { - "term": "loss function", - "definition": "A mathematical function that quantifies the difference between neural network predictions and true labels, providing the optimization objective for training algorithms.", - "chapter_source": "nn_computation", - "aliases": [], - "see_also": [] - }, - { - "term": "loss scaling", - "definition": "A technique used in mixed-precision training that multiplies the loss by a large factor before backpropagation to prevent gradient underflow in reduced precision formats.", - "chapter_source": "training", - "aliases": [], - "see_also": [] - }, - { - "term": "lottery ticket hypothesis", - "definition": "The theory that large neural networks contain sparse subnetworks that, when trained in isolation from proper initialization, can achieve comparable accuracy to the full network while being significantly smaller.", - "chapter_source": "optimizations", - "aliases": [], - "see_also": [] - }, - { - "term": "low-rank factorization", - "definition": "A matrix decomposition technique that approximates large weight matrices as products of smaller matrices, reducing the number of parameters and computational operations required for neural network layers.", - "chapter_source": "optimizations", - "aliases": [], - "see_also": [] - }, - { - "term": "lstm", - "definition": "Long Short-Term Memory, a type of recurrent neural network architecture designed to handle long-term dependencies through gating mechanisms that control information flow.", - "chapter_source": "nn_architectures", - "aliases": [], - "see_also": [] - }, - { - "term": "machine learning", - "definition": "A subset of artificial intelligence that enables systems to automatically improve performance on tasks through experience and data rather than explicit programming.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [], - "appears_in": [ - "benchmarking", - "introduction", - "ml_systems", - "nn_computation" - ] - }, - { - "term": "machine learning accelerator (ml accelerator)", - "definition": "Specialized computing hardware designed to efficiently execute machine learning workloads through optimized matrix operations, memory hierarchies, and parallel processing units.", - "chapter_source": "hw_acceleration", - "aliases": [], - "see_also": [] - }, - { - "term": "machine learning framework", - "definition": "A software platform that provides tools and abstractions for designing, training, and deploying machine learning models, bridging user applications with infrastructure through computational graphs, hardware optimization, and workflow orchestration.", - "chapter_source": "frameworks", - "aliases": [], - "see_also": [] - }, - { - "term": "machine learning frameworks", - "definition": "Software libraries and platforms that provide tools, APIs, and abstractions for developing, training, and deploying machine learning models, such as TensorFlow and PyTorch.", - "chapter_source": "conclusion", - "aliases": [], - "see_also": [] - }, - { - "term": "machine learning lifecycle", - "definition": "A structured, iterative process that encompasses all stages involved in developing, deploying, and maintaining machine learning systems, from problem definition through ongoing monitoring and improvement.", - "chapter_source": "ml_workflow", - "aliases": [], - "see_also": [] - }, - { - "term": "machine learning operations", - "definition": "The practice and set of tools focused on operationalizing machine learning models through automation, monitoring, and management of the entire ML pipeline from development to production.", - "chapter_source": "ml_workflow", - "aliases": [], - "see_also": [] - }, - { - "term": "machine learning systems engineering", - "definition": "The engineering discipline focused on building reliable, efficient, and scalable AI systems across computational platforms, spanning the entire AI lifecycle from data acquisition through deployment and operations with emphasis on resource-awareness and system-level optimization.", - "chapter_source": "introduction", - "aliases": [], - "see_also": [] - }, - { - "term": "macro benchmarks", - "definition": "Evaluation methodology that assesses complete machine learning models to understand how architectural choices and component interactions affect overall system behavior and performance.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "magnitude-based pruning", - "definition": "The most common pruning method that removes parameters with the smallest absolute values, based on the assumption that weights with smaller magnitudes contribute less to the model's output", - "chapter_source": "conclusion", - "aliases": [], - "see_also": [], - "appears_in": [ - "conclusion", - "optimizations" - ] - }, - { - "term": "mapping optimization", - "definition": "The process of assigning neural network operations to hardware resources in a way that minimizes communication overhead and maximizes utilization of available compute units.", - "chapter_source": "hw_acceleration", - "aliases": [], - "see_also": [] - }, - { - "term": "masking", - "definition": "An anonymization technique that alters or obfuscates sensitive values so they cannot be directly traced back to the original data subject.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "memory bandwidth", - "definition": "Rate at which data can be read from or written to memory, measured in bytes per second, which often becomes a bottleneck in memory-intensive machine learning workloads.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "memory hierarchy", - "definition": "The organization of memory systems with different access speeds and capacities, from fast on-chip caches to slower off-chip main memory.", - "chapter_source": "hw_acceleration", - "aliases": [], - "see_also": [] - }, - { - "term": "memory wall", - "definition": "The widening performance gap between processor speed and memory bandwidth, where computational capacity outpaces the rate at which data can be delivered to the processor, becoming a primary bottleneck for large ML models.", - "chapter_source": "ml_systems", - "aliases": [], - "see_also": [] - }, - { - "term": "metadata", - "definition": "Descriptive information about datasets that includes details about data collection, quality metrics, validation status, and other contextual information essential for data management.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "micro benchmarks", - "definition": "Specialized evaluation tools that assess individual components or specific operations within machine learning systems, such as tensor operations or neural network layers.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "microcontroller", - "definition": "A small computer on a single integrated circuit containing a processor core, memory, and programmable input/output peripherals, commonly used in embedded systems.", - "chapter_source": "ml_systems", - "aliases": [], - "see_also": [] - }, - { - "term": "mini-batch gradient descent", - "definition": "A training approach that computes gradients and updates weights using a small subset of training examples simultaneously, balancing computational efficiency with gradient estimation quality.", - "chapter_source": "nn_computation", - "aliases": [], - "see_also": [] - }, - { - "term": "mini-batch processing", - "definition": "An optimization approach that computes gradients over small batches of examples, balancing the computational efficiency of batch processing with the memory constraints of stochastic methods.", - "chapter_source": "training", - "aliases": [], - "see_also": [] - }, - { - "term": "mixed-precision computing", - "definition": "A technique that uses different numerical precisions at various stages of computation, such as FP16 for matrix multiplications and FP32 for accumulations.", - "chapter_source": "hw_acceleration", - "aliases": [], - "see_also": [] - }, - { - "term": "mixed-precision training", - "definition": "A training methodology that combines different numerical precisions (typically FP16 and FP32) to optimize memory usage and computational speed while maintaining training stability.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [], - "appears_in": [ - "benchmarking", - "conclusion", - "optimizations", - "training" - ] - }, - { - "term": "ml lifecycle", - "definition": "The comprehensive process of developing, deploying, and maintaining machine learning systems, encompassing data collection, model development, training, evaluation, deployment, monitoring, and iterative improvement with continuous feedback loops.", - "chapter_source": "introduction", - "aliases": [], - "see_also": [] - }, - { - "term": "ml systems", - "definition": "Integrated computing systems comprising three core components: data that guides algorithmic behavior, learning algorithms that extract patterns from data, and computing infrastructure that enables both training and inference processes.", - "chapter_source": "introduction", - "aliases": [], - "see_also": [] - }, - { - "term": "ml systems spectrum", - "definition": "The range of machine learning system deployments from cloud-based systems with abundant resources to tiny embedded devices with severe constraints, each requiring different optimization strategies and trade-offs.", - "chapter_source": "nn_computation", - "aliases": [], - "see_also": [] - }, - { - "term": "mlcommons", - "definition": "Organization that develops and maintains industry-standard benchmarks for machine learning systems, including the MLPerf suite for training and inference evaluation.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "mlops", - "definition": "Engineering discipline that manages the end-to-end lifecycle of machine learning systems, combining ML development with operational practices for reliable production deployment", - "chapter_source": "conclusion", - "aliases": [], - "see_also": [], - "appears_in": [ - "conclusion", - "ml_ops" - ] - }, - { - "term": "mlperf", - "definition": "Industry-standard benchmark suite that provides standardized tests for training and inference across various deep learning workloads, enabling fair comparisons of machine learning systems.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "mlperf inference", - "definition": "Benchmark framework that evaluates machine learning inference performance across different deployment environments, from cloud data centers to mobile devices and embedded systems.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "mlperf mobile", - "definition": "Specialized benchmark that extends MLPerf evaluation to smartphones and mobile devices, measuring latency and responsiveness under strict power and memory constraints.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "mlperf tiny", - "definition": "Benchmark designed for embedded and ultra-low-power AI systems such as IoT devices, wearables, and microcontrollers operating with minimal processing capabilities.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "mlperf training", - "definition": "Standardized benchmark that evaluates machine learning training performance by measuring time-to-accuracy, throughput, and resource utilization across different hardware platforms.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "mobile machine learning", - "definition": "The execution of machine learning models directly on portable, battery-powered devices like smartphones and tablets, enabling personalized and responsive applications.", - "chapter_source": "ml_systems", - "aliases": [], - "see_also": [] - }, - { - "term": "model cards", - "definition": "A standardized format for documenting machine learning models, capturing information essential for responsible deployment, including intended use, performance factors, and ethical considerations.", - "chapter_source": "responsible_engr", - "aliases": [], - "see_also": [] - }, - { - "term": "model compression", - "definition": "Techniques used to reduce the size and computational requirements of machine learning models while preserving accuracy, enabling deployment on resource-constrained devices.", - "chapter_source": "conclusion", - "aliases": [], - "see_also": [], - "appears_in": [ - "conclusion", - "ml_ops", - "ml_systems", - "optimizations" - ] - }, - { - "term": "model deployment", - "definition": "The process of integrating trained machine learning models into production systems where they can make predictions on new data and provide value to end users", - "chapter_source": "ml_ops", - "aliases": [], - "see_also": [], - "appears_in": [ - "ml_ops", - "ml_workflow" - ] - }, - { - "term": "model drift", - "definition": "The degradation of machine learning model performance over time due to changes in data patterns, user behavior, or environmental conditions that differ from the original training conditions", - "chapter_source": "ml_ops", - "aliases": [], - "see_also": [], - "appears_in": [ - "ml_ops", - "ml_workflow" - ] - }, - { - "term": "model evaluation", - "definition": "The systematic assessment of machine learning model performance using various metrics and validation techniques to determine whether the model meets requirements and is ready for deployment.", - "chapter_source": "ml_workflow", - "aliases": [], - "see_also": [] - }, - { - "term": "model optimization", - "definition": "The systematic refinement of machine learning models to enhance their efficiency while maintaining effectiveness, balancing trade-offs between accuracy, computational cost, memory usage, latency, and energy efficiency", - "chapter_source": "ml_workflow", - "aliases": [], - "see_also": [], - "appears_in": [ - "ml_workflow", - "optimizations" - ] - }, - { - "term": "model parallelism", - "definition": "A distributed training strategy that splits a neural network model across multiple devices, with each device responsible for computing a portion of the network.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [], - "appears_in": [ - "benchmarking", - "conclusion", - "frameworks", - "training" - ] - }, - { - "term": "model quantization", - "definition": "The process of reducing the precision of numerical representations in machine learning models, typically from 32-bit to 8-bit integers, to decrease model size and increase inference speed.", - "chapter_source": "ml_systems", - "aliases": [], - "see_also": [] - }, - { - "term": "model registry", - "definition": "Centralized repository for storing, versioning, and managing trained machine learning models with associated metadata, facilitating model governance and deployment.", - "chapter_source": "ml_ops", - "aliases": [], - "see_also": [] - }, - { - "term": "model serving", - "definition": "Infrastructure and systems that expose deployed machine learning models through APIs to handle prediction requests at scale with appropriate latency and throughput.", - "chapter_source": "ml_ops", - "aliases": [], - "see_also": [] - }, - { - "term": "model training", - "definition": "The process of using machine learning algorithms to learn patterns from training data, adjusting model parameters to minimize prediction errors and create a functional predictive system.", - "chapter_source": "ml_workflow", - "aliases": [], - "see_also": [] - }, - { - "term": "model validation", - "definition": "The process of testing machine learning models on independent datasets to assess their generalization ability and ensure they perform reliably on unseen data", - "chapter_source": "ml_ops", - "aliases": [], - "see_also": [], - "appears_in": [ - "ml_ops", - "ml_workflow" - ] - }, - { - "term": "model versioning", - "definition": "The systematic tracking and management of different versions of machine learning models, including their parameters, training data, and performance metrics, to enable comparison and rollback capabilities", - "chapter_source": "ml_ops", - "aliases": [], - "see_also": [], - "appears_in": [ - "ml_ops", - "ml_workflow" - ] - }, - { - "term": "model-centric ai", - "definition": "A research paradigm where the dataset is treated as fixed and engineering effort focuses on optimizing model architecture.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "momentum", - "definition": "An optimization technique that accumulates a velocity vector across iterations to help gradient descent navigate through local minima and accelerate convergence in consistent gradient directions.", - "chapter_source": "training", - "aliases": [], - "see_also": [] - }, - { - "term": "monitoring", - "definition": "The continuous observation and measurement of machine learning system performance, data quality, and operational metrics in production to detect issues and trigger maintenance actions.", - "chapter_source": "ml_workflow", - "aliases": [], - "see_also": [] - }, - { - "term": "multi-head attention", - "definition": "An attention mechanism that uses multiple parallel attention heads, each focusing on different aspects of the input to capture diverse types of relationships simultaneously.", - "chapter_source": "nn_architectures", - "aliases": [], - "see_also": [] - }, - { - "term": "multi-layer perceptron", - "definition": "A feedforward neural network with one or more hidden layers between input and output, capable of learning non-linear mappings through dense connections and activation functions.", - "chapter_source": "nn_architectures", - "aliases": [], - "see_also": [] - }, - { - "term": "multilayer perceptron", - "definition": "A feedforward neural network with one or more hidden layers between input and output layers, capable of learning nonlinear relationships in data.", - "chapter_source": "nn_computation", - "aliases": [], - "see_also": [] - }, - { - "term": "mycin", - "definition": "One of the first large-scale expert systems developed at Stanford in 1976 to diagnose blood infections, representing the shift toward capturing human expert knowledge in specific domains rather than pursuing general artificial intelligence.", - "chapter_source": "introduction", - "aliases": [], - "see_also": [] - }, - { - "term": "nas-generated architecture", - "definition": "Neural network architectures discovered through automated Neural Architecture Search rather than manual design, often achieving better efficiency-accuracy trade-offs through exhaustive exploration of design spaces.", - "chapter_source": "optimizations", - "aliases": [], - "see_also": [] - }, - { - "term": "network structure modification", - "definition": "Architectural changes to neural networks that improve efficiency, including techniques like depthwise separable convolutions, bottleneck layers, and efficient attention mechanisms that reduce computational complexity.", - "chapter_source": "optimizations", - "aliases": [], - "see_also": [] - }, - { - "term": "neural architecture search", - "definition": "An automated approach that uses machine learning algorithms to discover optimal neural network architectures by searching through possible combinations of layers, connections, and hyperparameters for specific constraints.", - "chapter_source": "optimizations", - "aliases": [], - "see_also": [] - }, - { - "term": "neural network", - "definition": "A computational model consisting of interconnected nodes organized in layers that can learn to map inputs to outputs through adjustable connection weights.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [], - "appears_in": [ - "benchmarking", - "nn_architectures", - "nn_computation" - ] - }, - { - "term": "neural processing unit (npu)", - "definition": "Specialized processors designed specifically for accelerating neural network operations and machine learning computations, optimized for parallel processing of AI workloads.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [], - "appears_in": [ - "benchmarking", - "hw_acceleration", - "ml_systems" - ] - }, - { - "term": "neuromorphic computing", - "definition": "A computing approach that mimics the structure and function of biological neural networks, potentially offering more energy-efficient processing for AI applications.", - "chapter_source": "conclusion", - "aliases": [], - "see_also": [] - }, - { - "term": "nosql", - "definition": "A category of database systems designed to handle large volumes of unstructured or semi-structured data with flexible schemas, often used in big data applications.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "numerical precision optimization", - "definition": "The dimension of model optimization that addresses how numerical values are represented and processed, including quantization techniques that map high-precision values to lower-bit representations.", - "chapter_source": "optimizations", - "aliases": [], - "see_also": [] - }, - { - "term": "observability", - "definition": "Comprehensive monitoring approach that provides insight into system behavior through metrics, logs, and traces, enabling understanding of internal states from external outputs.", - "chapter_source": "ml_ops", - "aliases": [], - "see_also": [] - }, - { - "term": "olap (online analytical processing)", - "definition": "A database approach optimized for complex analytical queries across large datasets, typically used in data warehouses for business intelligence.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "oltp (online transaction processing)", - "definition": "A database approach optimized for frequent, short transactions and real-time processing, commonly used in operational applications.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "on-chip memory", - "definition": "Fast memory integrated directly onto the processor chip, including caches and scratchpad memory, providing high bandwidth and low latency data access.", - "chapter_source": "hw_acceleration", - "aliases": [], - "see_also": [] - }, - { - "term": "on-device learning", - "definition": "The capability for machine learning models to adapt and learn directly on edge devices without requiring data transmission to external servers.", - "chapter_source": "conclusion", - "aliases": [], - "see_also": [] - }, - { - "term": "one-hot encoding", - "definition": "A representation where categorical labels become vectors with a single 1 and remaining 0s.", - "chapter_source": "nn_computation", - "aliases": [], - "see_also": [] - }, - { - "term": "one-shot pruning", - "definition": "A pruning strategy where a large fraction of parameters is removed in a single step, typically followed by fine-tuning to recover accuracy, offering simplicity but potentially requiring more aggressive fine-tuning.", - "chapter_source": "optimizations", - "aliases": [], - "see_also": [] - }, - { - "term": "online inference", - "definition": "Real-time prediction serving that processes individual requests with low latency, suitable for interactive applications requiring immediate responses.", - "chapter_source": "ml_ops", - "aliases": [], - "see_also": [] - }, - { - "term": "onnx", - "definition": "Open Neural Network Exchange, a standardized format for representing machine learning models that enables interoperability between different frameworks, allowing models trained in one framework to be deployed using another.", - "chapter_source": "frameworks", - "aliases": [], - "see_also": [] - }, - { - "term": "onnx runtime", - "definition": "Cross-platform inference engine that optimizes machine learning models through techniques like operator fusion and kernel tuning to improve inference speed and reduce computational overhead.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "optimizer", - "definition": "An algorithm that adjusts model parameters during training to minimize the loss function, with common examples including SGD (Stochastic Gradient Descent), Adam, and RMSprop, each with different strategies for parameter updates.", - "chapter_source": "frameworks", - "aliases": [], - "see_also": [] - }, - { - "term": "orchestration", - "definition": "Coordination and management of complex workflows and distributed computing tasks, often using platforms like Kubernetes for container management.", - "chapter_source": "ml_ops", - "aliases": [], - "see_also": [] - }, - { - "term": "outlier detection", - "definition": "The process of identifying data points that significantly deviate from normal patterns, which may represent errors, anomalies, or valuable rare events.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "overfitting", - "definition": "A phenomenon where a model learns specific details of training data so well that it fails to generalize to new, unseen examples, typically indicated by high training accuracy but poor validation performance.", - "chapter_source": "nn_computation", - "aliases": [], - "see_also": [] - }, - { - "term": "padding", - "definition": "A technique in convolutional networks that adds zeros or other values around the input borders to control the spatial dimensions of the output feature maps.", - "chapter_source": "nn_architectures", - "aliases": [], - "see_also": [] - }, - { - "term": "paradigm shift", - "definition": "A fundamental change in scientific approach, like the shift from symbolic reasoning to statistical learning in AI during the 1990s, and from shallow to deep learning in the 2010s, requiring researchers to abandon established methods for radically different approaches.", - "chapter_source": "introduction", - "aliases": [], - "see_also": [] - }, - { - "term": "parallelism", - "definition": "The simultaneous execution of multiple computational tasks or operations, fundamental to achieving high performance in neural network processing.", - "chapter_source": "hw_acceleration", - "aliases": [], - "see_also": [] - }, - { - "term": "parameter", - "definition": "A learnable component of a neural network, including weights and biases, that gets adjusted during training to minimize the loss function.", - "chapter_source": "nn_computation", - "aliases": [], - "see_also": [] - }, - { - "term": "partitioning", - "definition": "A database technique that divides large datasets into smaller, manageable segments based on specific criteria to improve query performance and system scalability.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "perceptron", - "definition": "The fundamental building block of neural networks, consisting of weighted inputs, a bias term, and an activation function that produces a single output.", - "chapter_source": "introduction", - "aliases": [], - "see_also": [], - "appears_in": [ - "introduction", - "nn_computation" - ] - }, - { - "term": "performance insights", - "definition": "Analytical observations derived from monitoring production machine learning systems that reveal opportunities for improvement in model accuracy, system efficiency, or user experience.", - "chapter_source": "ml_workflow", - "aliases": [], - "see_also": [] - }, - { - "term": "performance-per-data (ppd)", - "definition": "A metric measuring the accuracy gain per training sample, used to evaluate the quality of a dataset or selection strategy. High PPD indicates a dataset rich in information and low in redundancy.", - "chapter_source": "data_selection", - "aliases": [], - "see_also": [] - }, - { - "term": "pipeline jungle", - "definition": "Anti-pattern where complex, interdependent data processing pipelines become difficult to maintain, debug, and modify, leading to technical debt and operational complexity", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [], - "appears_in": [ - "data_engineering", - "ml_ops" - ] - }, - { - "term": "pipeline parallelism", - "definition": "A form of model parallelism where different layers of a model are placed on different devices and data flows through them in a pipeline fashion, allowing multiple batches to be processed simultaneously.", - "chapter_source": "frameworks", - "aliases": [], - "see_also": [], - "appears_in": [ - "frameworks", - "training" - ] - }, - { - "term": "pooling", - "definition": "A downsampling operation in convolutional networks that reduces spatial dimensions while retaining important features, commonly using max or average operations over local regions.", - "chapter_source": "nn_architectures", - "aliases": [], - "see_also": [] - }, - { - "term": "positional encoding", - "definition": "A method used in transformer architectures to inject information about the position of tokens in a sequence, since transformers lack inherent sequential processing.", - "chapter_source": "nn_architectures", - "aliases": [], - "see_also": [] - }, - { - "term": "post-training quantization", - "definition": "A quantization approach applied to already-trained models without modifying the training process, typically involving calibration on representative data to determine optimal quantization parameters.", - "chapter_source": "optimizations", - "aliases": [], - "see_also": [] - }, - { - "term": "power usage effectiveness (pue)", - "definition": "Metric used in data centers to measure energy efficiency, calculated as the ratio of total facility power consumption to IT equipment power consumption.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "power wall", - "definition": "The technological barrier reached around 2005 where increasing processor frequency no longer yielded performance gains without unsustainable increases in power density and heat generation, forcing a shift to parallel and specialized architectures.", - "chapter_source": "ml_systems", - "aliases": [], - "see_also": [] - }, - { - "term": "precision", - "definition": "In numerical computing, the number of bits used to represent numbers, affecting both computational accuracy and resource requirements in machine learning systems.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "prefetching", - "definition": "A system optimization technique that loads data into memory before it is needed, overlapping data loading with computation to reduce idle time and improve training throughput.", - "chapter_source": "training", - "aliases": [], - "see_also": [] - }, - { - "term": "problem definition", - "definition": "The initial stage of machine learning development that involves clearly specifying objectives, constraints, success metrics, and operational requirements to guide all subsequent development decisions.", - "chapter_source": "ml_workflow", - "aliases": [], - "see_also": [] - }, - { - "term": "programmatic logic controllers", - "definition": "Industrial control systems used in manufacturing and IoT environments that can be integrated with ML models for automated decision-making in operational technology contexts.", - "chapter_source": "ml_ops", - "aliases": [], - "see_also": [] - }, - { - "term": "protein folding problem", - "definition": "The scientific challenge of predicting the three-dimensional structure of proteins from their amino acid sequences, a problem that puzzled scientists for decades until systems like AlphaFold achieved breakthrough accuracy using deep learning approaches.", - "chapter_source": "introduction", - "aliases": [], - "see_also": [] - }, - { - "term": "pseudonymization", - "definition": "A privacy technique that replaces direct identifiers with artificial identifiers while maintaining the ability to trace records for analysis purposes.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "pytorch", - "definition": "A deep learning framework developed by Facebook's AI Research lab that emphasizes dynamic computational graphs, eager execution, and intuitive Python integration, particularly popular for research and experimentation.", - "chapter_source": "frameworks", - "aliases": [], - "see_also": [] - }, - { - "term": "quantization", - "definition": "A model compression technique that reduces the precision of model parameters and activations from higher precision formats (like 32-bit floats) to lower precision (like 8-bit integers), significantly reducing memory usage and computational requirements", - "chapter_source": "conclusion", - "aliases": [], - "see_also": [], - "appears_in": [ - "conclusion", - "frameworks", - "hw_acceleration" - ] - }, - { - "term": "quantization granularity", - "definition": "The level at which quantization parameters are applied, ranging from per-tensor (coarsest) to per-channel or per-group (finer), with finer granularity typically preserving more accuracy but requiring more storage.", - "chapter_source": "optimizations", - "aliases": [], - "see_also": [] - }, - { - "term": "quantization-aware training", - "definition": "A training approach where quantization effects are simulated during the training process, allowing the model to adapt to reduced precision and typically achieving better accuracy than post-training quantization.", - "chapter_source": "optimizations", - "aliases": [], - "see_also": [] - }, - { - "term": "queries per second (qps)", - "definition": "Performance metric that measures how many inference requests a system can process in one second, commonly used to evaluate throughput in production deployments.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "query key value", - "definition": "The three components of attention mechanisms where queries determine what to look for, keys represent what is available, and values contain the actual information to be weighted and combined.", - "chapter_source": "nn_architectures", - "aliases": [], - "see_also": [] - }, - { - "term": "real-time processing", - "definition": "The processing of data as it becomes available, with guaranteed response times that meet strict timing constraints for immediate decision-making.", - "chapter_source": "ml_systems", - "aliases": [], - "see_also": [] - }, - { - "term": "receptive field", - "definition": "The region of the input that influences a particular neuron's output, determining the spatial extent of patterns that can be detected by that neuron.", - "chapter_source": "nn_architectures", - "aliases": [], - "see_also": [] - }, - { - "term": "rectified linear unit", - "definition": "An activation function that outputs the input if positive and zero otherwise, widely used in modern neural networks for its computational simplicity and ability to avoid vanishing gradients.", - "chapter_source": "training", - "aliases": [], - "see_also": [] - }, - { - "term": "recurrent neural network", - "definition": "A type of neural network designed for sequential data processing, featuring connections that create loops allowing information to persist across time steps.", - "chapter_source": "nn_architectures", - "aliases": [], - "see_also": [] - }, - { - "term": "red ai", - "definition": "AI research and development that prioritizes maximizing accuracy or performance without regard for the increasing computational and environmental costs required.", - "chapter_source": "responsible_engr", - "aliases": [], - "see_also": [] - }, - { - "term": "regularization", - "definition": "Techniques used to prevent overfitting in neural networks by adding constraints or penalties, including methods like dropout, weight decay, and data augmentation.", - "chapter_source": "nn_architectures", - "aliases": [], - "see_also": [] - }, - { - "term": "relu", - "definition": "Rectified Linear Unit activation function defined as f(x) = max(0,x) that introduces nonlinearity while maintaining computational efficiency and avoiding vanishing gradient problems.", - "chapter_source": "nn_computation", - "aliases": [], - "see_also": [] - }, - { - "term": "residual connection", - "definition": "A skip connection that adds the input of a layer to its output, enabling the training of very deep networks by mitigating the vanishing gradient problem.", - "chapter_source": "nn_architectures", - "aliases": [], - "see_also": [] - }, - { - "term": "resnet", - "definition": "Residual Network, a deep convolutional architecture that introduced skip connections, enabling the training of networks with hundreds of layers and achieving breakthrough performance.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [], - "appears_in": [ - "benchmarking", - "nn_architectures" - ] - }, - { - "term": "resnet-50", - "definition": "A specific 50-layer variant of the Residual Network architecture that serves as the canonical Lighthouse Model for compute-bound workloads, balancing depth and computational cost for vision benchmarks.", - "chapter_source": "nn_architectures", - "aliases": [], - "see_also": [] - }, - { - "term": "responsible engineering gap", - "definition": "The disparity between technical optimization success (e.g., high benchmark accuracy) and responsible deployment outcomes (e.g., fairness and safety in production).", - "chapter_source": "responsible_engr", - "aliases": [], - "see_also": [] - }, - { - "term": "retinal fundus photographs", - "definition": "Medical images of the interior surface of the eye, including the retina, optic disc, and blood vessels, commonly used for diagnosing eye diseases and training medical AI systems.", - "chapter_source": "ml_workflow", - "aliases": [], - "see_also": [] - }, - { - "term": "reverse-mode differentiation", - "definition": "An automatic differentiation technique that computes gradients by traversing the computational graph in reverse order, highly efficient for functions with many inputs and few outputs, making it ideal for neural network training.", - "chapter_source": "frameworks", - "aliases": [], - "see_also": [] - }, - { - "term": "rmsprop", - "definition": "An adaptive learning rate optimization algorithm that maintains a moving average of squared gradients to automatically adjust learning rates for each parameter during training.", - "chapter_source": "training", - "aliases": [], - "see_also": [] - }, - { - "term": "rollback", - "definition": "Process of reverting to a previous stable version of a model or system when issues are detected in production, ensuring service continuity.", - "chapter_source": "ml_ops", - "aliases": [], - "see_also": [] - }, - { - "term": "roofline analysis", - "definition": "A performance modeling technique that plots operational intensity against peak performance to identify whether a system is memory-bound or compute-bound, guiding optimization efforts.", - "chapter_source": "conclusion", - "aliases": [], - "see_also": [] - }, - { - "term": "scalability", - "definition": "The ability of machine learning systems to handle increasing amounts of data, users, or computational demands without significant degradation in performance or user experience", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [], - "appears_in": [ - "benchmarking", - "ml_workflow" - ] - }, - { - "term": "schema", - "definition": "The structure and format definition of data that specifies data types, field names, and relationships, essential for data validation and processing consistency.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "schema evolution", - "definition": "The process of modifying data schemas over time while maintaining backward compatibility and ensuring continued functionality of dependent systems and applications.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "schema-on-read", - "definition": "An approach used in data lakes where data structure is defined and enforced at the time of reading rather than when storing, providing flexibility for diverse data types.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "segmentation maps", - "definition": "Detailed annotations that classify objects at the pixel level, providing the most granular labeling information but requiring significantly more storage and processing resources.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "self-attention", - "definition": "An attention mechanism where queries, keys, and values all come from the same sequence, allowing each position to attend to all positions including itself.", - "chapter_source": "nn_architectures", - "aliases": [], - "see_also": [] - }, - { - "term": "semi-supervised learning", - "definition": "A machine learning approach that uses both labeled and unlabeled data for training, leveraging structural assumptions to improve model performance with limited labels.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "sensitivity", - "definition": "The proportion of actual positive cases correctly identified by a classification model, also known as true positive rate or recall; critical in medical applications where missing positive cases has severe consequences.", - "chapter_source": "ml_workflow", - "aliases": [], - "see_also": [] - }, - { - "term": "sequential neural networks", - "definition": "Neural network architectures designed to process data that occurs in sequences over time, maintaining a form of memory of previous inputs to inform current decisions, essential for tasks like predicting pedestrian movement patterns.", - "chapter_source": "introduction", - "aliases": [], - "see_also": [] - }, - { - "term": "serverless", - "definition": "Cloud computing model where infrastructure is automatically managed by the provider, allowing code execution without server management concerns.", - "chapter_source": "ml_ops", - "aliases": [], - "see_also": [] - }, - { - "term": "service level agreement (sla)", - "definition": "Formal contract specifying minimum performance standards and uptime guarantees for production services, with penalties for non-compliance.", - "chapter_source": "ml_ops", - "aliases": [], - "see_also": [] - }, - { - "term": "service level objective (slo)", - "definition": "Internal targets for service reliability and performance metrics such as latency, error rates, and availability that guide operational decisions.", - "chapter_source": "ml_ops", - "aliases": [], - "see_also": [] - }, - { - "term": "shadow deployment", - "definition": "A deployment strategy where a new model runs in parallel with the production model, making predictions that are logged but not served to users, enabling validation without user impact", - "chapter_source": "ml_ops", - "aliases": [], - "see_also": [], - "appears_in": [ - "ml_ops", - "ml_workflow" - ] - }, - { - "term": "shallow learning", - "definition": "Machine learning approaches that use algorithms with limited complexity, such as support vector machines and decision trees, which require carefully engineered features but cannot automatically discover hierarchical representations like deep learning methods.", - "chapter_source": "introduction", - "aliases": [], - "see_also": [] - }, - { - "term": "sigmoid", - "definition": "An activation function that maps input values to a range between 0 and 1, historically popular but prone to vanishing gradient problems in deep networks.", - "chapter_source": "nn_computation", - "aliases": [], - "see_also": [], - "appears_in": [ - "nn_computation", - "training" - ] - }, - { - "term": "silent bias", - "definition": "Model unfairness that produces valid-looking but discriminatory outputs, evading traditional error monitoring and requiring disaggregated evaluation to detect.", - "chapter_source": "responsible_engr", - "aliases": [], - "see_also": [] - }, - { - "term": "silent degradation", - "definition": "The gradual decline in ML system performance that occurs without triggering errors, exceptions, or alerts. Unlike traditional software that crashes observably, ML systems can continue operating while producing increasingly inaccurate predictions.", - "chapter_source": "introduction", - "aliases": [], - "see_also": [] - }, - { - "term": "silent failure", - "definition": "A system failure mode where an ML model continues to produce plausible-looking outputs that are gradually less accurate or contextually relevant without triggering conventional error alerts.", - "chapter_source": "responsible_engr", - "aliases": [], - "see_also": [] - }, - { - "term": "simd (single instruction, multiple data)", - "definition": "A parallel computing architecture that applies the same operation to multiple data elements simultaneously, effective for regular data-parallel computations.", - "chapter_source": "hw_acceleration", - "aliases": [], - "see_also": [] - }, - { - "term": "simt (single instruction, multiple thread)", - "definition": "An extension of SIMD that enables parallel execution across multiple independent threads, each maintaining its own state and program counter.", - "chapter_source": "hw_acceleration", - "aliases": [], - "see_also": [] - }, - { - "term": "single-instance throughput", - "definition": "Performance measurement focusing on the rate at which a single model instance can process requests, contrasting with batch throughput metrics.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "singular value decomposition", - "definition": "A matrix factorization technique that decomposes a matrix into the product of three matrices, commonly used in low-rank approximations to compress neural network layers by retaining only the most significant singular values.", - "chapter_source": "optimizations", - "aliases": [], - "see_also": [] - }, - { - "term": "skip connection", - "definition": "A direct connection that bypasses one or more layers, allowing gradients to flow more easily through deep networks and enabling better training of very deep architectures.", - "chapter_source": "nn_architectures", - "aliases": [], - "see_also": [] - }, - { - "term": "softmax", - "definition": "An activation function that converts logits into a probability distribution where outputs sum to 1, used in multi-class classification.", - "chapter_source": "nn_architectures", - "aliases": [], - "see_also": [], - "appears_in": [ - "nn_architectures", - "nn_computation", - "training" - ] - }, - { - "term": "sparsity", - "definition": "The property of neural networks where many weights are zero or near-zero, which can be exploited for computational efficiency through specialized hardware support and algorithms designed for sparse operations.", - "chapter_source": "optimizations", - "aliases": [], - "see_also": [] - }, - { - "term": "spec cpu", - "definition": "Standardized benchmark suite developed by the System Performance Evaluation Cooperative that measures processor performance using real-world applications rather than synthetic tests.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "spec power", - "definition": "Benchmark methodology that measures server energy efficiency across varying workload levels, enabling direct comparisons of power-performance trade-offs in computing systems.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "specificity", - "definition": "The proportion of actual negative cases correctly identified by a classification model, also known as true negative rate; important for avoiding overwhelming referral systems with false positives.", - "chapter_source": "ml_workflow", - "aliases": [], - "see_also": [] - }, - { - "term": "speculative decoding", - "definition": "An optimization technique for autoregressive language models where a smaller model generates draft tokens that are then verified by a larger model, accelerating inference while maintaining quality.", - "chapter_source": "conclusion", - "aliases": [], - "see_also": [] - }, - { - "term": "speed of light (latency)", - "definition": "The physical speed limit of information transmission (approx. 200,000 km/s in fiber), creating an irreducible lower bound on network latency that necessitates edge computing for applications requiring sub-10ms response times over long distances.", - "chapter_source": "ml_systems", - "aliases": [], - "see_also": [] - }, - { - "term": "stage-specific metrics", - "definition": "Performance indicators tailored to individual lifecycle phases, such as data quality metrics during preparation, training convergence during modeling, and latency metrics during deployment.", - "chapter_source": "ml_workflow", - "aliases": [], - "see_also": [] - }, - { - "term": "static graph", - "definition": "A computational graph that is defined completely before execution begins, enabling comprehensive optimization and efficient deployment but requiring all operations to be specified upfront, limiting runtime flexibility.", - "chapter_source": "frameworks", - "aliases": [], - "see_also": [] - }, - { - "term": "static graphs vs dynamic graphs", - "definition": "Two fundamental approaches to representing computations in ML frameworks: static graphs are defined before execution and enable optimization but limit flexibility, while dynamic graphs are built during execution allowing for flexible control flow but with potential optimization limitations.", - "chapter_source": "frameworks", - "aliases": [], - "see_also": [] - }, - { - "term": "static quantization", - "definition": "A quantization approach where quantization parameters are determined once during calibration and remain fixed during inference, providing computational efficiency but less adaptability than dynamic approaches.", - "chapter_source": "optimizations", - "aliases": [], - "see_also": [] - }, - { - "term": "statistical learning", - "definition": "The era of machine learning that emerged in the 1990s, shifting focus from rule-based symbolic AI to algorithms that could learn patterns from data, laying the groundwork for modern data-driven approaches to artificial intelligence.", - "chapter_source": "introduction", - "aliases": [], - "see_also": [] - }, - { - "term": "stochastic gradient descent", - "definition": "A variant of gradient descent that estimates gradients using individual training examples or small batches rather than the entire dataset, reducing memory requirements and enabling online learning.", - "chapter_source": "training", - "aliases": [], - "see_also": [] - }, - { - "term": "stream ingestion", - "definition": "A data processing pattern that handles data in real-time as it arrives, essential for applications requiring immediate processing and low-latency responses.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "stream processing", - "definition": "Real-time data processing approach that handles continuous flows of data as it arrives, enabling immediate responses to events and pattern detection.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "stride", - "definition": "The step size by which a convolutional filter moves across the input, controlling the spatial dimensions of the output and the degree of overlap between filter applications.", - "chapter_source": "nn_architectures", - "aliases": [], - "see_also": [] - }, - { - "term": "structured pruning", - "definition": "A pruning approach that removes entire computational units such as neurons, channels, or layers, producing smaller dense models that are more hardware-friendly than the sparse matrices created by unstructured pruning.", - "chapter_source": "optimizations", - "aliases": [], - "see_also": [] - }, - { - "term": "student system", - "definition": "One of the first AI programs from 1964 by Daniel Bobrow that demonstrated natural language understanding by converting English algebra word problems into mathematical equations, marking an important milestone in symbolic AI.", - "chapter_source": "introduction", - "aliases": [], - "see_also": [] - }, - { - "term": "student-teacher learning", - "definition": "The core mechanism of knowledge distillation where a smaller student network learns from a larger teacher network, typically using soft targets that provide more information than hard classification labels.", - "chapter_source": "optimizations", - "aliases": [], - "see_also": [] - }, - { - "term": "supervised learning", - "definition": "A machine learning approach where models learn from labeled training examples to make predictions on new, unlabeled data.", - "chapter_source": "nn_computation", - "aliases": [], - "see_also": [] - }, - { - "term": "symbolic ai", - "definition": "An approach to artificial intelligence that uses high-level symbolic representations of problems, logic, and search algorithms, dominant before the deep learning revolution and characterized by expert systems and rule-based reasoning.", - "chapter_source": "introduction", - "aliases": [], - "see_also": [] - }, - { - "term": "symbolic programming", - "definition": "A programming paradigm where computations are represented as abstract symbols and expressions that are constructed first and executed later, allowing for comprehensive optimization but requiring explicit execution phases.", - "chapter_source": "frameworks", - "aliases": [], - "see_also": [] - }, - { - "term": "synthetic benchmark", - "definition": "Artificial test program designed to measure specific aspects of system performance, as opposed to benchmarks based on real-world applications and workloads.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "synthetic data", - "definition": "Artificially generated data created using algorithms, simulations, or generative models to supplement real-world datasets, addressing limitations in data availability or privacy concerns.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "system entropy", - "definition": "The tendency of ML systems to degrade over time as the world changes (drift) or as hidden dependencies accumulate (technical debt), requiring active energy (ops) to maintain order.", - "chapter_source": "ml_systems", - "aliases": [], - "see_also": [] - }, - { - "term": "system on chip", - "definition": "An integrated circuit that incorporates most or all components of a computer or electronic system, including CPU, GPU, memory, and specialized processors on a single chip.", - "chapter_source": "ml_systems", - "aliases": [], - "see_also": [] - }, - { - "term": "system-on-chip (soc)", - "definition": "Integrated circuit that contains most or all components of a computer system, commonly used in mobile devices and embedded systems for space and power efficiency.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "systems integration", - "definition": "The process of combining various components and subsystems into a unified, functional system that operates efficiently and reliably as a whole.", - "chapter_source": "conclusion", - "aliases": [], - "see_also": [] - }, - { - "term": "systems thinking", - "definition": "An approach to understanding complex systems by considering how individual components interact and affect the whole system, particularly important in ML where data, algorithms, hardware, and deployment environments must work together effectively", - "chapter_source": "introduction", - "aliases": [], - "see_also": [], - "appears_in": [ - "introduction", - "ml_workflow" - ] - }, - { - "term": "systolic array", - "definition": "A specialized hardware architecture that efficiently performs matrix operations by streaming data through a grid of processing elements, minimized data movement and energy consumption.", - "chapter_source": "hw_acceleration", - "aliases": [], - "see_also": [], - "appears_in": [ - "hw_acceleration", - "training" - ] - }, - { - "term": "tail latency", - "definition": "Worst-case response times in a system, typically measured as 95th or 99th percentile latency, important for understanding system reliability under peak load conditions.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "tailored inference benchmarks", - "definition": "Specialized performance tests designed for specific deployment environments or use cases, accounting for unique constraints and optimization requirements.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "tanh", - "definition": "Hyperbolic tangent activation function that maps inputs to (-1, 1), providing zero-centered outputs.", - "chapter_source": "nn_computation", - "aliases": [], - "see_also": [], - "appears_in": [ - "nn_computation", - "training" - ] - }, - { - "term": "technical debt", - "definition": "Long-term maintenance cost accumulated from expedient design decisions during development, particularly problematic in ML systems due to data dependencies and model complexity.", - "chapter_source": "ml_ops", - "aliases": [], - "see_also": [] - }, - { - "term": "telemetry", - "definition": "Automated collection and transmission of performance data and metrics from distributed systems, enabling remote monitoring and analysis.", - "chapter_source": "ml_ops", - "aliases": [], - "see_also": [] - }, - { - "term": "tensor", - "definition": "A multi-dimensional array used to represent data in neural networks, generalizing scalars (0D), vectors (1D), and matrices (2D) to higher dimensions.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [], - "appears_in": [ - "benchmarking", - "frameworks", - "hw_acceleration", - "nn_computation" - ] - }, - { - "term": "tensor decomposition", - "definition": "The extension of matrix factorization to higher-order tensors, used to compress neural network layers by representing weight tensors as combinations of smaller tensors with fewer parameters.", - "chapter_source": "optimizations", - "aliases": [], - "see_also": [] - }, - { - "term": "tensor parallelism", - "definition": "A model parallelism strategy where individual tensor operations (like matrix multiplication) are split across multiple devices, reducing memory per device and latency for large layers.", - "chapter_source": "frameworks", - "aliases": [], - "see_also": [], - "appears_in": [ - "frameworks", - "training" - ] - }, - { - "term": "tensor processing unit", - "definition": "Google's custom application-specific integrated circuit designed specifically for machine learning workloads, optimized for matrix operations and featuring systolic array architecture.", - "chapter_source": "training", - "aliases": [], - "see_also": [] - }, - { - "term": "tensor processing unit (tpu)", - "definition": "Google's custom application-specific integrated circuit designed specifically for neural network machine learning, optimized for TensorFlow operations.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [], - "appears_in": [ - "benchmarking", - "hw_acceleration", - "ml_systems" - ] - }, - { - "term": "tensorflow", - "definition": "A comprehensive machine learning framework developed by Google that provides tools for the entire ML pipeline from research to production, featuring both eager execution and graph-based computation with extensive ecosystem support.", - "chapter_source": "frameworks", - "aliases": [], - "see_also": [] - }, - { - "term": "tensorrt", - "definition": "NVIDIA's inference optimization library that applies techniques like operator fusion and precision reduction to accelerate deep learning inference on GPU hardware.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "ternarization", - "definition": "An extreme quantization technique that constrains weights to three values (typically -1, 0, +1), providing significant compression while maintaining more representational capacity than binary quantization.", - "chapter_source": "optimizations", - "aliases": [], - "see_also": [] - }, - { - "term": "thermal throttling", - "definition": "A protective mechanism in mobile and embedded devices that reduces processor clock speed and performance to prevent overheating, often limiting the sustained performance of on-device ML inference.", - "chapter_source": "ml_systems", - "aliases": [], - "see_also": [] - }, - { - "term": "threshold for activation", - "definition": "The input level at which a neuron begins to produce significant output, determined by the combination of weights, biases, and the chosen activation function, controlling when the neuron contributes to the network's computation.", - "chapter_source": "nn_computation", - "aliases": [], - "see_also": [] - }, - { - "term": "throughput", - "definition": "The rate at which a system can process data or complete operations, typically measured in operations per second and crucial for training large models", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [], - "appears_in": [ - "benchmarking", - "hw_acceleration" - ] - }, - { - "term": "time-to-accuracy", - "definition": "The wall-clock time required to train a model to a specified validation accuracy, the ultimate metric for training system performance.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [], - "appears_in": [ - "benchmarking", - "training" - ] - }, - { - "term": "tiny machine learning", - "definition": "The execution of machine learning models on ultra-constrained devices such as microcontrollers and sensors, operating in the milliwatt to sub-watt power range.", - "chapter_source": "ml_systems", - "aliases": [], - "see_also": [] - }, - { - "term": "tinyml", - "definition": "A field focused on deploying machine learning models on resource-constrained embedded devices and microcontrollers with severe limitations on memory, power, and computational capacity.", - "chapter_source": "conclusion", - "aliases": [], - "see_also": [] - }, - { - "term": "tops", - "definition": "Tera Operations Per Second, a measure of computational performance indicating how many trillion operations a system can execute in one second.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "total cost of ownership (tco)", - "definition": "A comprehensive financial metric for ML systems encompassing training, inference, and operational costs over the system's entire lifecycle.", - "chapter_source": "responsible_engr", - "aliases": [], - "see_also": [] - }, - { - "term": "tpu", - "definition": "Tensor Processing Unit, Google's custom Application-Specific Integrated Circuits (ASICs) designed specifically for accelerating tensor operations in machine learning workloads, offering significant performance and energy efficiency improvements over general-purpose processors.", - "chapter_source": "frameworks", - "aliases": [], - "see_also": [] - }, - { - "term": "train-serve split", - "definition": "A hybrid architecture pattern where computationally intensive model training occurs on powerful cloud infrastructure, while the trained model is optimized and deployed for inference on resource-constrained edge or mobile devices.", - "chapter_source": "ml_systems", - "aliases": [], - "see_also": [] - }, - { - "term": "training", - "definition": "The process of adjusting neural network parameters using labeled data and optimization algorithms to minimize prediction errors and improve performance.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [], - "appears_in": [ - "benchmarking", - "hw_acceleration", - "ml_systems", - "nn_computation" - ] - }, - { - "term": "training-serving skew", - "definition": "A mismatch between how features or data are computed during model training versus serving in production, causing model performance to degrade despite unchanged code. Common causes include different preprocessing pipelines, feature computation timing, or data sources between training and inference", - "chapter_source": "introduction", - "aliases": [], - "see_also": [], - "appears_in": [ - "introduction", - "ml_ops" - ] - }, - { - "term": "transfer learning", - "definition": "A machine learning technique that leverages knowledge gained from pre-trained models on related tasks, allowing faster training and better performance on new tasks with limited data by reusing learned features and representations", - "chapter_source": "conclusion", - "aliases": [], - "see_also": [], - "appears_in": [ - "conclusion", - "data_engineering", - "frameworks", - "introduction", - "ml_workflow" - ] - }, - { - "term": "transformer", - "definition": "A neural network architecture based entirely on attention mechanisms, eliminating recurrence and convolution while achieving state-of-the-art performance across many domains.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [], - "appears_in": [ - "benchmarking", - "nn_architectures" - ] - }, - { - "term": "translation invariance", - "definition": "The property of convolutional networks to recognize patterns regardless of their position in the input, achieved through weight sharing and pooling operations.", - "chapter_source": "nn_architectures", - "aliases": [], - "see_also": [] - }, - { - "term": "tucker decomposition", - "definition": "A tensor decomposition method that generalizes singular value decomposition to higher-order tensors using a core tensor and factor matrices, commonly used for compressing convolutional neural network layers.", - "chapter_source": "optimizations", - "aliases": [], - "see_also": [] - }, - { - "term": "tv white spaces", - "definition": "Unused broadcasting frequencies that can be repurposed for internet connectivity, as employed by systems like FarmBeats to extend network access to remote agricultural sensors and IoT devices.", - "chapter_source": "introduction", - "aliases": [], - "see_also": [] - }, - { - "term": "uniform quantization", - "definition": "A quantization approach where the range of values is divided into evenly spaced intervals, providing simple implementation but potentially suboptimal for non-uniform value distributions.", - "chapter_source": "optimizations", - "aliases": [], - "see_also": [] - }, - { - "term": "universal approximation theorem", - "definition": "A theoretical result proving that neural networks with sufficient width and non-linear activation functions can approximate any continuous function on a compact domain.", - "chapter_source": "nn_architectures", - "aliases": [], - "see_also": [] - }, - { - "term": "unreasonable effectiveness of data", - "definition": "The empirical observation that for many problems, adding more data is more effective than improving algorithms, driving the data-centric AI paradigm.", - "chapter_source": "introduction", - "aliases": [], - "see_also": [] - }, - { - "term": "unstructured pruning", - "definition": "A pruning approach that removes individual weights while preserving the overall network architecture, creating sparse weight matrices that require specialized hardware support to realize computational benefits.", - "chapter_source": "optimizations", - "aliases": [], - "see_also": [] - }, - { - "term": "unstructured sparsity", - "definition": "A form of model sparsity where individual weights are set to zero without following any particular pattern, creating irregular sparsity patterns that require specialized hardware support to realize computational benefits.", - "chapter_source": "optimizations", - "aliases": [], - "see_also": [] - }, - { - "term": "validation issues", - "definition": "Problems identified during model testing that indicate poor performance, overfitting, data quality problems, or other issues that must be resolved before deployment.", - "chapter_source": "ml_workflow", - "aliases": [], - "see_also": [] - }, - { - "term": "vanishing gradient", - "definition": "A problem in deep neural networks where gradients become exponentially smaller as they propagate backward through layers, making it difficult for early layers to learn effectively.", - "chapter_source": "nn_architectures", - "aliases": [], - "see_also": [], - "appears_in": [ - "nn_architectures", - "nn_computation" - ] - }, - { - "term": "vanishing gradient problem", - "definition": "A challenge in training deep neural networks where gradients become exponentially smaller as they propagate backward through layers, making it difficult to train early layers effectively.", - "chapter_source": "training", - "aliases": [], - "see_also": [] - }, - { - "term": "vector operations", - "definition": "Computational operations that process multiple data elements simultaneously, enabling efficient parallel execution of element-wise transformations in neural networks.", - "chapter_source": "hw_acceleration", - "aliases": [], - "see_also": [] - }, - { - "term": "versioning", - "definition": "The practice of tracking changes to datasets, models, and pipelines over time, enabling reproducibility, rollback capabilities, and audit trails in ML systems.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "virtuous cycle", - "definition": "The self-reinforcing process in deep learning where improvements in data availability, algorithms, and computing power each enable further advances in the other areas, accelerating overall progress.", - "chapter_source": "nn_computation", - "aliases": [], - "see_also": [] - }, - { - "term": "von neumann bottleneck", - "definition": "The performance limitation caused by the shared bus between processor and memory in traditional computer architectures, where data movement becomes more expensive than computation.", - "chapter_source": "hw_acceleration", - "aliases": [], - "see_also": [] - }, - { - "term": "warp", - "definition": "A group of threads (typically 32 on NVIDIA GPUs) that execute the same instruction in lock-step; the fundamental unit of scheduling and execution on GPUs.", - "chapter_source": "training", - "aliases": [], - "see_also": [] - }, - { - "term": "waymo", - "definition": "A subsidiary of Alphabet Inc. that represents a leading deployment of machine learning systems in autonomous vehicle technology, demonstrating how ML systems can span from embedded systems to cloud infrastructure in safety-critical environments.", - "chapter_source": "introduction", - "aliases": [], - "see_also": [] - }, - { - "term": "weak supervision", - "definition": "An approach that uses lower-quality labels obtained more efficiently through heuristics, distant supervision, or programmatic methods rather than manual expert annotation.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "web scraping", - "definition": "An automated technique for extracting data from websites to build custom datasets, requiring careful consideration of legal, ethical, and technical constraints.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "weight", - "definition": "A learnable parameter that determines the strength of connection between neurons in different layers, adjusted during training to minimize the loss function.", - "chapter_source": "nn_computation", - "aliases": [], - "see_also": [] - }, - { - "term": "weight matrix", - "definition": "An organized collection of weights connecting one layer to another in a neural network, enabling efficient computation through matrix operations.", - "chapter_source": "nn_computation", - "aliases": [], - "see_also": [] - }, - { - "term": "weight sharing", - "definition": "The practice of using the same parameters across different spatial locations, as in convolutional networks, reducing the number of parameters while maintaining pattern detection capabilities.", - "chapter_source": "nn_architectures", - "aliases": [], - "see_also": [] - }, - { - "term": "whetstone", - "definition": "Early benchmark introduced in 1964 that measured floating-point arithmetic performance in KIPS (thousands of instructions per second), becoming the first widely-adopted standardized performance test.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "workflow orchestration", - "definition": "Automated coordination and management of complex ML pipeline sequences, ensuring proper execution order, dependency management, and error handling across distributed systems.", - "chapter_source": "ml_workflow", - "aliases": [], - "see_also": [] - }, - { - "term": "xla", - "definition": "Accelerated Linear Algebra, a domain-specific compiler for linear algebra operations that optimizes TensorFlow and JAX computations by generating efficient code for various hardware platforms including CPUs, GPUs, and TPUs.", - "chapter_source": "frameworks", - "aliases": [], - "see_also": [] - } - ] -} \ No newline at end of file diff --git a/book/quarto/contents/vol1/benchmarking/benchmarking_glossary.json b/book/quarto/contents/vol1/benchmarking/benchmarking_glossary.json deleted file mode 100644 index ff3b960164..0000000000 --- a/book/quarto/contents/vol1/benchmarking/benchmarking_glossary.json +++ /dev/null @@ -1,502 +0,0 @@ -{ - "metadata": { - "chapter": "benchmarking", - "version": "1.0.0", - "generated": "2025-09-15T14:08:03.491929", - "total_terms": 71, - "standardized": true, - "last_updated": "2025-09-15T15:01:37.283449" - }, - "terms": [ - { - "term": "3dmark", - "definition": "Graphics performance benchmark suite that evaluates real-time 3D rendering capabilities, measuring triangle throughput, texture fill rates, and modern features like ray tracing and DLSS performance.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "alexnet", - "definition": "Pioneering 8-layer convolutional neural network developed in 2012 that revolutionized computer vision by introducing key innovations like ReLU activations, dropout regularization, and data augmentation techniques.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "application-specific integrated circuit (asic)", - "definition": "Custom chips designed for specific computational tasks that offer superior performance and energy efficiency compared to general-purpose processors, exemplified by Google's TPUs and Bitcoin mining ASICs.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "artificial intelligence", - "definition": "Computer systems able to perform tasks that typically require human intelligence, including learning, reasoning, perception, and decision-making.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "batch processing", - "definition": "Method of processing multiple inputs simultaneously to improve computational efficiency by leveraging hardware optimizations and amortizing fixed costs across multiple samples.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "benchmark harness", - "definition": "Systematic infrastructure component that controls test execution, manages input delivery, and collects performance measurements under controlled conditions to ensure reproducible evaluations.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "benchmarking", - "definition": "Systematic evaluation of compute performance, algorithmic effectiveness, and data quality in machine learning systems to optimize performance across diverse workloads and ensure reproducibility.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "bert", - "definition": "Bidirectional Encoder Representations from Transformers, a transformer-based language model introduced by Google in 2018 that revolutionized natural language processing through masked language modeling pre-training.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "cloudsuite", - "definition": "Benchmark suite developed at EPFL that addresses modern datacenter workloads including web search, data analytics, and media streaming, measuring end-to-end performance across network, storage, and compute dimensions.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "cold-start performance", - "definition": "Time required for a system to transition from idle state to active execution, particularly important in serverless environments where models are loaded on demand.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "convolutional neural network", - "definition": "Deep learning architecture specifically designed for processing grid-like data such as images, using convolutional layers to detect local features and patterns.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "data parallelism", - "definition": "Distributed training strategy where each compute node processes a different subset of the training batch, then synchronizes gradients across all nodes to update model parameters.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "deep learning", - "definition": "Subset of machine learning using artificial neural networks with multiple layers to learn hierarchical representations of data for complex pattern recognition tasks.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "dhrystone", - "definition": "Integer-based benchmark introduced in 1984 that measures integer and string operations in DMIPS (Dhrystone MIPS), designed to complement floating-point benchmarks with typical programming constructs.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "distributed training", - "definition": "Training approach that splits machine learning workloads across multiple compute nodes to handle large models and datasets that exceed single-node capabilities.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "dynamic voltage and frequency scaling (dvfs)", - "definition": "Power management technique that adjusts processor voltage and clock frequency based on workload demands to optimize energy consumption while maintaining performance.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "end-to-end benchmarks", - "definition": "Comprehensive evaluation methodology that assesses entire AI system pipelines including data processing, model execution, post-processing, and infrastructure components.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "energy efficiency", - "definition": "Measure of computational work performed per unit of energy consumed, typically expressed as operations per joule or performance per watt.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "energy star", - "definition": "EPA certification program that establishes energy efficiency standards for computing equipment, requiring systems to meet strict efficiency requirements during operation and sleep modes.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "flops", - "definition": "Floating-Point Operations Per Second, a measure of computational performance that quantifies how many floating-point arithmetic operations a system can execute in one second.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "fp16", - "definition": "16-bit floating-point numerical representation that reduces memory usage and accelerates computation while maintaining acceptable precision for many machine learning applications.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "fp32", - "definition": "32-bit floating-point numerical representation that provides standard precision for mathematical computations but requires more memory and computational resources than lower-precision formats.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "gpu", - "definition": "Graphics Processing Unit, specialized processor originally designed for graphics rendering but now widely used for parallel computation in machine learning due to its many-core architecture.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "green500", - "definition": "Ranking system that evaluates the world's most powerful supercomputers based on energy efficiency measured in FLOPS per watt rather than raw computational performance.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "hardware accelerator", - "definition": "Specialized computing hardware designed to efficiently execute specific types of computations, such as GPUs for parallel processing or TPUs for machine learning workloads.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "hyperparameter", - "definition": "Configuration setting that governs the machine learning training process independently of the training data, including learning rates, batch sizes, and network architectures.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "imagenet", - "definition": "Large-scale image dataset containing 14 million images across 20,000 categories, widely used as a benchmark for computer vision algorithms and credited with sparking the deep learning revolution.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "batch inference", - "definition": "Process of using a trained machine learning model to make predictions on new, unseen data in production environments.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "int8", - "definition": "8-bit integer numerical representation used in quantized neural networks to reduce memory usage and accelerate inference while attempting to maintain model accuracy.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "latency", - "definition": "Time delay between receiving an input and producing an output, a critical performance metric for real-time applications that require immediate responses.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "linpack", - "definition": "Benchmark developed at Argonne National Laboratory that measures system performance by solving dense systems of linear equations, famous for its use in Top500 supercomputer rankings.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "machine learning", - "definition": "Field of artificial intelligence that enables computer systems to automatically learn and improve performance on specific tasks through experience without being explicitly programmed.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "macro benchmarks", - "definition": "Evaluation methodology that assesses complete machine learning models to understand how architectural choices and component interactions affect overall system behavior and performance.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "memory bandwidth", - "definition": "Rate at which data can be read from or written to memory, measured in bytes per second, which often becomes a bottleneck in memory-intensive machine learning workloads.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "micro benchmarks", - "definition": "Specialized evaluation tools that assess individual components or specific operations within machine learning systems, such as tensor operations or neural network layers.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "mixed-precision training", - "definition": "Training technique that uses both 16-bit and 32-bit floating-point representations to accelerate training while maintaining model accuracy, enabling larger batch sizes and faster convergence.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "mlcommons", - "definition": "Organization that develops and maintains industry-standard benchmarks for machine learning systems, including the MLPerf suite for training and inference evaluation.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "mlperf", - "definition": "Industry-standard benchmark suite that provides standardized tests for training and inference across various deep learning workloads, enabling fair comparisons of machine learning systems.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "mlperf inference", - "definition": "Benchmark framework that evaluates machine learning inference performance across different deployment environments, from cloud data centers to mobile devices and embedded systems.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "mlperf mobile", - "definition": "Specialized benchmark that extends MLPerf evaluation to smartphones and mobile devices, measuring latency and responsiveness under strict power and memory constraints.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "mlperf tiny", - "definition": "Benchmark designed for embedded and ultra-low-power AI systems such as IoT devices, wearables, and microcontrollers operating with minimal processing capabilities.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "mlperf training", - "definition": "Standardized benchmark that evaluates machine learning training performance by measuring time-to-accuracy, throughput, and resource utilization across different hardware platforms.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "model parallelism", - "definition": "Distributed training approach where different parts of a neural network are placed on different compute nodes, essential for models too large to fit in a single device's memory.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "neural network", - "definition": "Computing system inspired by biological neural networks, consisting of interconnected nodes (neurons) that process information through weighted connections and activation functions.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "neural processing unit (npu)", - "definition": "Specialized processor designed specifically for artificial neural network computations, optimized for the mathematical operations common in machine learning workloads.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "onnx runtime", - "definition": "Cross-platform inference engine that optimizes machine learning models through techniques like operator fusion and kernel tuning to improve inference speed and reduce computational overhead.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "power usage effectiveness (pue)", - "definition": "Metric used in data centers to measure energy efficiency, calculated as the ratio of total facility power consumption to IT equipment power consumption.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "precision", - "definition": "In numerical computing, the number of bits used to represent numbers, affecting both computational accuracy and resource requirements in machine learning systems.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "dynamic quantization", - "definition": "Model optimization technique that reduces the numerical precision of model parameters and computations to decrease memory usage and accelerate inference while attempting to preserve accuracy.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "queries per second (qps)", - "definition": "Performance metric that measures how many inference requests a system can process in one second, commonly used to evaluate throughput in production deployments.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "resnet", - "definition": "Residual Networks architecture introduced by Microsoft that solved the vanishing gradient problem using skip connections, enabling very deep neural networks with 152+ layers.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "scalability", - "definition": "System's ability to handle increased workloads by adding computational resources, measuring how performance improves when additional hardware is deployed.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "spec cpu", - "definition": "Standardized benchmark suite developed by the System Performance Evaluation Cooperative that measures processor performance using real-world applications rather than synthetic tests.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "spec power", - "definition": "Benchmark methodology that measures server energy efficiency across varying workload levels, enabling direct comparisons of power-performance trade-offs in computing systems.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "synthetic benchmark", - "definition": "Artificial test program designed to measure specific aspects of system performance, as opposed to benchmarks based on real-world applications and workloads.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "system-on-chip (soc)", - "definition": "Integrated circuit that contains most or all components of a computer system, commonly used in mobile devices and embedded systems for space and power efficiency.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "tail latency", - "definition": "Worst-case response times in a system, typically measured as 95th or 99th percentile latency, important for understanding system reliability under peak load conditions.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "tensor", - "definition": "Multi-dimensional array that serves as the fundamental data structure in machine learning, representing scalars, vectors, matrices, and higher-dimensional data.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "tensor processing unit (tpu)", - "definition": "Google's custom ASIC designed specifically for neural network workloads, achieving significant performance and energy efficiency improvements over general-purpose processors.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "tensorrt", - "definition": "NVIDIA's inference optimization library that applies techniques like operator fusion and precision reduction to accelerate deep learning inference on GPU hardware.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "throughput", - "definition": "Number of operations, tasks, or data items processed per unit time, measuring the productive capacity of a system under sustained load.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "time-to-accuracy", - "definition": "Duration required for a machine learning model to reach a predefined accuracy threshold during training, serving as a key metric for training efficiency evaluation.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "tops", - "definition": "Tera Operations Per Second, a measure of computational performance indicating how many trillion operations a system can execute in one second.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "training", - "definition": "Process of optimizing machine learning model parameters using training data to minimize prediction errors and improve performance on the target task.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "transformer", - "definition": "Neural network architecture that uses self-attention mechanisms to process sequential data, forming the foundation for modern language models like BERT and GPT.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "whetstone", - "definition": "Early benchmark introduced in 1964 that measured floating-point arithmetic performance in KIPS (thousands of instructions per second), becoming the first widely-adopted standardized performance test.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "benchmark engineering", - "definition": "The systematic design and development of performance evaluation frameworks, involving test harness creation, metric selection, and result interpretation methodologies.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "tailored inference benchmarks", - "definition": "Specialized performance tests designed for specific deployment environments or use cases, accounting for unique constraints and optimization requirements.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "single-instance throughput", - "definition": "Performance measurement focusing on the rate at which a single model instance can process requests, contrasting with batch throughput metrics.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - }, - { - "term": "batch throughput optimization", - "definition": "Techniques for maximizing the number of samples processed per unit time when handling multiple inputs simultaneously, leveraging parallelism and batching efficiencies.", - "chapter_source": "benchmarking", - "aliases": [], - "see_also": [] - } - ] -} diff --git a/book/quarto/contents/vol1/conclusion/conclusion.qmd b/book/quarto/contents/vol1/conclusion/conclusion.qmd index c2255adc72..2c2f5436ac 100644 --- a/book/quarto/contents/vol1/conclusion/conclusion.qmd +++ b/book/quarto/contents/vol1/conclusion/conclusion.qmd @@ -1,7 +1,6 @@ --- quiz: conclusion_quizzes.json concepts: conclusion_concepts.yml -glossary: conclusion_glossary.json engine: jupyter --- @@ -158,15 +157,15 @@ class MobileNetJourneyMath: @tbl-lighthouse-journey-mobilenet traces this journey for a single model, MobileNetV2, demonstrating how every chapter's principles converge on a single engineering artifact. The table walks through seven phases (from foundational constraints through architecture, training, compression, acceleration, serving, and operations) showing how each phase's decisions propagate forward to shape what becomes possible in subsequent phases. -| **Journey Phase** | **System Lens** | **MobileNetV2 Implementation**\index{MobileNetV2!efficiency under constraint} | -|:----------------------------------------------|:-------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| **Foundations (@sec-introduction)** | The AI Triad | Bounded by **Machine** constraints (Battery/Thermal) | +| **Journey Phase** | **System Lens** | **MobileNetV2 Implementation**\index{MobileNetV2!efficiency under constraint} | +|:----------------------------------------------|:-------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| **Foundations (@sec-introduction)** | The AI Triad | Bounded by **Machine** constraints (Battery/Thermal) | | **Architecture (@sec-network-architectures)** | Algorithmic Efficiency | **Depthwise Separable Convolutions**: `{python} MobileNetJourneyMath.depthwise_reduction_str`× fewer FLOPs for a representative 3-by-3, 256-output-channel layer and `{python} MobileNetJourneyMath.resnet_ops_reduction_str`× fewer operations than ResNet-50 at ImageNet scale | -| **Training (@sec-model-training)** | Throughput vs. Latency | Optimized for **single-request mobile latency**; training requires data augmentation for robustness | -| **Compression (@sec-model-compression)** | Navigating the Pareto Frontier | **INT8 Quantization**\index{INT8 Quantization!bandwidth trade-off}: `{python} MobileNetJourneyMath.int8_fp32_reduction_str`× memory reduction versus FP32 (`{python} MobileNetJourneyMath.int8_fp16_reduction_str`× versus FP16), with accuracy revalidated per deployment | -| **Acceleration (@sec-hardware-acceleration)** | Honoring the Silicon Contract | Mapping kernels to **Mobile NPUs** (for example, Apple Neural Engine) to maximize hardware utilization | -| **Serving (@sec-model-serving)** | Respecting the Latency Budget | **$P99 < 50$ ms** constraint; optimizing preprocessing (resize/normalize) to avoid CPU bottlenecks | -| **Operations (@sec-ml-operations)** | Managing System Entropy | **Drift Monitoring**: Detecting accuracy decay across heterogeneous device populations and lighting conditions | +| **Training (@sec-model-training)** | Throughput vs. Latency | Optimized for **single-request mobile latency**; training requires data augmentation for robustness | +| **Compression (@sec-model-compression)** | Navigating the Pareto Frontier | **INT8 Quantization**\index{INT8 Quantization!bandwidth trade-off}: `{python} MobileNetJourneyMath.int8_fp32_reduction_str`× memory reduction versus FP32 (`{python} MobileNetJourneyMath.int8_fp16_reduction_str`× versus FP16), with accuracy revalidated per deployment | +| **Acceleration (@sec-hardware-acceleration)** | Honoring the Silicon Contract | Mapping kernels to **Mobile NPUs** (for example, Apple Neural Engine) to maximize hardware utilization | +| **Serving (@sec-model-serving)** | Respecting the Latency Budget | **$P99 < 50$ ms** constraint; optimizing preprocessing (resize/normalize) to avoid CPU bottlenecks | +| **Operations (@sec-ml-operations)** | Managing System Entropy | **Drift Monitoring**: Detecting accuracy decay across heterogeneous device populations and lighting conditions | : **The Lighthouse Journey (MobileNetV2)**: Tracing one model through the entire systems stack reveals how decisions in one domain (for example, architecture) propagate constraints and opportunities to every other domain (for example, hardware acceleration and monitoring). {#tbl-lighthouse-journey-mobilenet} @@ -222,21 +221,21 @@ class EnergyMovementMath: dram_vs_fp16_str = fmt(dram_vs_fp16.m_as(""), precision=0, commas=False) ``` -| **#** | **Principle** | **Part** | **Core Equation/Statement** | **What It Predicts** | -|:--------------------------------|:----------------------------|:---------------|:-----------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------| -| \ref{pri-data-as-code} | Data as Code Invariant | I: Foundations | System Behavior $\approx f(\text{Data})$ | Changing data changes the program | -| \ref{pri-data-gravity} | Data Gravity Invariant | I: Foundations | $C_{\text{move}}(D) \gg C_{\text{move}}(\text{Compute})$ | Move compute to data, not data to compute | -| \ref{pri-iron-law} | Iron Law of ML Systems | II: Build | $T = \frac{D_{\text{vol}}}{\text{BW}} + \frac{O}{R_{\text{peak}} \cdot \eta_{\text{hw}}} + L_{\text{lat}}$ | Every optimization pulls one of three levers; reducing one may inflate another | -| \ref{pri-silicon-contract} | Silicon Contract | II: Build | Every architecture bets on which hardware resource it saturates | Mismatched hardware wastes money; matched hardware achieves peak throughput | -| \ref{pri-pareto-frontier} | Pareto Frontier | III: Optimize | Multi-objective optimization; no free improvements | There is no universal optimum; every gain trades against another metric | -| \ref{pri-arithmetic-intensity} | Arithmetic Intensity Law | III: Optimize | $R = \min(R_{\text{peak}},\; I \times \text{BW})$ | Adding compute to a memory-bound model yields zero gain | +| **#** | **Principle** | **Part** | **Core Equation/Statement** | **What It Predicts** | +|:--------------------------------|:----------------------------|:---------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------| +| \ref{pri-data-as-code} | Data as Code Invariant | I: Foundations | System Behavior $\approx f(\text{Data})$ | Changing data changes the program | +| \ref{pri-data-gravity} | Data Gravity Invariant | I: Foundations | $C_{\text{move}}(D) \gg C_{\text{move}}(\text{Compute})$ | Move compute to data, not data to compute | +| \ref{pri-iron-law} | Iron Law of ML Systems | II: Build | $T = \frac{D_{\text{vol}}}{\text{BW}} + \frac{O}{R_{\text{peak}} \cdot \eta_{\text{hw}}} + L_{\text{lat}}$ | Every optimization pulls one of three levers; reducing one may inflate another | +| \ref{pri-silicon-contract} | Silicon Contract | II: Build | Every architecture bets on which hardware resource it saturates | Mismatched hardware wastes money; matched hardware achieves peak throughput | +| \ref{pri-pareto-frontier} | Pareto Frontier | III: Optimize | Multi-objective optimization; no free improvements | There is no universal optimum; every gain trades against another metric | +| \ref{pri-arithmetic-intensity} | Arithmetic Intensity Law | III: Optimize | $R = \min(R_{\text{peak}},\; I \times \text{BW})$ | Adding compute to a memory-bound model yields zero gain | | \ref{pri-energy-movement} | Energy-Movement Invariant | III: Optimize | $E_{\text{move}} \gg E_{\text{compute}}$ (`{python} EnergyMovementMath.dram_vs_fp32_str`--`{python} EnergyMovementMath.dram_vs_fp16_str`× for DRAM access vs. FP32/FP16 FLOPs) | Data locality, not raw FLOPS, drives efficiency | -| \ref{pri-amdahl} | Amdahl's Law | III: Optimize | $\text{Speedup} = \frac{1}{(1-p) + \frac{p}{s}}$ | The serial fraction caps all parallelism gains | -| \ref{pri-verification-gap} | Verification Gap | IV: Deploy | $\Pr(f(X) \approx Y) > 1 - \epsilon$ | ML testing is statistical; it bounds error, not proves correctness | -| \ref{pri-statistical-drift} | Statistical Drift Invariant | IV: Deploy | $\text{Accuracy}(t) \approx \text{Accuracy}_0 - \lambda \cdot \mathcal{D}(P_t \lVert P_0)$ | Models decay without code changes; the world drifts away from training data | -| \ref{pri-training-serving-skew} | Training-Serving Skew Law | IV: Deploy | $\Delta\text{Accuracy} \approx \mathbb{E}[\lvert f_{\text{serve}}(x) - f_{\text{train}}(x)\rvert]$ | Even subtle preprocessing differences silently degrade accuracy | -| \ref{pri-latency-budget} | Latency Budget Invariant | IV: Deploy | P99 is the hard constraint; throughput is optimized within it | Throughput is optimized within the latency envelope, never at its expense | -| \ref{pri-bias-feedback} | Bias Feedback Invariant | IV: Deploy | $\Delta_g(k) \approx \Delta_g(0) \cdot \alpha^k$, $\alpha > 1$ | Errors against subgroups compound across cycles when outputs reshape inputs | +| \ref{pri-amdahl} | Amdahl's Law | III: Optimize | $\text{Speedup} = \frac{1}{(1-p) + \frac{p}{s}}$ | The serial fraction caps all parallelism gains | +| \ref{pri-verification-gap} | Verification Gap | IV: Deploy | $\Pr(f(X) \approx Y) > 1 - \epsilon$ | ML testing is statistical; it bounds error, not proves correctness | +| \ref{pri-statistical-drift} | Statistical Drift Invariant | IV: Deploy | $\text{Accuracy}(t) \approx \text{Accuracy}_0 - \lambda \cdot \mathcal{D}(P_t \lVert P_0)$ | Models decay without code changes; the world drifts away from training data | +| \ref{pri-training-serving-skew} | Training-Serving Skew Law | IV: Deploy | $\Delta\text{Accuracy} \approx \mathbb{E}[\lvert f_{\text{serve}}(x) - f_{\text{train}}(x)\rvert]$ | Even subtle preprocessing differences silently degrade accuracy | +| \ref{pri-latency-budget} | Latency Budget Invariant | IV: Deploy | P99 is the hard constraint; throughput is optimized within it | Throughput is optimized within the latency envelope, never at its expense | +| \ref{pri-bias-feedback} | Bias Feedback Invariant | IV: Deploy | $\Delta_g(k) \approx \Delta_g(0) \cdot \alpha^k$, $\alpha > 1$ | Errors against subgroups compound across cycles when outputs reshape inputs | : **The Thirteen Quantitative Invariants of ML Systems Engineering**: Each invariant was introduced in the Part where its governing constraint first becomes visible. Together, they form the complete analytical framework for reasoning about ML system design, optimization, and deployment. The meta-principle that unifies them all is the conservation of complexity: complexity cannot be destroyed, only moved between data, algorithm, and machine. {#tbl-thirteen-principles tbl-colwidths="[3,18,14,30,35]"} diff --git a/book/quarto/contents/vol1/conclusion/conclusion_glossary.json b/book/quarto/contents/vol1/conclusion/conclusion_glossary.json deleted file mode 100644 index 0ac48d5ab5..0000000000 --- a/book/quarto/contents/vol1/conclusion/conclusion_glossary.json +++ /dev/null @@ -1,194 +0,0 @@ -{ - "metadata": { - "chapter": "conclusion", - "version": "1.0.1", - "generated": "2025-09-15T14:08:03.492906", - "total_terms": 26, - "standardized": true, - "last_updated": "2026-01-11T00:00:00.000000" - }, - "terms": [ - { - "term": "arithmetic intensity", - "definition": "The ratio of floating-point operations to bytes of memory accessed (FLOPs/byte), used in roofline analysis to determine whether workloads are memory-bound or compute-bound and to guide optimization priorities.", - "chapter_source": "conclusion", - "aliases": ["operational intensity"], - "see_also": ["roofline analysis"] - }, - { - "term": "artificial general intelligence", - "definition": "AI systems capable of matching human-level performance across all cognitive tasks, requiring novel distributed architectures, energy-efficient hardware, and unprecedented infrastructure scale.", - "chapter_source": "conclusion", - "aliases": ["agi"], - "see_also": ["compound ai systems"] - }, - { - "term": "artificial intelligence", - "definition": "A field of computer science focused on creating systems capable of performing tasks that typically require human intelligence, such as perception, reasoning, learning, and decision-making.", - "chapter_source": "conclusion", - "aliases": [], - "see_also": [] - }, - { - "term": "data-centric approach", - "definition": "A machine learning paradigm that prioritizes improving data quality, diversity, and curation rather than solely focusing on model architecture improvements to achieve better performance.", - "chapter_source": "conclusion", - "aliases": [], - "see_also": [] - }, - { - "term": "differential privacy", - "definition": "A mathematical framework for quantifying and limiting the privacy loss when releasing statistical information about datasets, ensuring individual privacy while enabling useful data analysis.", - "chapter_source": "conclusion", - "aliases": [], - "see_also": [] - }, - { - "term": "distributed training", - "definition": "A machine learning technique that splits the training process across multiple computing devices or nodes to handle large datasets and complex models more efficiently.", - "chapter_source": "conclusion", - "aliases": [], - "see_also": [] - }, - { - "term": "edge computing", - "definition": "A distributed computing paradigm that brings computation and data storage closer to the location where it is needed, reducing latency and bandwidth usage in ML applications.", - "chapter_source": "conclusion", - "aliases": [], - "see_also": [] - }, - { - "term": "federated learning", - "definition": "A machine learning approach that enables model training across decentralized devices while keeping data localized, allowing collaborative learning without sharing raw data.", - "chapter_source": "conclusion", - "aliases": [], - "see_also": [] - }, - { - "term": "generative ai", - "definition": "A category of artificial intelligence systems capable of creating new content such as text, images, audio, or video based on learned patterns from training data.", - "chapter_source": "conclusion", - "aliases": [], - "see_also": [] - }, - { - "term": "gradient compression", - "definition": "A technique used in distributed training to reduce the communication overhead by compressing gradient information exchanged between computing nodes.", - "chapter_source": "conclusion", - "aliases": [], - "see_also": [] - }, - { - "term": "machine learning frameworks", - "definition": "Software libraries and platforms that provide tools, APIs, and abstractions for developing, training, and deploying machine learning models, such as TensorFlow and PyTorch.", - "chapter_source": "conclusion", - "aliases": [], - "see_also": [] - }, - { - "term": "mixed-precision training", - "definition": "A training technique that uses both 16-bit and 32-bit floating-point representations to accelerate training while maintaining model accuracy and reducing memory usage.", - "chapter_source": "conclusion", - "aliases": [], - "see_also": [] - }, - { - "term": "mlops", - "definition": "The practice of applying DevOps principles to machine learning systems, encompassing the entire ML lifecycle from development and deployment to monitoring and maintenance.", - "chapter_source": "conclusion", - "aliases": [], - "see_also": [] - }, - { - "term": "model compression", - "definition": "Techniques used to reduce the size and computational requirements of machine learning models while preserving their performance, including pruning, quantization, and knowledge distillation.", - "chapter_source": "conclusion", - "aliases": [], - "see_also": [] - }, - { - "term": "model parallelism", - "definition": "A distributed training strategy where different parts of a large model are placed on different computing devices, enabling training of models too large for a single device.", - "chapter_source": "conclusion", - "aliases": [], - "see_also": [] - }, - { - "term": "neuromorphic computing", - "definition": "A computing approach that mimics the structure and function of biological neural networks, potentially offering more energy-efficient processing for AI applications.", - "chapter_source": "conclusion", - "aliases": [], - "see_also": [] - }, - { - "term": "on-device learning", - "definition": "The capability for machine learning models to adapt and learn directly on edge devices without requiring data transmission to external servers.", - "chapter_source": "conclusion", - "aliases": [], - "see_also": [] - }, - { - "term": "quantization", - "definition": "A model optimization technique that reduces the precision of numerical representations in neural networks, typically from 32-bit to 8-bit or lower, to decrease model size and inference time.", - "chapter_source": "conclusion", - "aliases": [], - "see_also": [] - }, - { - "term": "systems integration", - "definition": "The process of combining various components and subsystems into a unified, functional system that operates efficiently and reliably as a whole.", - "chapter_source": "conclusion", - "aliases": [], - "see_also": [] - }, - { - "term": "tinyml", - "definition": "A field focused on deploying machine learning models on resource-constrained embedded devices and microcontrollers with severe limitations on memory, power, and computational capacity.", - "chapter_source": "conclusion", - "aliases": [], - "see_also": [] - }, - { - "term": "transfer learning", - "definition": "A machine learning technique where knowledge gained from training on one task or domain is applied to improve performance on a related but different task or domain.", - "chapter_source": "conclusion", - "aliases": [], - "see_also": [] - }, - { - "term": "compound ai systems", - "definition": "AI architectures that combine multiple specialized models and components working together, rather than relying on a single monolithic model, enabling modularity, specialization, and improved interpretability.", - "chapter_source": "conclusion", - "aliases": [], - "see_also": [] - }, - { - "term": "magnitude-based pruning", - "definition": "A neural network compression technique that removes weights with the smallest absolute values, based on the assumption that small weights contribute minimally to the model's output.", - "chapter_source": "conclusion", - "aliases": [], - "see_also": [] - }, - { - "term": "knowledge distillation", - "definition": "A model compression technique where a smaller 'student' model is trained to mimic the behavior of a larger 'teacher' model, transferring knowledge through soft targets rather than hard labels.", - "chapter_source": "conclusion", - "aliases": [], - "see_also": [] - }, - { - "term": "roofline analysis", - "definition": "A performance modeling technique that plots operational intensity against peak performance to identify whether a system is memory-bound or compute-bound, guiding optimization efforts.", - "chapter_source": "conclusion", - "aliases": [], - "see_also": [] - }, - { - "term": "speculative decoding", - "definition": "An optimization technique for autoregressive language models where a smaller model generates draft tokens that are then verified by a larger model, accelerating inference while maintaining quality.", - "chapter_source": "conclusion", - "aliases": [], - "see_also": [] - } - ] -} diff --git a/book/quarto/contents/vol1/data_engineering/data_engineering.qmd b/book/quarto/contents/vol1/data_engineering/data_engineering.qmd index 65043a64c0..c2be0ce93a 100644 --- a/book/quarto/contents/vol1/data_engineering/data_engineering.qmd +++ b/book/quarto/contents/vol1/data_engineering/data_engineering.qmd @@ -1,7 +1,6 @@ --- quiz: data_engineering_quizzes.json concepts: data_engineering_concepts.yml -glossary: data_engineering_glossary.json engine: jupyter --- diff --git a/book/quarto/contents/vol1/data_engineering/data_engineering_glossary.json b/book/quarto/contents/vol1/data_engineering/data_engineering_glossary.json deleted file mode 100644 index ada0f813a3..0000000000 --- a/book/quarto/contents/vol1/data_engineering/data_engineering_glossary.json +++ /dev/null @@ -1,423 +0,0 @@ -{ - "metadata": { - "chapter": "data_engineering", - "version": "1.0.0", - "generated": "2025-09-15T14:08:03.493315", - "total_terms": 60, - "standardized": true, - "last_updated": "2025-09-15T15:01:37.284610" - }, - "terms": [ - { - "term": "active learning", - "definition": "An approach that intelligently selects the most informative examples for human annotation based on model uncertainty, reducing the amount of labeled data needed for effective training.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "apache kafka", - "definition": "A distributed streaming platform that handles real-time data feeds using a publish-subscribe messaging system, commonly used for building ML data pipelines with high throughput and fault tolerance.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "apache spark", - "definition": "An open-source distributed computing framework that enables large-scale data processing across clusters of computers, revolutionizing ETL operations with in-memory computing capabilities.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "batch ingestion", - "definition": "A data processing pattern that collects and processes data in groups or batches at scheduled intervals, suitable for scenarios where real-time processing is not critical.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "batch processing", - "definition": "A computational approach that processes large volumes of data in discrete chunks during scheduled time windows, enabling efficient handling of massive datasets for ML training.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "bounding box", - "definition": "A rectangular annotation that identifies object locations in images by drawing a box around each object of interest, commonly used in computer vision training datasets.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "caching", - "definition": "A technique for storing frequently accessed data in high-speed storage systems to reduce retrieval latency and improve system performance in ML pipelines.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "cap theorem", - "definition": "A distributed systems principle stating that a data store can only provide two of the three guarantees: Consistency, Availability, and Partition Tolerance.", - "chapter_source": "data_engineering" - }, - { - "term": "classification labels", - "definition": "Simple categorical annotations that assign specific tags or categories to data examples, representing the most basic form of supervised learning annotation.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "consensus labeling", - "definition": "A quality control approach that collects multiple annotations for the same data point to identify controversial cases and improve label reliability through inter-annotator agreement.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "crowdsourcing", - "definition": "A collaborative data collection approach that leverages distributed individuals via the internet to perform annotation tasks, enabling scalable dataset creation through platforms like Amazon Mechanical Turk.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "data augmentation", - "definition": "The process of artificially expanding training datasets by creating modified versions of existing data through transformations like rotation, scaling, or noise injection.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "data cascades", - "definition": "Systemic failures where data quality issues compound over time, creating downstream negative consequences such as model failures, costly rebuilding, or project termination.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "data contracts", - "definition": "Explicit agreements between data producers and consumers defining schema, quality expectations, and service levels to prevent downstream breakage.", - "chapter_source": "data_engineering" - }, - { - "term": "data governance", - "definition": "The framework of policies, procedures, and technologies that ensure data security, privacy, compliance, and ethical use throughout the machine learning pipeline.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "data ingestion", - "definition": "The process of collecting and importing data from various sources into a storage system for further processing, involving both batch and stream processing patterns.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "data lake", - "definition": "A storage repository that holds structured, semi-structured, and unstructured data in its native format, using schema-on-read approaches for flexible data analysis.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "data lineage", - "definition": "The documentation and tracking of data flow through various transformations and processes, providing visibility into data origins and modifications for compliance and debugging.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "data pipeline", - "definition": "The infrastructure and workflows that automate the movement and transformation of data from sources through processing stages to final storage or consumption.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "data quality", - "definition": "The degree to which data meets requirements for accuracy, completeness, consistency, and timeliness, directly impacting machine learning model performance.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "data quality multiplier", - "definition": "The concept that improvements in data quality (like cleaner labels) yield multiplicative rather than additive gains in model performance compared to model tweaks.", - "chapter_source": "data_engineering" - }, - { - "term": "data validation", - "definition": "The process of ensuring incoming data meets quality standards and conforms to expected schemas, preventing downstream issues in ML pipelines.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "data warehouse", - "definition": "A centralized repository optimized for analytical queries (OLAP) that stores integrated, structured data from multiple sources in a standardized schema.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "dead letter queue", - "definition": "A separate storage mechanism for data that fails processing, allowing for later analysis and potential reprocessing of problematic data without blocking the main pipeline.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "differential privacy", - "definition": "A mathematical framework that adds calibrated noise to datasets or query results to protect individual privacy while preserving overall data utility for analysis.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "distributed computing", - "definition": "An approach that processes data across multiple machines or processors simultaneously, enabling scalable handling of large datasets through frameworks like Apache Spark.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "elt (extract, load, transform)", - "definition": "A data processing paradigm that first loads raw data into the target system before applying transformations, providing flexibility for evolving analytical needs.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "etl (extract, transform, load)", - "definition": "A traditional data processing paradigm that transforms data before loading it into a data warehouse, resulting in ready-to-query formatted data.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "feature engineering", - "definition": "The process of using domain knowledge to create new features from existing data that make machine learning algorithms work more effectively.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "feature store", - "definition": "A specialized data storage system that provides standardized, reusable features for machine learning, enabling feature sharing across multiple models and teams.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "four pillars framework", - "definition": "A data engineering framework organizing concerns into Quality, Reliability, Scalability, and Governance to manage the data lifecycle.", - "chapter_source": "data_engineering" - }, - { - "term": "generalization", - "definition": "The ability of a machine learning model to perform well on unseen data that differs from the training set, often improved through diverse and high-quality training data.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "graceful degradation", - "definition": "A system design principle where services continue functioning with reduced capabilities when faced with partial failures or data unavailability.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "ground truth", - "definition": "The objective reality or actual state of the phenomenon being observed, used as the reference standard (labels) for training and evaluating machine learning models.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [ - "labeling" - ] - }, - { - "term": "hdfs (hadoop distributed file system)", - "definition": "A distributed file system designed to store large datasets across clusters of commodity hardware, providing scalability and fault tolerance for big data applications.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "iops", - "definition": "Input/Output Operations Per Second; a storage performance metric measuring the number of read/write operations a device can handle per second, critical for random access workloads like training data loading.", - "chapter_source": "data_engineering", - "aliases": [ - "input/output operations per second" - ] - }, - { - "term": "k-anonymity", - "definition": "A privacy technique that ensures each record in a dataset is indistinguishable from at least k-1 other records by generalizing quasi-identifiers.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "keyword spotting (kws)", - "definition": "A technology that detects specific wake words or phrases in audio streams, typically used in voice-activated devices with constraints on power consumption and latency.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "masking", - "definition": "An anonymization technique that alters or obfuscates sensitive values so they cannot be directly traced back to the original data subject.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "metadata", - "definition": "Descriptive information about datasets that includes details about data collection, quality metrics, validation status, and other contextual information essential for data management.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "model-centric ai", - "definition": "A research paradigm where the dataset is treated as fixed and engineering effort focuses on optimizing model architecture.", - "chapter_source": "data_engineering" - }, - { - "term": "nosql", - "definition": "A category of database systems designed to handle large volumes of unstructured or semi-structured data with flexible schemas, often used in big data applications.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "olap (online analytical processing)", - "definition": "A database approach optimized for complex analytical queries across large datasets, typically used in data warehouses for business intelligence.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "oltp (online transaction processing)", - "definition": "A database approach optimized for frequent, short transactions and real-time processing, commonly used in operational applications.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "outlier detection", - "definition": "The process of identifying data points that significantly deviate from normal patterns, which may represent errors, anomalies, or valuable rare events.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "partitioning", - "definition": "A database technique that divides large datasets into smaller, manageable segments based on specific criteria to improve query performance and system scalability.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "pipeline jungle", - "definition": "A complex, unmanageable web of data processing scripts and intermediate files that evolves when data pipelines are not engineered with the same rigor as production code.", - "chapter_source": "data_engineering" - }, - { - "term": "pseudonymization", - "definition": "A privacy technique that replaces direct identifiers with artificial identifiers while maintaining the ability to trace records for analysis purposes.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "schema", - "definition": "The structure and format definition of data that specifies data types, field names, and relationships, essential for data validation and processing consistency.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "schema evolution", - "definition": "The process of modifying data schemas over time while maintaining backward compatibility and ensuring continued functionality of dependent systems and applications.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "schema-on-read", - "definition": "An approach used in data lakes where data structure is defined and enforced at the time of reading rather than when storing, providing flexibility for diverse data types.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "segmentation maps", - "definition": "Detailed annotations that classify objects at the pixel level, providing the most granular labeling information but requiring significantly more storage and processing resources.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "semi-supervised learning", - "definition": "A machine learning approach that uses both labeled and unlabeled data for training, leveraging structural assumptions to improve model performance with limited labels.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "stream ingestion", - "definition": "A data processing pattern that handles data in real-time as it arrives, essential for applications requiring immediate processing and low-latency responses.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "stream processing", - "definition": "Real-time data processing approach that handles continuous flows of data as it arrives, enabling immediate responses to events and pattern detection.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "synthetic data", - "definition": "Artificially generated data created using algorithms, simulations, or generative models to supplement real-world datasets, addressing limitations in data availability or privacy concerns.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "transfer learning", - "definition": "A machine learning technique that leverages models already trained on one task to improve performance on a different but related task, reducing data requirements.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "versioning", - "definition": "The practice of tracking changes to datasets, models, and pipelines over time, enabling reproducibility, rollback capabilities, and audit trails in ML systems.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "weak supervision", - "definition": "An approach that uses lower-quality labels obtained more efficiently through heuristics, distant supervision, or programmatic methods rather than manual expert annotation.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - }, - { - "term": "web scraping", - "definition": "An automated technique for extracting data from websites to build custom datasets, requiring careful consideration of legal, ethical, and technical constraints.", - "chapter_source": "data_engineering", - "aliases": [], - "see_also": [] - } - ] -} \ No newline at end of file diff --git a/book/quarto/contents/vol1/data_selection/data_selection.qmd b/book/quarto/contents/vol1/data_selection/data_selection.qmd index bdc5372a86..c62dea5b10 100644 --- a/book/quarto/contents/vol1/data_selection/data_selection.qmd +++ b/book/quarto/contents/vol1/data_selection/data_selection.qmd @@ -1,7 +1,6 @@ --- quiz: data_selection_quizzes.json concepts: data_selection_concepts.yml -glossary: data_selection_glossary.json crossrefs: data_selection_xrefs.json engine: jupyter --- @@ -3185,12 +3184,12 @@ class RandomAccessPenalty: nvme_penalty_str = fmt(nvme_penalty, precision=2, commas=False) ``` -| **Storage Tier** | **Sequential Throughput** | **Random I/O (IOPS)** | **Random Throughput (approx)** | **Random Penalty** | -|:-----------------|:-------------------------:|:---------------------:|:------------------------------:|:------------------:| -| **HDD (7.2k)** | ~`{python} RandomAccessPenalty.hdd_seq_mb_s_str` MB/s | ~`{python} RandomAccessPenalty.hdd_iops_str` | ~`{python} RandomAccessPenalty.hdd_random_mb_s_str` MB/s | **`{python} RandomAccessPenalty.hdd_penalty_str`$\times$** | -| **SATA SSD** | ~`{python} RandomAccessPenalty.sata_seq_mb_s_str` MB/s | ~`{python} RandomAccessPenalty.sata_iops_str` | ~`{python} RandomAccessPenalty.sata_random_mb_s_str` MB/s | **`{python} RandomAccessPenalty.sata_penalty_str`$\times$** | -| **NVMe SSD** | ~`{python} RandomAccessPenalty.nvme_seq_mb_s_str` MB/s | ~`{python} RandomAccessPenalty.nvme_iops_str` | ~`{python} RandomAccessPenalty.nvme_random_mb_s_str` MB/s | **`{python} RandomAccessPenalty.nvme_penalty_str`$\times$** | -| **Cloud (S3)** | ~100 MB/s (per conn) | ~10–50 ms (lat) | Very Low (per conn) | **Extreme** | +| **Storage Tier** | **Sequential Throughput** | **Random I/O (IOPS)** | **Random Throughput (approx)** | **Random Penalty** | +|:-----------------|:------------------------------------------------------:|:---------------------------------------------:|:---------------------------------------------------------:|:-----------------------------------------------------------:| +| **HDD (7.2k)** | ~`{python} RandomAccessPenalty.hdd_seq_mb_s_str` MB/s | ~`{python} RandomAccessPenalty.hdd_iops_str` | ~`{python} RandomAccessPenalty.hdd_random_mb_s_str` MB/s | **`{python} RandomAccessPenalty.hdd_penalty_str`$\times$** | +| **SATA SSD** | ~`{python} RandomAccessPenalty.sata_seq_mb_s_str` MB/s | ~`{python} RandomAccessPenalty.sata_iops_str` | ~`{python} RandomAccessPenalty.sata_random_mb_s_str` MB/s | **`{python} RandomAccessPenalty.sata_penalty_str`$\times$** | +| **NVMe SSD** | ~`{python} RandomAccessPenalty.nvme_seq_mb_s_str` MB/s | ~`{python} RandomAccessPenalty.nvme_iops_str` | ~`{python} RandomAccessPenalty.nvme_random_mb_s_str` MB/s | **`{python} RandomAccessPenalty.nvme_penalty_str`$\times$** | +| **Cloud (S3)** | ~100 MB/s (per conn) | ~10–50 ms (lat) | Very Low (per conn) | **Extreme** | : **The Cost of Randomness**: Comparative I/O throughput for sequential vs. random 4 KB reads across different storage tiers. Standard data loaders optimize for sequential throughput, while data selection strategies often incur the random access penalty. {#tbl-io-performance .striped .hover tbl-colwidths="[20,20,20,20,20]"} diff --git a/book/quarto/contents/vol1/data_selection/data_selection_glossary.json b/book/quarto/contents/vol1/data_selection/data_selection_glossary.json deleted file mode 100644 index 5a795d4689..0000000000 --- a/book/quarto/contents/vol1/data_selection/data_selection_glossary.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "metadata": { - "chapter": "data_selection", - "version": "1.0.0", - "generated": "2026-01-30T00:00:00.000000", - "total_terms": 2, - "standardized": true - }, - "terms": [ - { - "term": "information-compute ratio (icr)", - "definition": "A metric quantifying the efficiency of data selection, defined as the ratio of model performance gain to the computational cost (FLOPs) required to achieve it. Maximizing ICR is the primary goal of data selection strategies.", - "chapter_source": "data_selection", - "aliases": ["ICR"], - "see_also": ["performance-per-data"] - }, - { - "term": "performance-per-data (ppd)", - "definition": "A metric measuring the accuracy gain per training sample, used to evaluate the quality of a dataset or selection strategy. High PPD indicates a dataset rich in information and low in redundancy.", - "chapter_source": "data_selection", - "aliases": ["PPD"], - "see_also": ["information-compute ratio"] - } - ] -} diff --git a/book/quarto/contents/vol1/frameworks/frameworks_glossary.json b/book/quarto/contents/vol1/frameworks/frameworks_glossary.json deleted file mode 100644 index 9494fce187..0000000000 --- a/book/quarto/contents/vol1/frameworks/frameworks_glossary.json +++ /dev/null @@ -1,306 +0,0 @@ -{ - "metadata": { - "chapter": "frameworks", - "version": "1.0.0", - "generated": "2025-09-15T14:08:03.495518", - "total_terms": 42, - "standardized": true, - "last_updated": "2025-09-15T15:01:37.286395" - }, - "terms": [ - { - "term": "activation function", - "definition": "A mathematical function applied to the output of a neural network layer to introduce non-linearity, enabling the network to learn complex patterns. Common activation functions include ReLU, sigmoid, tanh, and softmax.", - "chapter_source": "frameworks", - "aliases": [], - "see_also": [] - }, - { - "term": "automatic differentiation", - "definition": "A computational technique that automatically calculates exact derivatives of functions implemented as computer programs by systematically applying the chain rule at the elementary operation level, essential for training neural networks through gradient-based optimization.", - "chapter_source": "frameworks", - "aliases": [], - "see_also": [] - }, - { - "term": "backpropagation", - "definition": "The algorithm used to train neural networks by computing gradients of the loss function with respect to network parameters through reverse-mode automatic differentiation, enabling efficient parameter updates during training.", - "chapter_source": "frameworks", - "aliases": [], - "see_also": [] - }, - { - "term": "batch normalization", - "definition": "A technique that normalizes the inputs to each layer in a neural network to have zero mean and unit variance, which helps stabilize training and allows higher learning rates.", - "chapter_source": "frameworks", - "aliases": [], - "see_also": [] - }, - { - "term": "blas", - "definition": "Basic Linear Algebra Subprograms, a specification for low-level routines that perform common linear algebra operations such as vector addition, scalar multiplication, dot products, and matrix operations, forming the computational foundation of modern ML frameworks.", - "chapter_source": "frameworks", - "aliases": [], - "see_also": [] - }, - { - "term": "computational graph", - "definition": "A directed acyclic graph representation of mathematical operations where nodes represent operations or variables and edges represent data flow, enabling automatic differentiation and optimization of neural network computations.", - "chapter_source": "frameworks", - "aliases": [], - "see_also": [] - }, - { - "term": "convolution", - "definition": "A mathematical operation fundamental to convolutional neural networks that applies filters (kernels) to input data to extract features such as edges, textures, or patterns, particularly effective for processing images and spatial data.", - "chapter_source": "frameworks", - "aliases": [], - "see_also": [] - }, - { - "term": "cublas", - "definition": "NVIDIA's CUDA Basic Linear Algebra Subprograms library that provides GPU-accelerated implementations of standard linear algebra operations, enabling high-performance matrix computations on NVIDIA graphics processing units.", - "chapter_source": "frameworks", - "aliases": [], - "see_also": [] - }, - { - "term": "cuda", - "definition": "NVIDIA's parallel computing platform and programming model that enables general-purpose computing on graphics processing units (GPUs), allowing machine learning frameworks to leverage massive parallelism for accelerated tensor operations.", - "chapter_source": "frameworks", - "aliases": [], - "see_also": [] - }, - { - "term": "dynamic graph", - "definition": "A computational graph that is built and modified during program execution, allowing for flexible model architectures and easier debugging but potentially limiting optimization opportunities compared to static graphs.", - "chapter_source": "frameworks", - "aliases": [], - "see_also": [] - }, - { - "term": "eager execution", - "definition": "An execution mode where operations are evaluated immediately as they are called in the code, providing intuitive debugging and development experience but potentially sacrificing some optimization opportunities available in graph-based execution.", - "chapter_source": "frameworks", - "aliases": [], - "see_also": [] - }, - { - "term": "epoch", - "definition": "One complete pass through the entire training dataset during the neural network training process, after which the model has seen every training example once.", - "chapter_source": "frameworks", - "aliases": [], - "see_also": [] - }, - { - "term": "federated learning", - "definition": "A machine learning approach that enables training models across decentralized data sources without centralizing the data, allowing multiple parties to collaboratively train a model while preserving data privacy.", - "chapter_source": "frameworks", - "aliases": [], - "see_also": [] - }, - { - "term": "gemm", - "definition": "General Matrix Multiply operations that follow the pattern C = αAB + βC, representing the fundamental computational kernel underlying most neural network operations including fully connected layers and convolutional layers.", - "chapter_source": "frameworks", - "aliases": [], - "see_also": [] - }, - { - "term": "gemv", - "definition": "General Matrix-Vector multiplication operations that compute the product of a matrix and a vector, commonly used in neural network computations and requiring careful optimization for memory access patterns.", - "chapter_source": "frameworks", - "aliases": [], - "see_also": [] - }, - { - "term": "gradient clipping", - "definition": "A technique used during neural network training to prevent exploding gradients by limiting the magnitude of gradients to a specified threshold, helping maintain training stability in deep networks.", - "chapter_source": "frameworks", - "aliases": [], - "see_also": [] - }, - { - "term": "gradient descent", - "definition": "An optimization algorithm that iteratively adjusts model parameters in the direction of the negative gradient of the loss function to minimize prediction errors and improve model performance.", - "chapter_source": "frameworks", - "aliases": [], - "see_also": [] - }, - { - "term": "hardware abstraction", - "definition": "The layer in ML frameworks that provides a unified interface to diverse computing hardware (CPUs, GPUs, TPUs, accelerators) while handling device-specific optimizations and memory management behind the scenes.", - "chapter_source": "frameworks", - "aliases": [], - "see_also": [] - }, - { - "term": "hyperparameter", - "definition": "A configuration setting for machine learning algorithms that is set before training begins and controls aspects of the learning process, such as learning rate, batch size, or network architecture, distinct from model parameters learned during training.", - "chapter_source": "frameworks", - "aliases": [], - "see_also": [] - }, - { - "term": "imperative programming", - "definition": "A programming paradigm where operations are executed immediately as they are encountered in the code, allowing for natural control flow and easier debugging but potentially limiting optimization opportunities.", - "chapter_source": "frameworks", - "aliases": [], - "see_also": [] - }, - { - "term": "jax", - "definition": "A numerical computing library developed by Google Research that combines NumPy's API with functional programming transformations including automatic differentiation, just-in-time compilation, and automatic vectorization for high-performance machine learning research.", - "chapter_source": "frameworks", - "aliases": [], - "see_also": [] - }, - { - "term": "jit compilation", - "definition": "Just-In-Time compilation that analyzes and optimizes code at runtime, enabling frameworks to balance the flexibility of eager execution with the performance benefits of graph optimization by compiling frequently used functions.", - "chapter_source": "frameworks", - "aliases": [], - "see_also": [] - }, - { - "term": "lapack", - "definition": "Linear Algebra Package that extends BLAS with higher-level linear algebra operations including matrix decompositions, eigenvalue problems, and linear system solutions, providing essential mathematical foundations for machine learning computations.", - "chapter_source": "frameworks", - "aliases": [], - "see_also": [] - }, - { - "term": "learning rate", - "definition": "A hyperparameter that determines the step size at which a model's parameters are updated during training, controlling how quickly or slowly the model learns from the training data.", - "chapter_source": "frameworks", - "aliases": [], - "see_also": [] - }, - { - "term": "machine learning framework", - "definition": "A software platform that provides tools and abstractions for designing, training, and deploying machine learning models, bridging user applications with infrastructure through computational graphs, hardware optimization, and workflow orchestration.", - "chapter_source": "frameworks", - "aliases": [], - "see_also": [] - }, - { - "term": "model parallelism", - "definition": "A distributed computing strategy that partitions a neural network model across multiple devices, enabling training of large models that exceed the memory capacity of individual devices by distributing layers or components across hardware.", - "chapter_source": "frameworks", - "aliases": [], - "see_also": [] - }, - { - "term": "onnx", - "definition": "Open Neural Network Exchange, a standardized format for representing machine learning models that enables interoperability between different frameworks, allowing models trained in one framework to be deployed using another.", - "chapter_source": "frameworks", - "aliases": [], - "see_also": [] - }, - { - "term": "optimizer", - "definition": "An algorithm that adjusts model parameters during training to minimize the loss function, with common examples including SGD (Stochastic Gradient Descent), Adam, and RMSprop, each with different strategies for parameter updates.", - "chapter_source": "frameworks", - "aliases": [], - "see_also": [] - }, - { - "term": "pipeline parallelism", - "definition": "A model parallelism technique that distributes consecutive layers of a neural network across different devices, enabling parallel processing where each device works on different stages of the computation pipeline.", - "chapter_source": "frameworks", - "aliases": [], - "see_also": [] - }, - { - "term": "pytorch", - "definition": "A deep learning framework developed by Facebook's AI Research lab that emphasizes dynamic computational graphs, eager execution, and intuitive Python integration, particularly popular for research and experimentation.", - "chapter_source": "frameworks", - "aliases": [], - "see_also": [] - }, - { - "term": "quantization", - "definition": "A model compression technique that reduces the precision of model parameters and activations from higher precision formats (like 32-bit floats) to lower precision (like 8-bit integers), significantly reducing memory usage and computational requirements.", - "chapter_source": "frameworks", - "aliases": [], - "see_also": [] - }, - { - "term": "reverse-mode differentiation", - "definition": "An automatic differentiation technique that computes gradients by traversing the computational graph in reverse order, highly efficient for functions with many inputs and few outputs, making it ideal for neural network training.", - "chapter_source": "frameworks", - "aliases": [], - "see_also": [] - }, - { - "term": "static graph", - "definition": "A computational graph that is defined completely before execution begins, enabling comprehensive optimization and efficient deployment but requiring all operations to be specified upfront, limiting runtime flexibility.", - "chapter_source": "frameworks", - "aliases": [], - "see_also": [] - }, - { - "term": "symbolic programming", - "definition": "A programming paradigm where computations are represented as abstract symbols and expressions that are constructed first and executed later, allowing for comprehensive optimization but requiring explicit execution phases.", - "chapter_source": "frameworks", - "aliases": [], - "see_also": [] - }, - { - "term": "tensor", - "definition": "A multidimensional array that generalizes scalars, vectors, and matrices to higher dimensions, serving as the fundamental data structure in machine learning frameworks for representing and manipulating numerical data.", - "chapter_source": "frameworks", - "aliases": [], - "see_also": [] - }, - { - "term": "tensor parallelism", - "definition": "A distributed computing technique that partitions individual tensors and operations across multiple devices, reducing per-device memory requirements while maintaining computational efficiency through coordinated parallel execution.", - "chapter_source": "frameworks", - "aliases": [], - "see_also": [] - }, - { - "term": "tensorflow", - "definition": "A comprehensive machine learning framework developed by Google that provides tools for the entire ML pipeline from research to production, featuring both eager execution and graph-based computation with extensive ecosystem support.", - "chapter_source": "frameworks", - "aliases": [], - "see_also": [] - }, - { - "term": "tpu", - "definition": "Tensor Processing Unit, Google's custom Application-Specific Integrated Circuits (ASICs) designed specifically for accelerating tensor operations in machine learning workloads, offering significant performance and energy efficiency improvements over general-purpose processors.", - "chapter_source": "frameworks", - "aliases": [], - "see_also": [] - }, - { - "term": "transfer learning", - "definition": "A machine learning technique that leverages knowledge gained from pre-trained models on related tasks, allowing faster training and better performance on new tasks with limited data by reusing learned features and representations.", - "chapter_source": "frameworks", - "aliases": [], - "see_also": [] - }, - { - "term": "xla", - "definition": "Accelerated Linear Algebra, a domain-specific compiler for linear algebra operations that optimizes TensorFlow and JAX computations by generating efficient code for various hardware platforms including CPUs, GPUs, and TPUs.", - "chapter_source": "frameworks", - "aliases": [], - "see_also": [] - }, - { - "term": "data parallelism", - "definition": "A distributed computing strategy that partitions training data across multiple devices while maintaining identical model copies on each device, enabling efficient scaling of training by processing different data batches simultaneously.", - "chapter_source": "frameworks", - "aliases": [], - "see_also": [] - }, - { - "term": "static graphs vs dynamic graphs", - "definition": "Two fundamental approaches to representing computations in ML frameworks: static graphs are defined before execution and enable optimization but limit flexibility, while dynamic graphs are built during execution allowing for flexible control flow but with potential optimization limitations.", - "chapter_source": "frameworks", - "aliases": [], - "see_also": [] - } - ] -} diff --git a/book/quarto/contents/vol1/hw_acceleration/hw_acceleration.qmd b/book/quarto/contents/vol1/hw_acceleration/hw_acceleration.qmd index bddf6d8de5..f1419f5e06 100644 --- a/book/quarto/contents/vol1/hw_acceleration/hw_acceleration.qmd +++ b/book/quarto/contents/vol1/hw_acceleration/hw_acceleration.qmd @@ -1,7 +1,6 @@ --- quiz: hw_acceleration_quizzes.json concepts: hw_acceleration_concepts.yml -glossary: hw_acceleration_glossary.json engine: jupyter --- @@ -1082,9 +1081,7 @@ class WeightMatrixCalc: ```{.python} # Framework abstracts compute-intensive operations -dense = Dense(512)( - input_tensor -) # $256{\times}512$ MACs per sample +dense = Dense(512)(input_tensor) # $256{\times}512$ MACs per sample ``` ::: diff --git a/book/quarto/contents/vol1/hw_acceleration/hw_acceleration_glossary.json b/book/quarto/contents/vol1/hw_acceleration/hw_acceleration_glossary.json deleted file mode 100644 index 29e032a97c..0000000000 --- a/book/quarto/contents/vol1/hw_acceleration/hw_acceleration_glossary.json +++ /dev/null @@ -1,278 +0,0 @@ -{ - "metadata": { - "chapter": "hw_acceleration", - "version": "1.0.0", - "generated": "2025-09-15T14:08:03.498161", - "total_terms": 38, - "standardized": true, - "last_updated": "2025-09-15T15:01:37.287485" - }, - "terms": [ - { - "term": "application-specific integrated circuit (asic)", - "definition": "A custom-designed microchip optimized for a specific computational task, offering maximum performance and energy efficiency by implementing only the necessary functionality in silicon.", - "chapter_source": "hw_acceleration", - "aliases": [], - "see_also": [] - }, - { - "term": "bandwidth", - "definition": "The maximum rate of data transfer across a communication channel or memory interface, typically measured in bytes per second and critical for optimizing data movement in AI accelerators.", - "chapter_source": "hw_acceleration", - "aliases": [], - "see_also": [] - }, - { - "term": "batch processing", - "definition": "The technique of processing multiple data samples simultaneously to amortize computation and memory access costs, improving overall throughput in neural network training and inference.", - "chapter_source": "hw_acceleration", - "aliases": [], - "see_also": [] - }, - { - "term": "cuda (compute unified device architecture)", - "definition": "NVIDIA's parallel computing platform and programming model that enables developers to use GPUs for general-purpose computing beyond graphics rendering.", - "chapter_source": "hw_acceleration", - "aliases": [], - "see_also": [] - }, - { - "term": "domain-specific architecture", - "definition": "Hardware designs tailored to optimize specific computational workloads, trading flexibility for improved performance and energy efficiency compared to general-purpose processors.", - "chapter_source": "hw_acceleration", - "aliases": [], - "see_also": [] - }, - { - "term": "dynamic random access memory (dram)", - "definition": "A type of volatile memory that stores data in capacitors and requires periodic refresh cycles, commonly used as main memory in computer systems.", - "chapter_source": "hw_acceleration", - "aliases": [], - "see_also": [] - }, - { - "term": "edge computing", - "definition": "The deployment of computation and data storage closer to the sources of data, enabling real-time processing with low latency and reduced bandwidth requirements.", - "chapter_source": "hw_acceleration", - "aliases": [], - "see_also": [] - }, - { - "term": "energy efficiency", - "definition": "The measure of computational work performed per unit of energy consumed, typically expressed as operations per joule and crucial for battery-powered and data center deployments.", - "chapter_source": "hw_acceleration", - "aliases": [], - "see_also": [] - }, - { - "term": "field-programmable gate array (fpga)", - "definition": "A reconfigurable integrated circuit that can be programmed after manufacturing to implement custom digital circuits and specialized computations.", - "chapter_source": "hw_acceleration", - "aliases": [], - "see_also": [] - }, - { - "term": "floating-point unit (fpu)", - "definition": "A specialized processor component designed to perform arithmetic operations on floating-point numbers with high precision and efficiency.", - "chapter_source": "hw_acceleration", - "aliases": [], - "see_also": [] - }, - { - "term": "graphics processing unit (gpu)", - "definition": "A specialized processor originally designed for graphics rendering that provides massive parallel computing capabilities well-suited for neural network computations.", - "chapter_source": "hw_acceleration", - "aliases": [], - "see_also": [] - }, - { - "term": "hardware acceleration", - "definition": "The use of specialized computing hardware to perform certain operations faster and more efficiently than software running on general-purpose processors.", - "chapter_source": "hw_acceleration", - "aliases": [], - "see_also": [] - }, - { - "term": "high bandwidth memory (hbm)", - "definition": "An advanced memory technology that provides much higher bandwidth than traditional DRAM by using 3D stacking and wide interfaces, critical for data-intensive AI workloads.", - "chapter_source": "hw_acceleration", - "aliases": [], - "see_also": [] - }, - { - "term": "inference", - "definition": "The phase of machine learning where a trained model makes predictions on new input data, typically requiring lower precision and computational resources than training.", - "chapter_source": "hw_acceleration", - "aliases": [], - "see_also": [] - }, - { - "term": "instruction set architecture (isa)", - "definition": "The interface between software and hardware that defines the set of instructions a processor can execute, including data types and addressing modes.", - "chapter_source": "hw_acceleration", - "aliases": [], - "see_also": [] - }, - { - "term": "int8 quantization", - "definition": "A numerical precision reduction technique that represents neural network weights and activations using 8-bit integers instead of 32-bit floating-point numbers, improving speed and reducing memory usage.", - "chapter_source": "hw_acceleration", - "aliases": [], - "see_also": [] - }, - { - "term": "kernel fusion", - "definition": "An optimization technique that combines multiple computational operations into a single kernel to reduce memory transfers and improve performance on parallel processors.", - "chapter_source": "hw_acceleration", - "aliases": [], - "see_also": [] - }, - { - "term": "latency", - "definition": "The time delay between initiating a request and receiving the response, critical for real-time AI applications and user experience.", - "chapter_source": "hw_acceleration", - "aliases": [], - "see_also": [] - }, - { - "term": "machine learning accelerator (ml accelerator)", - "definition": "Specialized computing hardware designed to efficiently execute machine learning workloads through optimized matrix operations, memory hierarchies, and parallel processing units.", - "chapter_source": "hw_acceleration", - "aliases": [], - "see_also": [] - }, - { - "term": "memory hierarchy", - "definition": "The organization of memory systems with different access speeds and capacities, from fast on-chip caches to slower off-chip main memory.", - "chapter_source": "hw_acceleration", - "aliases": [], - "see_also": [] - }, - { - "term": "mixed-precision computing", - "definition": "A technique that uses different numerical precisions at various stages of computation, such as FP16 for matrix multiplications and FP32 for accumulations.", - "chapter_source": "hw_acceleration", - "aliases": [], - "see_also": [] - }, - { - "term": "neural processing unit (npu)", - "definition": "A specialized processor designed specifically for neural network computations, optimizing common operations like matrix multiplication and activation functions.", - "chapter_source": "hw_acceleration", - "aliases": [], - "see_also": [] - }, - { - "term": "on-chip memory", - "definition": "Fast memory integrated directly onto the processor chip, including caches and scratchpad memory, providing high bandwidth and low latency data access.", - "chapter_source": "hw_acceleration", - "aliases": [], - "see_also": [] - }, - { - "term": "parallelism", - "definition": "The simultaneous execution of multiple computational tasks or operations, fundamental to achieving high performance in neural network processing.", - "chapter_source": "hw_acceleration", - "aliases": [], - "see_also": [] - }, - { - "term": "quantization", - "definition": "The process of reducing the numerical precision of neural network parameters and activations to decrease memory usage and computational requirements while maintaining acceptable accuracy.", - "chapter_source": "hw_acceleration", - "aliases": [], - "see_also": [] - }, - { - "term": "simd (single instruction, multiple data)", - "definition": "A parallel computing architecture that applies the same operation to multiple data elements simultaneously, effective for regular data-parallel computations.", - "chapter_source": "hw_acceleration", - "aliases": [], - "see_also": [] - }, - { - "term": "simt (single instruction, multiple thread)", - "definition": "An extension of SIMD that enables parallel execution across multiple independent threads, each maintaining its own state and program counter.", - "chapter_source": "hw_acceleration", - "aliases": [], - "see_also": [] - }, - { - "term": "systolic array", - "definition": "A specialized computing architecture where data flows rhythmically through a grid of processing elements, optimized for matrix operations in neural networks.", - "chapter_source": "hw_acceleration", - "aliases": [], - "see_also": [] - }, - { - "term": "tensor", - "definition": "A multi-dimensional array used to represent data and parameters in neural networks, generalizing scalars, vectors, and matrices to higher dimensions.", - "chapter_source": "hw_acceleration", - "aliases": [], - "see_also": [] - }, - { - "term": "tensor processing unit (tpu)", - "definition": "Google's custom-designed accelerator optimized specifically for tensor operations and neural network workloads, featuring systolic array architecture.", - "chapter_source": "hw_acceleration", - "aliases": [], - "see_also": [] - }, - { - "term": "throughput", - "definition": "The rate at which a system can process data or complete operations, typically measured in operations per second and crucial for training large models.", - "chapter_source": "hw_acceleration", - "aliases": [], - "see_also": [] - }, - { - "term": "training", - "definition": "The phase of machine learning where model parameters are learned from data through iterative optimization, typically requiring high numerical precision and computational resources.", - "chapter_source": "hw_acceleration", - "aliases": [], - "see_also": [] - }, - { - "term": "vector operations", - "definition": "Computational operations that process multiple data elements simultaneously, enabling efficient parallel execution of element-wise transformations in neural networks.", - "chapter_source": "hw_acceleration", - "aliases": [], - "see_also": [] - }, - { - "term": "von neumann bottleneck", - "definition": "The performance limitation caused by the shared bus between processor and memory in traditional computer architectures, where data movement becomes more expensive than computation.", - "chapter_source": "hw_acceleration", - "aliases": [], - "see_also": [] - }, - { - "term": "dataflow architecture", - "definition": "Specialized computing architecture where instruction execution is determined by data availability rather than a program counter, enabling highly parallel processing of neural network operations.", - "chapter_source": "hw_acceleration", - "aliases": [], - "see_also": [] - }, - { - "term": "framework decomposition", - "definition": "The systematic breakdown of neural network frameworks into hardware-mappable components, enabling efficient distribution of operations across processing elements.", - "chapter_source": "hw_acceleration", - "aliases": [], - "see_also": [] - }, - { - "term": "mapping optimization", - "definition": "The process of assigning neural network operations to hardware resources in a way that minimizes communication overhead and maximizes utilization of available compute units.", - "chapter_source": "hw_acceleration", - "aliases": [], - "see_also": [] - }, - { - "term": "dataflow challenges", - "definition": "Technical difficulties in managing data movement and dependencies in hardware accelerators, including memory bandwidth limitations and synchronization requirements.", - "chapter_source": "hw_acceleration", - "aliases": [], - "see_also": [] - } - ] -} diff --git a/book/quarto/contents/vol1/introduction/introduction_glossary.json b/book/quarto/contents/vol1/introduction/introduction_glossary.json deleted file mode 100644 index 3df44b0aaa..0000000000 --- a/book/quarto/contents/vol1/introduction/introduction_glossary.json +++ /dev/null @@ -1,352 +0,0 @@ -{ - "metadata": { - "chapter": "introduction", - "version": "1.0.1", - "generated": "2025-09-15T14:08:03.498648", - "total_terms": 40, - "standardized": true, - "last_updated": "2026-01-11T00:00:00.000000" - }, - "terms": [ - { - "term": "ai triad", - "definition": "A framework modeling ML systems as three interdependent components: data that guides behavior, algorithms that learn patterns, and computational infrastructure that enables training and inference. Limitations in any component constrain the capabilities of the others.", - "chapter_source": "introduction", - "aliases": [], - "see_also": [ - "ml systems" - ] - }, - { - "term": "alexnet", - "definition": "A breakthrough deep neural network from 2012 that won the ImageNet competition by a large margin and helped spark the deep learning revolution, proving that neural networks could outperform traditional computer vision methods when given enough data and computing power.", - "chapter_source": "introduction", - "aliases": [], - "see_also": [ - "imagenet" - ] - }, - { - "term": "alphafold", - "definition": "A landmark AI system developed by DeepMind that predicts the three-dimensional structure of proteins from their amino acid sequences, solving the decades-old protein folding problem and demonstrating how large-scale ML systems can accelerate scientific discovery.", - "chapter_source": "introduction", - "aliases": [], - "see_also": [ - "protein folding problem" - ] - }, - { - "term": "artificial intelligence", - "definition": "The systematic pursuit of understanding and replicating intelligent behavior through the development of computer systems that can perform tasks typically requiring human intelligence, such as learning, problem-solving, perception, and decision-making.", - "chapter_source": "introduction", - "aliases": [ - "AI" - ], - "see_also": [ - "machine learning" - ] - }, - { - "term": "artificial neurons", - "definition": "Basic computational units in neural networks that mimic biological neurons, taking multiple inputs, applying weights and biases, and producing an output signal through an activation function.", - "chapter_source": "introduction", - "aliases": [], - "see_also": [] - }, - { - "term": "bitter lesson", - "definition": "Richard Sutton's 2019 observation that general methods leveraging computation consistently outperform approaches encoding human expertise, suggesting that systems engineering enabling computational scale is central to AI advancement.", - "chapter_source": "introduction", - "aliases": [], - "see_also": [] - }, - { - "term": "black box", - "definition": "A system where you can observe the inputs and outputs but cannot see or understand the internal workings, particularly problematic in AI when systems make important decisions affecting people's lives without providing explanations for their reasoning.", - "chapter_source": "introduction", - "aliases": [], - "see_also": [] - }, - { - "term": "brittleness", - "definition": "The tendency of rule-based AI systems to fail completely when encountering inputs that fall outside their programmed scenarios, no matter how similar those inputs might be to what they were designed to handle.", - "chapter_source": "introduction", - "aliases": [], - "see_also": [ - "symbolic ai" - ] - }, - { - "term": "computer engineering", - "definition": "An engineering discipline that emerged in the late 1960s to address the growing complexity of integrating hardware and software systems, combining expertise from electrical engineering and computer science to design and build complex computing systems.", - "chapter_source": "introduction", - "aliases": [], - "see_also": [] - }, - { - "term": "connectionism", - "definition": "An approach to AI modeling that emphasizes learning and intelligence emerging from simple interconnected units, serving as the theoretical foundation for neural networks and contrasting with symbolic AI approaches.", - "chapter_source": "introduction", - "aliases": [], - "see_also": [ - "symbolic ai" - ] - }, - { - "term": "dartmouth conference", - "definition": "The legendary 8-week workshop at Dartmouth College in 1956 where AI was officially born, organized by John McCarthy, Marvin Minsky, Nathaniel Rochester, and Claude Shannon, where the term artificial intelligence was first coined.", - "chapter_source": "introduction", - "aliases": [], - "see_also": [] - }, - { - "term": "data-centric computing", - "definition": "Systems optimized for the efficient ingestion of data and iterative refinement of model parameters, where the programmer's job is to curate data.", - "chapter_source": "introduction" - }, - { - "term": "distribution shift", - "definition": "A change in the statistical properties of data between training and deployment, or over time during deployment. Types include covariate shift (input distribution changes), label shift (output distribution changes), and concept drift (relationship between inputs and outputs changes).", - "chapter_source": "introduction", - "aliases": [], - "see_also": [ - "silent degradation" - ] - }, - { - "term": "eliza", - "definition": "One of the first chatbots created by MIT's Joseph Weizenbaum in 1966 that could simulate human conversation through pattern matching and substitution, notable because people began forming emotional attachments to this simple program.", - "chapter_source": "introduction", - "aliases": [], - "see_also": [] - }, - { - "term": "expert systems", - "definition": "AI systems from the mid-1970s that captured human expert knowledge in specific domains, exemplified by MYCIN for diagnosing blood infections, representing a shift from general AI to domain-specific applications.", - "chapter_source": "introduction", - "aliases": [], - "see_also": [ - "mycin", - "symbolic ai" - ] - }, - { - "term": "farmbeats", - "definition": "A Microsoft Research project that applies machine learning and IoT technologies to agriculture, using edge computing to collect real-time data on soil conditions and crop health while demonstrating distributed AI systems in challenging real-world environments.", - "chapter_source": "introduction", - "aliases": [], - "see_also": [] - }, - { - "term": "five-pillar framework", - "definition": "An organizational structure for ML systems engineering comprising five interconnected disciplines: Data Engineering, Training Systems, Deployment Infrastructure, Operations and Monitoring, and Ethics and Governance.", - "chapter_source": "introduction", - "aliases": [], - "see_also": [ - "machine learning systems engineering" - ] - }, - { - "term": "generalization gap", - "definition": "The difference between a model's performance on training data and its performance on unseen real-world data. A large generalization gap indicates the model has memorized training examples rather than learning transferable patterns.", - "chapter_source": "introduction", - "aliases": [], - "see_also": [] - }, - { - "term": "imagenet", - "definition": "A massive visual database containing over 14 million labeled images across 20,000+ categories, created by Stanford's Fei-Fei Li starting in 2009, whose annual challenge became instrumental in driving breakthrough advances in computer vision.", - "chapter_source": "introduction", - "aliases": [], - "see_also": [ - "alexnet" - ] - }, - { - "term": "iron law of ml systems", - "definition": "A quantitative framework decomposing ML system performance into three terms: Data (limited by bandwidth), Compute (limited by FLOPS), and Latency (limited by overhead). Formulated as T = D_vol/BW + O/(R_peak * eta) + L_lat.", - "chapter_source": "introduction", - "aliases": [ - "iron law" - ], - "see_also": [ - "roofline analysis" - ] - }, - { - "term": "machine learning", - "definition": "The methodological approach to implementing intelligent systems through computational techniques that automatically discover patterns in data, rather than through predetermined rules or explicit programming.", - "chapter_source": "introduction", - "aliases": [ - "ML" - ], - "see_also": [ - "artificial intelligence" - ] - }, - { - "term": "machine learning systems engineering", - "definition": "The engineering discipline focused on building reliable, efficient, and scalable AI systems across computational platforms, spanning the entire AI lifecycle from data acquisition through deployment and operations with emphasis on resource-awareness and system-level optimization.", - "chapter_source": "introduction", - "aliases": [ - "ML systems engineering", - "AI engineering" - ], - "see_also": [ - "ai triad", - "five-pillar framework" - ] - }, - { - "term": "ml lifecycle", - "definition": "The comprehensive process of developing, deploying, and maintaining machine learning systems, encompassing data collection, model development, training, evaluation, deployment, monitoring, and iterative improvement with continuous feedback loops.", - "chapter_source": "introduction", - "aliases": [], - "see_also": [] - }, - { - "term": "ml systems", - "definition": "Integrated computing systems comprising three core components: data that guides algorithmic behavior, learning algorithms that extract patterns from data, and computing infrastructure that enables both training and inference processes.", - "chapter_source": "introduction", - "aliases": [ - "machine learning systems" - ], - "see_also": [ - "ai triad" - ] - }, - { - "term": "mycin", - "definition": "One of the first large-scale expert systems developed at Stanford in 1976 to diagnose blood infections, representing the shift toward capturing human expert knowledge in specific domains rather than pursuing general artificial intelligence.", - "chapter_source": "introduction", - "aliases": [], - "see_also": [ - "expert systems" - ] - }, - { - "term": "paradigm shift", - "definition": "A fundamental change in scientific approach, like the shift from symbolic reasoning to statistical learning in AI during the 1990s, and from shallow to deep learning in the 2010s, requiring researchers to abandon established methods for radically different approaches.", - "chapter_source": "introduction", - "aliases": [], - "see_also": [] - }, - { - "term": "perceptron", - "definition": "One of the first computational learning algorithms developed by Frank Rosenblatt in 1957, a system that could learn to classify patterns by making yes/no decisions based on inputs, paving the way for modern neural networks.", - "chapter_source": "introduction", - "aliases": [], - "see_also": [] - }, - { - "term": "protein folding problem", - "definition": "The scientific challenge of predicting the three-dimensional structure of proteins from their amino acid sequences, a problem that puzzled scientists for decades until systems like AlphaFold achieved breakthrough accuracy using deep learning approaches.", - "chapter_source": "introduction", - "aliases": [], - "see_also": [ - "alphafold" - ] - }, - { - "term": "sequential neural networks", - "definition": "Neural network architectures designed to process data that occurs in sequences over time, maintaining a form of memory of previous inputs to inform current decisions, essential for tasks like predicting pedestrian movement patterns.", - "chapter_source": "introduction", - "aliases": [], - "see_also": [] - }, - { - "term": "shallow learning", - "definition": "Machine learning approaches that use algorithms with limited complexity, such as support vector machines and decision trees, which require carefully engineered features but cannot automatically discover hierarchical representations like deep learning methods.", - "chapter_source": "introduction", - "aliases": [], - "see_also": [ - "statistical learning" - ] - }, - { - "term": "silent degradation", - "definition": "The gradual decline in ML system performance that occurs without triggering errors, exceptions, or alerts. Unlike traditional software that crashes observably, ML systems can continue operating while producing increasingly inaccurate predictions.", - "chapter_source": "introduction", - "aliases": [], - "see_also": [ - "distribution shift" - ] - }, - { - "term": "statistical learning", - "definition": "The era of machine learning that emerged in the 1990s, shifting focus from rule-based symbolic AI to algorithms that could learn patterns from data, laying the groundwork for modern data-driven approaches to artificial intelligence.", - "chapter_source": "introduction", - "aliases": [], - "see_also": [ - "shallow learning" - ] - }, - { - "term": "student system", - "definition": "One of the first AI programs from 1964 by Daniel Bobrow that demonstrated natural language understanding by converting English algebra word problems into mathematical equations, marking an important milestone in symbolic AI.", - "chapter_source": "introduction", - "aliases": [ - "STUDENT" - ], - "see_also": [ - "symbolic ai" - ] - }, - { - "term": "symbolic ai", - "definition": "An approach to artificial intelligence that uses high-level symbolic representations of problems, logic, and search algorithms, dominant before the deep learning revolution and characterized by expert systems and rule-based reasoning.", - "chapter_source": "introduction", - "aliases": [], - "see_also": [ - "expert systems", - "connectionism" - ] - }, - { - "term": "systems thinking", - "definition": "An approach to understanding complex systems by considering how individual components interact and affect the whole system, particularly important in ML where data, algorithms, hardware, and deployment environments must work together effectively.", - "chapter_source": "introduction", - "aliases": [], - "see_also": [ - "ai triad" - ] - }, - { - "term": "training-serving skew", - "definition": "A mismatch between how features or data are computed during model training versus serving in production, causing model performance to degrade despite unchanged code. Common causes include different preprocessing pipelines, feature computation timing, or data sources between training and inference.", - "chapter_source": "introduction", - "aliases": [], - "see_also": [ - "silent degradation" - ] - }, - { - "term": "transfer learning", - "definition": "The technique of reusing a model trained on one task as the starting point for learning a related task, dramatically reducing the data and computation required for the new task.", - "chapter_source": "introduction", - "aliases": [], - "see_also": [] - }, - { - "term": "tv white spaces", - "definition": "Unused broadcasting frequencies that can be repurposed for internet connectivity, as employed by systems like FarmBeats to extend network access to remote agricultural sensors and IoT devices.", - "chapter_source": "introduction", - "aliases": [], - "see_also": [ - "farmbeats" - ] - }, - { - "term": "unreasonable effectiveness of data", - "definition": "The empirical observation that for many problems, adding more data is more effective than improving algorithms, driving the data-centric AI paradigm.", - "chapter_source": "introduction" - }, - { - "term": "waymo", - "definition": "A subsidiary of Alphabet Inc. that represents a leading deployment of machine learning systems in autonomous vehicle technology, demonstrating how ML systems can span from embedded systems to cloud infrastructure in safety-critical environments.", - "chapter_source": "introduction", - "aliases": [], - "see_also": [] - } - ] -} \ No newline at end of file diff --git a/book/quarto/contents/vol1/ml_ops/ml_ops_glossary.json b/book/quarto/contents/vol1/ml_ops/ml_ops_glossary.json deleted file mode 100644 index f1c6571dd2..0000000000 --- a/book/quarto/contents/vol1/ml_ops/ml_ops_glossary.json +++ /dev/null @@ -1,285 +0,0 @@ -{ - "metadata": { - "chapter": "ml_ops", - "version": "1.0.0", - "generated": "2025-09-15T14:08:03.500340", - "total_terms": 39, - "standardized": true, - "last_updated": "2025-09-15T15:01:37.289052" - }, - "terms": [ - { - "term": "alerting", - "definition": "Automated notification systems that inform teams when metrics exceed predefined thresholds or anomalies are detected in production ML systems.", - "chapter_source": "ml_ops", - "aliases": [], - "see_also": [] - }, - { - "term": "autoscaling", - "definition": "Dynamic adjustment of compute resources based on workload demand, automatically scaling up during peak usage and scaling down during low usage to optimize costs and performance.", - "chapter_source": "ml_ops", - "aliases": [], - "see_also": [] - }, - { - "term": "batch inference", - "definition": "Processing large volumes of data predictions asynchronously in scheduled batches rather than real-time, suitable for non-interactive applications like reporting or analytics.", - "chapter_source": "ml_ops", - "aliases": [], - "see_also": [] - }, - { - "term": "canary deployment", - "definition": "Gradual rollout strategy where a new model version serves a small percentage of traffic while monitoring performance before full deployment, allowing safe validation in production.", - "chapter_source": "ml_ops", - "aliases": [], - "see_also": [] - }, - { - "term": "ci/cd pipelines", - "definition": "Continuous Integration and Continuous Delivery automated workflows that streamline model development by integrating testing, validation, and deployment processes.", - "chapter_source": "ml_ops", - "aliases": [], - "see_also": [] - }, - { - "term": "concept drift", - "definition": "Performance degradation that occurs when the underlying relationship between input features and target outcomes changes over time, requiring model retraining.", - "chapter_source": "ml_ops", - "aliases": [], - "see_also": [] - }, - { - "term": "containerization", - "definition": "Packaging applications and their dependencies into portable, isolated containers using tools like Docker to ensure consistent execution across different environments.", - "chapter_source": "ml_ops", - "aliases": [], - "see_also": [] - }, - { - "term": "data drift", - "definition": "Changes in the statistical distribution of input data over time that can degrade model performance, requiring monitoring and potential model updates.", - "chapter_source": "ml_ops", - "aliases": [], - "see_also": [] - }, - { - "term": "data lineage", - "definition": "Complete traceable record of data flow from source to consumption, including transformations and dependencies, essential for reproducibility and debugging.", - "chapter_source": "ml_ops", - "aliases": [], - "see_also": [] - }, - { - "term": "data versioning", - "definition": "Systematic tracking and management of dataset versions over time, enabling reproducibility and rollback capabilities for machine learning experiments.", - "chapter_source": "ml_ops", - "aliases": [], - "see_also": [] - }, - { - "term": "devops", - "definition": "Software development practice that combines development and operations teams to shorten development cycles and deliver high-quality software through automation and collaboration.", - "chapter_source": "ml_ops", - "aliases": [], - "see_also": [] - }, - { - "term": "experiment tracking", - "definition": "Systematic logging and management of machine learning experiments, including hyperparameters, metrics, and artifacts, to enable reproducibility and comparison.", - "chapter_source": "ml_ops", - "aliases": [], - "see_also": [] - }, - { - "term": "feature store", - "definition": "Centralized repository for storing and serving engineered features consistently across training and inference workflows, preventing training-serving skew.", - "chapter_source": "ml_ops", - "aliases": [], - "see_also": [] - }, - { - "term": "horizontal scaling", - "definition": "Increasing system capacity by adding more machines or instances rather than upgrading existing hardware, providing better fault tolerance and load distribution.", - "chapter_source": "ml_ops", - "aliases": [], - "see_also": [] - }, - { - "term": "infrastructure as code", - "definition": "Practice of managing and provisioning computing infrastructure through machine-readable configuration files rather than manual processes, enabling version control and automation.", - "chapter_source": "ml_ops", - "aliases": [], - "see_also": [] - }, - { - "term": "load balancing", - "definition": "Distribution of incoming requests across multiple server instances to prevent bottlenecks, improve response times, and ensure high availability.", - "chapter_source": "ml_ops", - "aliases": [], - "see_also": [] - }, - { - "term": "mlops", - "definition": "Engineering discipline that manages the end-to-end lifecycle of machine learning systems, combining ML development with operational practices for reliable production deployment.", - "chapter_source": "ml_ops", - "aliases": [], - "see_also": [] - }, - { - "term": "model compression", - "definition": "Techniques such as quantization, pruning, and distillation used to reduce model size and computational requirements while maintaining acceptable performance.", - "chapter_source": "ml_ops", - "aliases": [], - "see_also": [] - }, - { - "term": "model deployment", - "definition": "Process of integrating trained machine learning models into production environments where they can serve predictions to end users or applications.", - "chapter_source": "ml_ops", - "aliases": [], - "see_also": [] - }, - { - "term": "model drift", - "definition": "Gradual decline in model performance over time due to changes in data patterns, requiring continuous monitoring and periodic retraining.", - "chapter_source": "ml_ops", - "aliases": [], - "see_also": [] - }, - { - "term": "model registry", - "definition": "Centralized repository for storing, versioning, and managing trained machine learning models with associated metadata, facilitating model governance and deployment.", - "chapter_source": "ml_ops", - "aliases": [], - "see_also": [] - }, - { - "term": "model serving", - "definition": "Infrastructure and systems that expose deployed machine learning models through APIs to handle prediction requests at scale with appropriate latency and throughput.", - "chapter_source": "ml_ops", - "aliases": [], - "see_also": [] - }, - { - "term": "model validation", - "definition": "Systematic evaluation process to ensure models meet performance, robustness, and reliability criteria before production deployment.", - "chapter_source": "ml_ops", - "aliases": [], - "see_also": [] - }, - { - "term": "model versioning", - "definition": "Practice of systematically tracking different iterations of machine learning models with associated metadata to enable rollbacks and comparisons.", - "chapter_source": "ml_ops", - "aliases": [], - "see_also": [] - }, - { - "term": "observability", - "definition": "Comprehensive monitoring approach that provides insight into system behavior through metrics, logs, and traces, enabling understanding of internal states from external outputs.", - "chapter_source": "ml_ops", - "aliases": [], - "see_also": [] - }, - { - "term": "online inference", - "definition": "Real-time prediction serving that processes individual requests with low latency, suitable for interactive applications requiring immediate responses.", - "chapter_source": "ml_ops", - "aliases": [], - "see_also": [] - }, - { - "term": "orchestration", - "definition": "Coordination and management of complex workflows and distributed computing tasks, often using platforms like Kubernetes for container management.", - "chapter_source": "ml_ops", - "aliases": [], - "see_also": [] - }, - { - "term": "rollback", - "definition": "Process of reverting to a previous stable version of a model or system when issues are detected in production, ensuring service continuity.", - "chapter_source": "ml_ops", - "aliases": [], - "see_also": [] - }, - { - "term": "serverless", - "definition": "Cloud computing model where infrastructure is automatically managed by the provider, allowing code execution without server management concerns.", - "chapter_source": "ml_ops", - "aliases": [], - "see_also": [] - }, - { - "term": "service level agreement (sla)", - "definition": "Formal contract specifying minimum performance standards and uptime guarantees for production services, with penalties for non-compliance.", - "chapter_source": "ml_ops", - "aliases": [], - "see_also": [] - }, - { - "term": "service level objective (slo)", - "definition": "Internal targets for service reliability and performance metrics such as latency, error rates, and availability that guide operational decisions.", - "chapter_source": "ml_ops", - "aliases": [], - "see_also": [] - }, - { - "term": "shadow deployment", - "definition": "Testing strategy where new model versions process live traffic in parallel with production models without affecting user-facing results, enabling safe validation.", - "chapter_source": "ml_ops", - "aliases": [], - "see_also": [] - }, - { - "term": "technical debt", - "definition": "Long-term maintenance cost accumulated from expedient design decisions during development, particularly problematic in ML systems due to data dependencies and model complexity.", - "chapter_source": "ml_ops", - "aliases": [], - "see_also": [] - }, - { - "term": "telemetry", - "definition": "Automated collection and transmission of performance data and metrics from distributed systems, enabling remote monitoring and analysis.", - "chapter_source": "ml_ops", - "aliases": [], - "see_also": [] - }, - { - "term": "training-serving skew", - "definition": "Inconsistency between feature preprocessing logic used during model training versus serving, leading to degraded production performance.", - "chapter_source": "ml_ops", - "aliases": [], - "see_also": [] - }, - { - "term": "a/b testing", - "definition": "Controlled experimentation method for comparing model performance by randomly assigning users to different model versions and measuring statistical differences in outcomes.", - "chapter_source": "ml_ops", - "aliases": [], - "see_also": [] - }, - { - "term": "pipeline jungle", - "definition": "Anti-pattern where complex, interdependent data processing pipelines become difficult to maintain, debug, and modify, leading to technical debt and operational complexity.", - "chapter_source": "ml_ops", - "aliases": [], - "see_also": [] - }, - { - "term": "programmatic logic controllers", - "definition": "Industrial control systems used in manufacturing and IoT environments that can be integrated with ML models for automated decision-making in operational technology contexts.", - "chapter_source": "ml_ops", - "aliases": [], - "see_also": [] - }, - { - "term": "containerized microservices", - "definition": "Architectural pattern using lightweight containers to package individual services, enabling scalable, maintainable deployment of ML systems across distributed environments.", - "chapter_source": "ml_ops", - "aliases": [], - "see_also": [] - } - ] -} diff --git a/book/quarto/contents/vol1/ml_systems/ml_systems.qmd b/book/quarto/contents/vol1/ml_systems/ml_systems.qmd index ebc2d6ff4c..ed343e43e7 100644 --- a/book/quarto/contents/vol1/ml_systems/ml_systems.qmd +++ b/book/quarto/contents/vol1/ml_systems/ml_systems.qmd @@ -1,7 +1,6 @@ --- quiz: ml_systems_quizzes.json concepts: ml_systems_concepts.yml -glossary: ml_systems_glossary.json engine: jupyter --- @@ -1468,12 +1467,12 @@ class DeploymentThresholdsLocal: tiny_latency_range_str = tiny_latency ``` -| **Paradigm** | **Compute** | **Memory BW** | **Power** | **Latency** | -|:--------------|:------------------------------------------------------------------:|:----------------------------------------------------------:|:--------------------------------------------------------------------------------:|:-----------------------------------------------------:| -| **Cloud ML** | >`{python} DeploymentThresholdsLocal.cloud_thresh_tflops_str` TFLOPS | >`{python} DeploymentThresholdsLocal.cloud_thresh_bw_str` GB/s | MW class (PUE 1.1–1.3) | `{python} DeploymentThresholdsLocal.cloud_latency_range_str` ms | -| **Edge ML** | ~`{python} DeploymentThresholdsLocal.edge_thresh_pflops_str` PFLOPS AI | >`{python} DeploymentThresholdsLocal.edge_thresh_bw_str` GB/s | 100 W class | `{python} DeploymentThresholdsLocal.edge_latency_range_str` ms | -| **Mobile ML** | `{python} DeploymentThresholdsLocal.mobile_npu_range_str` TOPS | `{python} DeploymentThresholdsLocal.mobile_bw_range_str` GB/s | `{python} DeploymentThresholdsLocal.mobile_tdp_range_str` W | `{python} DeploymentThresholdsLocal.mobile_latency_range_str` ms | -| **TinyML** | <`{python} DeploymentThresholdsLocal.tiny_thresh_tops_str` TOPS | — | <`{python} DeploymentThresholdsLocal.tiny_thresh_mw_str` mW always-on average target | `{python} DeploymentThresholdsLocal.tiny_latency_range_str` ms | +| **Paradigm** | **Compute** | **Memory BW** | **Power** | **Latency** | +|:--------------|:----------------------------------------------------------------------:|:--------------------------------------------------------------:|:------------------------------------------------------------------------------------:|:----------------------------------------------------------------:| +| **Cloud ML** | >`{python} DeploymentThresholdsLocal.cloud_thresh_tflops_str` TFLOPS | >`{python} DeploymentThresholdsLocal.cloud_thresh_bw_str` GB/s | MW class (PUE 1.1–1.3) | `{python} DeploymentThresholdsLocal.cloud_latency_range_str` ms | +| **Edge ML** | ~`{python} DeploymentThresholdsLocal.edge_thresh_pflops_str` PFLOPS AI | >`{python} DeploymentThresholdsLocal.edge_thresh_bw_str` GB/s | 100 W class | `{python} DeploymentThresholdsLocal.edge_latency_range_str` ms | +| **Mobile ML** | `{python} DeploymentThresholdsLocal.mobile_npu_range_str` TOPS | `{python} DeploymentThresholdsLocal.mobile_bw_range_str` GB/s | `{python} DeploymentThresholdsLocal.mobile_tdp_range_str` W | `{python} DeploymentThresholdsLocal.mobile_latency_range_str` ms | +| **TinyML** | <`{python} DeploymentThresholdsLocal.tiny_thresh_tops_str` TOPS | — | <`{python} DeploymentThresholdsLocal.tiny_thresh_mw_str` mW always-on average target | `{python} DeploymentThresholdsLocal.tiny_latency_range_str` ms | : **Deployment Decision Thresholds**: Quantitative thresholds that practitioners use to determine deployment feasibility for each paradigm in @tbl-representative-systems. These numbers answer the practical question "can my workload run here?" by specifying the compute, memory bandwidth, and power envelope that each paradigm provides. {#tbl-deployment-thresholds tbl-colwidths="[12,18,18,32,18]"} @@ -1865,13 +1864,13 @@ class CloudEdgeTCO: ::: {tbl-colwidths="[33,37,30]"} -| **Cost Component** | **Calculation** | **Annual Cost** | -|:-------------------------|:-------------------------------------------------------------------------------------------------------------------------|----------------------------------------:| +| **Cost Component** | **Calculation** | **Annual Cost** | +|:-------------------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------:| | **GPU inference (A10G)** | `{python} CloudEdgeTCO.gpu_instances_str` instances $\times$ `{python} CloudEdgeTCO.hours_per_year_str` hrs $\times$ `{python} CloudEdgeTCO.gpu_price_str`/hr | `{python} CloudEdgeTCO.c_gpu_str` | -| **Network egress** | `{python} CloudEdgeTCO.egress_gb_str` GB/day $\times$ `{python} CloudEdgeTCO.days_per_year_str` $\times$ `{python} CloudEdgeTCO.egress_price_str` | `{python} CloudEdgeTCO.c_egress_str` | -| **Load balancer** | USD 0.025/hr + LCU charges | `{python} CloudEdgeTCO.c_lb_str` | -| **CloudWatch/logging** | Monitoring, alerts | `{python} CloudEdgeTCO.c_logs_str` | -| **Total Cloud** | | **`{python} CloudEdgeTCO.c_total_str`** | +| **Network egress** | `{python} CloudEdgeTCO.egress_gb_str` GB/day $\times$ `{python} CloudEdgeTCO.days_per_year_str` $\times$ `{python} CloudEdgeTCO.egress_price_str` | `{python} CloudEdgeTCO.c_egress_str` | +| **Load balancer** | USD 0.025/hr + LCU charges | `{python} CloudEdgeTCO.c_lb_str` | +| **CloudWatch/logging** | Monitoring, alerts | `{python} CloudEdgeTCO.c_logs_str` | +| **Total Cloud** | | **`{python} CloudEdgeTCO.c_total_str`** | : **Cloud Inference Annual TCO**: Itemized GPU, network, load-balancer, and observability costs for the cloud implementation of the ResNet-50-scale vision workload, with the totals used in the break-even comparison. {#tbl-ml-systems-cloud-tco} @@ -1881,14 +1880,14 @@ class CloudEdgeTCO: ::: {tbl-colwidths="[33,37,30]"} -| **Cost Component** | **Calculation** | **Annual Cost** | -|:---------------------|:----------------------------------------------------------------------------------------------------------|----------------------------------------:| -| **Hardware CAPEX** | `{python} CloudEdgeTCO.server_cost_str` server ÷ `{python} CloudEdgeTCO.server_life_str`-year life | `{python} CloudEdgeTCO.e_capex_str` | +| **Cost Component** | **Calculation** | **Annual Cost** | +|:---------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------:| +| **Hardware CAPEX** | `{python} CloudEdgeTCO.server_cost_str` server ÷ `{python} CloudEdgeTCO.server_life_str`-year life | `{python} CloudEdgeTCO.e_capex_str` | | **Power (24/7)** | `{python} CloudEdgeTCO.power_str` $\times$ `{python} CloudEdgeTCO.hours_per_year_str` hrs $\times$ `{python} CloudEdgeTCO.electricity_str`/kWh | `{python} CloudEdgeTCO.e_power_str` | -| **Cooling overhead** | ~30 percent of power | `{python} CloudEdgeTCO.e_cool_str` | -| **Network (fiber)** | Fixed line for remote management | `{python} CloudEdgeTCO.e_net_str` | -| **DevOps labor** | `{python} CloudEdgeTCO.devops_fte_str` FTE $\times$ `{python} CloudEdgeTCO.devops_salary_str` salary | `{python} CloudEdgeTCO.e_labor_str` | -| **Total Edge** | | **`{python} CloudEdgeTCO.e_total_str`** | +| **Cooling overhead** | ~30 percent of power | `{python} CloudEdgeTCO.e_cool_str` | +| **Network (fiber)** | Fixed line for remote management | `{python} CloudEdgeTCO.e_net_str` | +| **DevOps labor** | `{python} CloudEdgeTCO.devops_fte_str` FTE $\times$ `{python} CloudEdgeTCO.devops_salary_str` salary | `{python} CloudEdgeTCO.e_labor_str` | +| **Total Edge** | | **`{python} CloudEdgeTCO.e_total_str`** | : **Edge Inference Annual TCO**: Itemized hardware, power, cooling, network, and DevOps labor costs for the on-premise T4 implementation, exposing labor as the dominant component that determines edge break-even economics. {#tbl-ml-systems-edge-tco} diff --git a/book/quarto/contents/vol1/ml_systems/ml_systems_glossary.json b/book/quarto/contents/vol1/ml_systems/ml_systems_glossary.json deleted file mode 100644 index a33b460cd6..0000000000 --- a/book/quarto/contents/vol1/ml_systems/ml_systems_glossary.json +++ /dev/null @@ -1,265 +0,0 @@ -{ - "metadata": { - "chapter": "ml_systems", - "version": "1.0.0", - "generated": "2025-09-15T14:08:03.499150", - "total_terms": 35, - "standardized": true, - "last_updated": "2025-09-15T15:01:37.288351" - }, - "terms": [ - { - "term": "artificial intelligence", - "definition": "The simulation of human intelligence processes by machines, particularly computer systems, encompassing learning, reasoning, and self-correction capabilities.", - "chapter_source": "ml_systems", - "aliases": [], - "see_also": [] - }, - { - "term": "batch inference", - "definition": "The process of using a trained machine learning model to make predictions or decisions on new, previously unseen data.", - "chapter_source": "ml_systems", - "aliases": [], - "see_also": [] - }, - { - "term": "collaborative filtering", - "definition": "A technique used in recommendation systems that predicts user preferences by identifying patterns in interactions from many users, leveraging the collective behavior of the crowd rather than just item properties.", - "chapter_source": "ml_systems", - "aliases": [], - "see_also": [] - }, - { - "term": "data center", - "definition": "A facility that houses computer systems and associated components such as telecommunications and storage systems, typically containing thousands of servers for cloud computing operations.", - "chapter_source": "ml_systems", - "aliases": [], - "see_also": [] - }, - { - "term": "dennard scaling", - "definition": "The observation that as transistors became smaller, their power density remained constant, enabling higher performance at the same power envelope. Its breakdown around 2005 ended the era of free frequency scaling.", - "chapter_source": "ml_systems", - "aliases": [], - "see_also": [ - "power wall" - ] - }, - { - "term": "deployment paradigm", - "definition": "A distinct approach to hosting and executing ML models characterized by specific resource constraints and operational properties, such as Cloud ML, Edge ML, Mobile ML, or TinyML.", - "chapter_source": "ml_systems", - "aliases": [], - "see_also": [] - }, - { - "term": "distributed intelligence", - "definition": "The placement of computational capabilities across multiple devices and locations rather than relying on a single centralized system, enabling local processing and decision-making.", - "chapter_source": "ml_systems", - "aliases": [], - "see_also": [] - }, - { - "term": "edge computing", - "definition": "A distributed computing paradigm that brings computation and data storage closer to the sources of data, reducing latency and bandwidth usage.", - "chapter_source": "ml_systems", - "aliases": [], - "see_also": [] - }, - { - "term": "embedded systems", - "definition": "Computer systems with dedicated functions within larger mechanical or electrical systems, typically designed for specific tasks with real-time computing constraints.", - "chapter_source": "ml_systems", - "aliases": [], - "see_also": [] - }, - { - "term": "energy bandwidth", - "definition": "The constraint in battery-powered systems where the energy cost of transmitting data exceeds the energy cost of processing it locally, dictating edge processing.", - "chapter_source": "ml_systems" - }, - { - "term": "federated learning", - "definition": "A machine learning approach that trains algorithms across decentralized edge devices or servers holding local data samples, without exchanging the raw data.", - "chapter_source": "ml_systems", - "aliases": [], - "see_also": [] - }, - { - "term": "foundation model", - "definition": "Large-scale machine learning models trained on broad data that can be adapted to a wide range of downstream tasks, serving as a base for specialized applications.", - "chapter_source": "ml_systems", - "aliases": [], - "see_also": [] - }, - { - "term": "gpu", - "definition": "Graphics Processing Unit, a specialized electronic circuit designed to rapidly manipulate and alter memory to accelerate the creation of images and parallel processing tasks.", - "chapter_source": "ml_systems", - "aliases": [], - "see_also": [] - }, - { - "term": "hierarchical processing", - "definition": "A multi-tier system architecture where data and intelligence flow between different levels of the computing stack, from sensors to edge devices to cloud systems.", - "chapter_source": "ml_systems", - "aliases": [], - "see_also": [] - }, - { - "term": "hybrid machine learning", - "definition": "The integration of multiple ML paradigms such as cloud, edge, mobile, and tiny ML to form unified distributed systems that leverage complementary strengths.", - "chapter_source": "ml_systems", - "aliases": [], - "see_also": [] - }, - { - "term": "hyperscale data center", - "definition": "Large-scale data center facilities containing thousands of servers and covering extensive floor space, designed to efficiently support massive computing workloads.", - "chapter_source": "ml_systems", - "aliases": [], - "see_also": [] - }, - { - "term": "internet of things", - "definition": "A network of physical objects embedded with sensors, software, and other technologies that connect and exchange data with other devices and systems over the internet.", - "chapter_source": "ml_systems", - "aliases": [], - "see_also": [] - }, - { - "term": "latency", - "definition": "The time delay between a request for data and the delivery of that data, critical in real-time applications where immediate responses are required.", - "chapter_source": "ml_systems", - "aliases": [], - "see_also": [] - }, - { - "term": "machine learning", - "definition": "The methodological approach to implementing intelligent systems through computational techniques that automatically discover patterns in data, rather than through predetermined rules or explicit programming.", - "chapter_source": "ml_systems", - "aliases": [ - "ML" - ], - "see_also": [ - "artificial intelligence" - ] - }, - { - "term": "memory wall", - "definition": "The widening performance gap between processor speed and memory bandwidth, where computational capacity outpaces the rate at which data can be delivered to the processor, becoming a primary bottleneck for large ML models.", - "chapter_source": "ml_systems", - "aliases": [], - "see_also": [] - }, - { - "term": "microcontroller", - "definition": "A small computer on a single integrated circuit containing a processor core, memory, and programmable input/output peripherals, commonly used in embedded systems.", - "chapter_source": "ml_systems", - "aliases": [], - "see_also": [] - }, - { - "term": "mobile machine learning", - "definition": "The execution of machine learning models directly on portable, battery-powered devices like smartphones and tablets, enabling personalized and responsive applications.", - "chapter_source": "ml_systems", - "aliases": [], - "see_also": [] - }, - { - "term": "model compression", - "definition": "Techniques used to reduce the size and computational requirements of machine learning models while preserving accuracy, enabling deployment on resource-constrained devices.", - "chapter_source": "ml_systems", - "aliases": [], - "see_also": [] - }, - { - "term": "model quantization", - "definition": "The process of reducing the precision of numerical representations in machine learning models, typically from 32-bit to 8-bit integers, to decrease model size and increase inference speed.", - "chapter_source": "ml_systems", - "aliases": [], - "see_also": [] - }, - { - "term": "neural processing unit (npu)", - "definition": "Specialized processors designed specifically for accelerating neural network operations and machine learning computations, optimized for parallel processing of AI workloads.", - "chapter_source": "ml_systems", - "aliases": [], - "see_also": [] - }, - { - "term": "power wall", - "definition": "The technological barrier reached around 2005 where increasing processor frequency no longer yielded performance gains without unsustainable increases in power density and heat generation, forcing a shift to parallel and specialized architectures.", - "chapter_source": "ml_systems", - "aliases": [], - "see_also": [ - "dennard scaling" - ] - }, - { - "term": "real-time processing", - "definition": "The processing of data as it becomes available, with guaranteed response times that meet strict timing constraints for immediate decision-making.", - "chapter_source": "ml_systems", - "aliases": [], - "see_also": [] - }, - { - "term": "speed of light (latency)", - "definition": "The physical speed limit of information transmission (approx. 200,000 km/s in fiber), creating an irreducible lower bound on network latency that necessitates edge computing for applications requiring sub-10ms response times over long distances.", - "chapter_source": "ml_systems", - "aliases": [], - "see_also": [ - "latency" - ] - }, - { - "term": "system entropy", - "definition": "The tendency of ML systems to degrade over time as the world changes (drift) or as hidden dependencies accumulate (technical debt), requiring active energy (ops) to maintain order.", - "chapter_source": "ml_systems" - }, - { - "term": "system on chip", - "definition": "An integrated circuit that incorporates most or all components of a computer or electronic system, including CPU, GPU, memory, and specialized processors on a single chip.", - "chapter_source": "ml_systems", - "aliases": [], - "see_also": [] - }, - { - "term": "tensor processing unit (tpu)", - "definition": "Google's custom application-specific integrated circuit designed specifically for neural network machine learning, optimized for TensorFlow operations.", - "chapter_source": "ml_systems", - "aliases": [], - "see_also": [] - }, - { - "term": "thermal throttling", - "definition": "A protective mechanism in mobile and embedded devices that reduces processor clock speed and performance to prevent overheating, often limiting the sustained performance of on-device ML inference.", - "chapter_source": "ml_systems", - "aliases": [], - "see_also": [] - }, - { - "term": "tiny machine learning", - "definition": "The execution of machine learning models on ultra-constrained devices such as microcontrollers and sensors, operating in the milliwatt to sub-watt power range.", - "chapter_source": "ml_systems", - "aliases": [], - "see_also": [] - }, - { - "term": "train-serve split", - "definition": "A hybrid architecture pattern where computationally intensive model training occurs on powerful cloud infrastructure, while the trained model is optimized and deployed for inference on resource-constrained edge or mobile devices.", - "chapter_source": "ml_systems", - "aliases": [], - "see_also": [ - "hybrid machine learning" - ] - }, - { - "term": "training", - "definition": "The process of teaching a machine learning algorithm to make accurate predictions by feeding it large amounts of labeled data and allowing it to learn patterns.", - "chapter_source": "ml_systems", - "aliases": [], - "see_also": [] - } - ] -} \ No newline at end of file diff --git a/book/quarto/contents/vol1/ml_workflow/ml_workflow_glossary.json b/book/quarto/contents/vol1/ml_workflow/ml_workflow_glossary.json deleted file mode 100644 index d82ae76d5c..0000000000 --- a/book/quarto/contents/vol1/ml_workflow/ml_workflow_glossary.json +++ /dev/null @@ -1,313 +0,0 @@ -{ - "metadata": { - "chapter": "ml_workflow", - "version": "1.0.1", - "generated": "2025-09-15T14:08:03.504254", - "total_terms": 43, - "standardized": true, - "last_updated": "2026-01-11T00:00:00.000000" - }, - "terms": [ - { - "term": "a/b testing", - "definition": "A controlled experimental method for comparing two versions of a system or model by randomly dividing users into groups and measuring performance differences between the variants.", - "chapter_source": "ml_workflow", - "aliases": [], - "see_also": [] - }, - { - "term": "calibration", - "definition": "The property of a model where predicted probabilities match observed frequencies; a calibrated model predicting 80% confidence should be correct approximately 80% of the time.", - "chapter_source": "ml_workflow", - "aliases": ["model calibration"], - "see_also": ["model evaluation"] - }, - { - "term": "canary deployment", - "definition": "A deployment strategy where new model versions receive a small percentage of production traffic to validate behavior before full rollout, enabling early detection of issues with minimal user impact.", - "chapter_source": "ml_workflow", - "aliases": [], - "see_also": ["shadow deployment", "model deployment"] - }, - { - "term": "concept drift", - "definition": "The phenomenon where the statistical relationship between input features and target outputs changes over time, distinct from data drift where only input distributions change, causing model performance to degrade.", - "chapter_source": "ml_workflow", - "aliases": [], - "see_also": ["data drift", "model drift"] - }, - { - "term": "continuous integration", - "definition": "A software development practice where code changes are automatically integrated, tested, and validated multiple times per day to detect issues early in the development cycle.", - "chapter_source": "ml_workflow", - "aliases": [], - "see_also": [] - }, - { - "term": "crisp-dm", - "definition": "Cross-Industry Standard Process for Data Mining, a structured methodology developed in 1996 that defines six phases for data projects: business understanding, data understanding, data preparation, modeling, evaluation, and deployment.", - "chapter_source": "ml_workflow", - "aliases": [], - "see_also": [] - }, - { - "term": "data curation", - "definition": "The process of selecting, organizing, and maintaining high-quality datasets by removing irrelevant information, correcting errors, and ensuring data meets specific standards for machine learning applications.", - "chapter_source": "ml_workflow", - "aliases": [], - "see_also": [] - }, - { - "term": "data drift", - "definition": "The phenomenon where the statistical properties of input data change over time, causing machine learning model performance to degrade even when the underlying code remains unchanged.", - "chapter_source": "ml_workflow", - "aliases": [], - "see_also": ["concept drift", "model drift"] - }, - { - "term": "data ingestion", - "definition": "The process of collecting and importing raw data from various sources into a system where it can be stored, processed, and prepared for machine learning applications.", - "chapter_source": "ml_workflow", - "aliases": [], - "see_also": [] - }, - { - "term": "data validation", - "definition": "The systematic verification that collected data meets quality standards, is properly formatted, and contains accurate information suitable for machine learning model training and evaluation.", - "chapter_source": "ml_workflow", - "aliases": [], - "see_also": [] - }, - { - "term": "data versioning", - "definition": "The practice of tracking and managing different versions of datasets over time, similar to code versioning, to ensure reproducibility and enable rollback to previous data states when needed.", - "chapter_source": "ml_workflow", - "aliases": [], - "see_also": [] - }, - { - "term": "deployment constraints", - "definition": "Operational limitations such as hardware resources, network connectivity, regulatory requirements, and integration requirements that influence how machine learning models are implemented in production environments.", - "chapter_source": "ml_workflow", - "aliases": [], - "see_also": [] - }, - { - "term": "diabetic retinopathy", - "definition": "A diabetes complication that damages blood vessels in the retina, serving as a leading cause of preventable blindness and a key application area for medical AI screening systems.", - "chapter_source": "ml_workflow", - "aliases": [], - "see_also": [] - }, - { - "term": "edge deployment", - "definition": "A deployment strategy where machine learning models run locally on devices at the network edge rather than in centralized cloud servers, reducing latency and enabling operation without constant internet connectivity.", - "chapter_source": "ml_workflow", - "aliases": [], - "see_also": [] - }, - { - "term": "emergent behaviors", - "definition": "Unexpected system-wide patterns or characteristics that arise from the interaction of individual components, often becoming apparent only when systems operate at scale or in real-world conditions.", - "chapter_source": "ml_workflow", - "aliases": [], - "see_also": [] - }, - { - "term": "experiment tracking", - "definition": "The systematic recording and management of machine learning experiments, including hyperparameters, model versions, training data, and performance metrics, to enable comparison and reproducibility.", - "chapter_source": "ml_workflow", - "aliases": [], - "see_also": [] - }, - { - "term": "federated learning", - "definition": "A machine learning approach where models are trained across multiple decentralized devices or servers without centralizing the raw training data, preserving privacy while enabling collaborative learning.", - "chapter_source": "ml_workflow", - "aliases": [], - "see_also": [] - }, - { - "term": "feedback loops", - "definition": "Cyclical processes where outputs from later stages of the machine learning lifecycle inform and influence decisions in earlier stages, enabling continuous system improvement and adaptation.", - "chapter_source": "ml_workflow", - "aliases": [], - "see_also": [] - }, - { - "term": "hyperparameters", - "definition": "Configuration settings that control the learning process of machine learning algorithms but are not learned from data, such as learning rate, batch size, and network architecture parameters.", - "chapter_source": "ml_workflow", - "aliases": [], - "see_also": [] - }, - { - "term": "key performance indicators", - "definition": "Specific, measurable metrics used to evaluate the success and effectiveness of machine learning systems, such as accuracy, precision, recall, latency, and throughput.", - "chapter_source": "ml_workflow", - "aliases": [], - "see_also": [] - }, - { - "term": "lifecycle coherence", - "definition": "The principle that all stages of ML development should align with overall system objectives, maintaining consistency in data handling, model architecture, and evaluation criteria.", - "chapter_source": "ml_workflow", - "aliases": [], - "see_also": [] - }, - { - "term": "machine learning lifecycle", - "definition": "A structured, iterative process that encompasses all stages involved in developing, deploying, and maintaining machine learning systems, from problem definition through ongoing monitoring and improvement.", - "chapter_source": "ml_workflow", - "aliases": [], - "see_also": [] - }, - { - "term": "machine learning operations", - "definition": "The practice and set of tools focused on operationalizing machine learning models through automation, monitoring, and management of the entire ML pipeline from development to production.", - "chapter_source": "ml_workflow", - "aliases": [], - "see_also": [] - }, - { - "term": "model deployment", - "definition": "The process of integrating trained machine learning models into production systems where they can make predictions on new data and provide value to end users.", - "chapter_source": "ml_workflow", - "aliases": [], - "see_also": ["canary deployment", "shadow deployment"] - }, - { - "term": "model drift", - "definition": "The degradation of machine learning model performance over time due to changes in data patterns, user behavior, or environmental conditions that differ from the original training conditions.", - "chapter_source": "ml_workflow", - "aliases": [], - "see_also": ["concept drift", "data drift"] - }, - { - "term": "model evaluation", - "definition": "The systematic assessment of machine learning model performance using various metrics and validation techniques to determine whether the model meets requirements and is ready for deployment.", - "chapter_source": "ml_workflow", - "aliases": [], - "see_also": [] - }, - { - "term": "model optimization", - "definition": "The process of improving machine learning models for better performance, reduced resource consumption, or compatibility with deployment constraints while maintaining acceptable accuracy levels.", - "chapter_source": "ml_workflow", - "aliases": [], - "see_also": [] - }, - { - "term": "model training", - "definition": "The process of using machine learning algorithms to learn patterns from training data, adjusting model parameters to minimize prediction errors and create a functional predictive system.", - "chapter_source": "ml_workflow", - "aliases": [], - "see_also": [] - }, - { - "term": "model validation", - "definition": "The process of testing machine learning models on independent datasets to assess their generalization ability and ensure they perform reliably on unseen data.", - "chapter_source": "ml_workflow", - "aliases": [], - "see_also": [] - }, - { - "term": "model versioning", - "definition": "The systematic tracking and management of different versions of machine learning models, including their parameters, training data, and performance metrics, to enable comparison and rollback capabilities.", - "chapter_source": "ml_workflow", - "aliases": [], - "see_also": [] - }, - { - "term": "monitoring", - "definition": "The continuous observation and measurement of machine learning system performance, data quality, and operational metrics in production to detect issues and trigger maintenance actions.", - "chapter_source": "ml_workflow", - "aliases": [], - "see_also": [] - }, - { - "term": "performance insights", - "definition": "Analytical observations derived from monitoring production machine learning systems that reveal opportunities for improvement in model accuracy, system efficiency, or user experience.", - "chapter_source": "ml_workflow", - "aliases": [], - "see_also": [] - }, - { - "term": "problem definition", - "definition": "The initial stage of machine learning development that involves clearly specifying objectives, constraints, success metrics, and operational requirements to guide all subsequent development decisions.", - "chapter_source": "ml_workflow", - "aliases": [], - "see_also": [] - }, - { - "term": "retinal fundus photographs", - "definition": "Medical images of the interior surface of the eye, including the retina, optic disc, and blood vessels, commonly used for diagnosing eye diseases and training medical AI systems.", - "chapter_source": "ml_workflow", - "aliases": [], - "see_also": [] - }, - { - "term": "scalability", - "definition": "The ability of machine learning systems to handle increasing amounts of data, users, or computational demands without significant degradation in performance or user experience.", - "chapter_source": "ml_workflow", - "aliases": [], - "see_also": [] - }, - { - "term": "sensitivity", - "definition": "The proportion of actual positive cases correctly identified by a classification model, also known as true positive rate or recall; critical in medical applications where missing positive cases has severe consequences.", - "chapter_source": "ml_workflow", - "aliases": ["true positive rate", "recall"], - "see_also": ["specificity"] - }, - { - "term": "shadow deployment", - "definition": "A deployment strategy where a new model runs in parallel with the production model, making predictions that are logged but not served to users, enabling validation without user impact.", - "chapter_source": "ml_workflow", - "aliases": ["shadow mode"], - "see_also": ["canary deployment", "model deployment"] - }, - { - "term": "specificity", - "definition": "The proportion of actual negative cases correctly identified by a classification model, also known as true negative rate; important for avoiding overwhelming referral systems with false positives.", - "chapter_source": "ml_workflow", - "aliases": ["true negative rate"], - "see_also": ["sensitivity"] - }, - { - "term": "stage-specific metrics", - "definition": "Performance indicators tailored to individual lifecycle phases, such as data quality metrics during preparation, training convergence during modeling, and latency metrics during deployment.", - "chapter_source": "ml_workflow", - "aliases": [], - "see_also": [] - }, - { - "term": "systems thinking", - "definition": "A holistic approach to analysis that views machine learning systems as interconnected wholes rather than individual components, emphasizing relationships and dependencies between different lifecycle stages.", - "chapter_source": "ml_workflow", - "aliases": [], - "see_also": [] - }, - { - "term": "transfer learning", - "definition": "A machine learning technique where models pre-trained on large datasets are adapted for specific tasks, dramatically reducing training time and data requirements while achieving high performance.", - "chapter_source": "ml_workflow", - "aliases": [], - "see_also": [] - }, - { - "term": "validation issues", - "definition": "Problems identified during model testing that indicate poor performance, overfitting, data quality problems, or other issues that must be resolved before deployment.", - "chapter_source": "ml_workflow", - "aliases": [], - "see_also": [] - }, - { - "term": "workflow orchestration", - "definition": "Automated coordination and management of complex ML pipeline sequences, ensuring proper execution order, dependency management, and error handling across distributed systems.", - "chapter_source": "ml_workflow", - "aliases": [], - "see_also": [] - } - ] -} diff --git a/book/quarto/contents/vol1/model_serving/model_serving.qmd b/book/quarto/contents/vol1/model_serving/model_serving.qmd index 3ef14273b7..2e512e86bf 100644 --- a/book/quarto/contents/vol1/model_serving/model_serving.qmd +++ b/book/quarto/contents/vol1/model_serving/model_serving.qmd @@ -1,7 +1,6 @@ --- quiz: model_serving_quizzes.json concepts: serving_concepts.yml -glossary: serving_glossary.json engine: jupyter --- @@ -2329,11 +2328,11 @@ class Mm1UtilizationTable: \renewcommand{\arraystretch}{1.3} % default is 1, ``` -| **Utilization $(\rho)$** | **Latency Multiple** | **Example (5 ms service)** | -|:------------------------:|:--------------------:|:--------------------------:| -| `{python} Mm1UtilizationTable.u50_pct_str` percent | `{python} Mm1UtilizationTable.u50_mult_str`$\times$ | `{python} Mm1UtilizationTable.u50_example_ms_str` ms | -| `{python} Mm1UtilizationTable.u70_pct_str` percent | `{python} Mm1UtilizationTable.u70_mult_str`$\times$ | `{python} Mm1UtilizationTable.u70_example_ms_str` ms | -| `{python} Mm1UtilizationTable.u80_pct_str` percent | `{python} Mm1UtilizationTable.u80_mult_str`$\times$ | `{python} Mm1UtilizationTable.u80_example_ms_str` ms | +| **Utilization $(\rho)$** | **Latency Multiple** | **Example (5 ms service)** | +|:--------------------------------------------------:|:---------------------------------------------------:|:----------------------------------------------------:| +| `{python} Mm1UtilizationTable.u50_pct_str` percent | `{python} Mm1UtilizationTable.u50_mult_str`$\times$ | `{python} Mm1UtilizationTable.u50_example_ms_str` ms | +| `{python} Mm1UtilizationTable.u70_pct_str` percent | `{python} Mm1UtilizationTable.u70_mult_str`$\times$ | `{python} Mm1UtilizationTable.u70_example_ms_str` ms | +| `{python} Mm1UtilizationTable.u80_pct_str` percent | `{python} Mm1UtilizationTable.u80_mult_str`$\times$ | `{python} Mm1UtilizationTable.u80_example_ms_str` ms | | `{python} Mm1UtilizationTable.u90_pct_str` percent | `{python} Mm1UtilizationTable.u90_mult_str`$\times$ | `{python} Mm1UtilizationTable.u90_example_ms_str` ms | | `{python} Mm1UtilizationTable.u95_pct_str` percent | `{python} Mm1UtilizationTable.u95_mult_str`$\times$ | `{python} Mm1UtilizationTable.u95_example_ms_str` ms | @@ -2845,8 +2844,8 @@ class BatchThroughputCalc: \renewcommand{\arraystretch}{1.3} ``` -| **Batch Size** | **Inference Time*** | **Per-Image Compute** | **Throughput** | **GPU Util.** | -|:--------------:|:-------------------:|:---------------------:|:--------------:|:-------------:| +| **Batch Size** | **Inference Time*** | **Per-Image Compute** | **Throughput** | **GPU Util.** | +|:--------------:|:------------------------------------------------:|:------------------------------------------------------:|:----------------------------------------------------------:|:------------------------------------------------------:| | 1 | `{python} BatchThroughputCalc.bt_b1_inf_str` ms | `{python} BatchThroughputCalc.bt_b1_per_image_str` ms | `{python} BatchThroughputCalc.bt_b1_throughput_str` img/s | `{python} BatchThroughputCalc.bt_b1_util_str` percent | | 4 | `{python} BatchThroughputCalc.bt_b4_inf_str` ms | `{python} BatchThroughputCalc.bt_b4_per_image_str` ms | `{python} BatchThroughputCalc.bt_b4_throughput_str` img/s | `{python} BatchThroughputCalc.bt_b4_util_str` percent | | 8 | `{python} BatchThroughputCalc.bt_b8_inf_str` ms | `{python} BatchThroughputCalc.bt_b8_per_image_str` ms | `{python} BatchThroughputCalc.bt_b8_throughput_str` img/s | `{python} BatchThroughputCalc.bt_b8_util_str` percent | @@ -3129,11 +3128,11 @@ class BatchVariabilityCalc: bv_1000_tail_str = fmt(tail_pct_values[3], precision=1, commas=False) ``` -| **Arrival Rate** | **Mean Batch** | **Std Dev** | $P(\text{batch}=0)$ | $P(\text{batch} \ge 2 \times \text{mean})$ | -|:----------------:|:--------------:|:-----------:|:-------------------:|:------------------------------------------:| -| **50 QPS** | `{python} BatchVariabilityCalc.bv_50_mean_str` | `{python} BatchVariabilityCalc.bv_50_std_str` | `{python} BatchVariabilityCalc.bv_50_empty_str` percent | `{python} BatchVariabilityCalc.bv_50_tail_str` percent | -| **200 QPS** | `{python} BatchVariabilityCalc.bv_200_mean_str` | `{python} BatchVariabilityCalc.bv_200_std_str` | `{python} BatchVariabilityCalc.bv_200_empty_str` percent | `{python} BatchVariabilityCalc.bv_200_tail_str` percent | -| **500 QPS** | `{python} BatchVariabilityCalc.bv_500_mean_str` | `{python} BatchVariabilityCalc.bv_500_std_str` | `{python} BatchVariabilityCalc.bv_500_empty_str` percent | `{python} BatchVariabilityCalc.bv_500_tail_str` percent | +| **Arrival Rate** | **Mean Batch** | **Std Dev** | $P(\text{batch}=0)$ | $P(\text{batch} \ge 2 \times \text{mean})$ | +|:----------------:|:------------------------------------------------:|:-----------------------------------------------:|:---------------------------------------------------------:|:--------------------------------------------------------:| +| **50 QPS** | `{python} BatchVariabilityCalc.bv_50_mean_str` | `{python} BatchVariabilityCalc.bv_50_std_str` | `{python} BatchVariabilityCalc.bv_50_empty_str` percent | `{python} BatchVariabilityCalc.bv_50_tail_str` percent | +| **200 QPS** | `{python} BatchVariabilityCalc.bv_200_mean_str` | `{python} BatchVariabilityCalc.bv_200_std_str` | `{python} BatchVariabilityCalc.bv_200_empty_str` percent | `{python} BatchVariabilityCalc.bv_200_tail_str` percent | +| **500 QPS** | `{python} BatchVariabilityCalc.bv_500_mean_str` | `{python} BatchVariabilityCalc.bv_500_std_str` | `{python} BatchVariabilityCalc.bv_500_empty_str` percent | `{python} BatchVariabilityCalc.bv_500_tail_str` percent | | **1000 QPS** | `{python} BatchVariabilityCalc.bv_1000_mean_str` | `{python} BatchVariabilityCalc.bv_1000_std_str` | `{python} BatchVariabilityCalc.bv_1000_empty_str` percent | `{python} BatchVariabilityCalc.bv_1000_tail_str` percent | : **Batch Size Variability**: At low traffic, batching windows frequently contain zero requests (wasted GPU cycles). At moderate traffic, batch sizes fluctuate significantly around the mean. High traffic provides more stable batching, and the probability of batches exceeding twice the mean size decreases as traffic grows (from `{python} BatchVariabilityCalc.bv_50_tail_str` percent at 50 QPS to `{python} BatchVariabilityCalc.bv_1000_tail_str` percent at 1000 QPS), reflecting the law of large numbers. {#tbl-batch-variability} @@ -3232,11 +3231,11 @@ class BatchingAnalysisCalc: # service_time_value, total_latency_value, throughput_value already at module scope ``` -| **Batch Size** | **Service Time** | **Total Latency** | **Throughput** | **Efficiency** | -|:--------------:|:----------------:|:-----------------:|:--------------:|:--------------:| -| 1 | `{python} BatchingAnalysisCalc.ba_b1_service_str` ms | `{python} BatchingAnalysisCalc.ba_b1_latency_str` ms | `{python} BatchingAnalysisCalc.ba_b1_throughput_str` img/s | Low | -| 4 | `{python} BatchingAnalysisCalc.ba_b4_service_str` ms | `{python} BatchingAnalysisCalc.ba_b4_latency_str` ms | `{python} BatchingAnalysisCalc.ba_b4_throughput_str` img/s | Moderate | -| 8 | `{python} BatchingAnalysisCalc.ba_b8_service_str` ms | `{python} BatchingAnalysisCalc.ba_b8_latency_str` ms | `{python} BatchingAnalysisCalc.ba_b8_throughput_str` img/s | Good | +| **Batch Size** | **Service Time** | **Total Latency** | **Throughput** | **Efficiency** | +|:--------------:|:-----------------------------------------------------:|:-----------------------------------------------------:|:-----------------------------------------------------------:|:--------------:| +| 1 | `{python} BatchingAnalysisCalc.ba_b1_service_str` ms | `{python} BatchingAnalysisCalc.ba_b1_latency_str` ms | `{python} BatchingAnalysisCalc.ba_b1_throughput_str` img/s | Low | +| 4 | `{python} BatchingAnalysisCalc.ba_b4_service_str` ms | `{python} BatchingAnalysisCalc.ba_b4_latency_str` ms | `{python} BatchingAnalysisCalc.ba_b4_throughput_str` img/s | Moderate | +| 8 | `{python} BatchingAnalysisCalc.ba_b8_service_str` ms | `{python} BatchingAnalysisCalc.ba_b8_latency_str` ms | `{python} BatchingAnalysisCalc.ba_b8_throughput_str` img/s | Good | | 16 | `{python} BatchingAnalysisCalc.ba_b16_service_str` ms | `{python} BatchingAnalysisCalc.ba_b16_latency_str` ms | `{python} BatchingAnalysisCalc.ba_b16_throughput_str` img/s | High | | 32 | `{python} BatchingAnalysisCalc.ba_b32_service_str` ms | `{python} BatchingAnalysisCalc.ba_b32_latency_str` ms | `{python} BatchingAnalysisCalc.ba_b32_throughput_str` img/s | Maximum | @@ -3734,10 +3733,10 @@ class TrafficAdaptiveBatchingCalc: tab_5000_avg_batch_str = fmt(avg_batch_values[3], precision=1, commas=False) ``` -| **Arrival Rate** | **Optimal Window** | **Avg Batch Size** | **p99 Latency** | -|:-----------------|:------------------:|:------------------:|:---------------:| -| **100 QPS** | 20 ms | `{python} TrafficAdaptiveBatchingCalc.tab_100_avg_batch_str` | 45 ms | -| **500 QPS** | 8 ms | `{python} TrafficAdaptiveBatchingCalc.tab_500_avg_batch_str` | 42 ms | +| **Arrival Rate** | **Optimal Window** | **Avg Batch Size** | **p99 Latency** | +|:-----------------|:------------------:|:-------------------------------------------------------------:|:---------------:| +| **100 QPS** | 20 ms | `{python} TrafficAdaptiveBatchingCalc.tab_100_avg_batch_str` | 45 ms | +| **500 QPS** | 8 ms | `{python} TrafficAdaptiveBatchingCalc.tab_500_avg_batch_str` | 42 ms | | **1,000 QPS** | 5 ms | `{python} TrafficAdaptiveBatchingCalc.tab_1000_avg_batch_str` | 38 ms | | **5,000 QPS** | 2 ms | `{python} TrafficAdaptiveBatchingCalc.tab_5000_avg_batch_str` | 35 ms | diff --git a/book/quarto/contents/vol1/model_serving/model_serving_glossary.json b/book/quarto/contents/vol1/model_serving/model_serving_glossary.json deleted file mode 100644 index adc49a0f76..0000000000 --- a/book/quarto/contents/vol1/model_serving/model_serving_glossary.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "metadata": { - "chapter": "model_serving", - "version": "1.0.0", - "generated": "2026-01-07T12:00:00.000000", - "total_terms": 0, - "standardized": true, - "last_updated": "2026-01-07T12:00:00.000000" - }, - "terms": [] -} \ No newline at end of file diff --git a/book/quarto/contents/vol1/nn_architectures/nn_architectures_glossary.json b/book/quarto/contents/vol1/nn_architectures/nn_architectures_glossary.json deleted file mode 100644 index 12e9ea3393..0000000000 --- a/book/quarto/contents/vol1/nn_architectures/nn_architectures_glossary.json +++ /dev/null @@ -1,336 +0,0 @@ -{ - "metadata": { - "chapter": "nn_architectures", - "version": "1.0.0", - "generated": "2025-09-15T14:08:03.494438", - "total_terms": 45, - "standardized": true, - "last_updated": "2025-09-15T15:01:37.285470" - }, - "terms": [ - { - "term": "activation function", - "definition": "A mathematical function applied to the output of neural network layers to introduce non-linearity, enabling the network to learn complex patterns beyond linear relationships.", - "chapter_source": "nn_architectures", - "aliases": [], - "see_also": [] - }, - { - "term": "alexnet", - "definition": "A groundbreaking convolutional neural network architecture that won the 2012 ImageNet challenge, reducing error rates from 26% to 16% and sparking the deep learning renaissance.", - "chapter_source": "nn_architectures", - "aliases": [], - "see_also": [] - }, - { - "term": "attention mechanism", - "definition": "A neural network component that computes weighted connections between elements based on their content, allowing dynamic focus on relevant parts of the input rather than fixed architectural connections.", - "chapter_source": "nn_architectures", - "aliases": [], - "see_also": [] - }, - { - "term": "backpropagation", - "definition": "The algorithm used to train neural networks by computing gradients of the loss function with respect to network parameters and propagating error signals backward through the network layers.", - "chapter_source": "nn_architectures", - "aliases": [], - "see_also": [] - }, - { - "term": "batch normalization", - "definition": "A technique that normalizes the inputs of each layer to have zero mean and unit variance, stabilizing training and allowing higher learning rates in deep networks.", - "chapter_source": "nn_architectures", - "aliases": [], - "see_also": [] - }, - { - "term": "convolution operation", - "definition": "A mathematical operation that slides a filter (kernel) across input data to detect local features, forming the foundation of convolutional neural networks for spatial pattern recognition.", - "chapter_source": "nn_architectures", - "aliases": [], - "see_also": [] - }, - { - "term": "convolutional neural network", - "definition": "A type of neural network architecture designed for processing spatial data like images, using convolutional layers with local receptive fields and weight sharing to detect spatial patterns.", - "chapter_source": "nn_architectures", - "aliases": [], - "see_also": [] - }, - { - "term": "deep learning", - "definition": "A subset of machine learning that uses neural networks with multiple hidden layers to automatically learn hierarchical representations of data.", - "chapter_source": "nn_architectures", - "aliases": [], - "see_also": [] - }, - { - "term": "dense layer", - "definition": "A fully connected neural network layer where every neuron connects to every neuron in the adjacent layers, enabling unrestricted feature interactions across all inputs.", - "chapter_source": "nn_architectures", - "aliases": [], - "see_also": [] - }, - { - "term": "dlrm", - "definition": "Deep Learning Recommendation Model, an architecture developed by Meta that combines categorical embeddings with a bottom multi-layer perceptron (MLP) and top MLP to handle the massive scale and sparsity of recommendation system workloads.", - "chapter_source": "nn_architectures", - "aliases": [ - "Deep Learning Recommendation Model" - ], - "see_also": [] - }, - { - "term": "dropout", - "definition": "A regularization technique that randomly sets a fraction of input units to zero during training to prevent overfitting and improve generalization.", - "chapter_source": "nn_architectures", - "aliases": [], - "see_also": [] - }, - { - "term": "efficiency frontier", - "definition": "The optimal trade-off curve between accuracy and computational cost (latency, energy, or memory), where no model exists that is both more accurate and more efficient.", - "chapter_source": "nn_architectures" - }, - { - "term": "encoder-decoder", - "definition": "An architectural pattern where an encoder processes input into a compressed representation and a decoder generates output from this representation, commonly used in sequence-to-sequence tasks.", - "chapter_source": "nn_architectures", - "aliases": [], - "see_also": [] - }, - { - "term": "feature map", - "definition": "The output of a convolutional layer representing the response of learned filters to different spatial locations in the input, capturing detected features at various positions.", - "chapter_source": "nn_architectures", - "aliases": [], - "see_also": [] - }, - { - "term": "feedforward network", - "definition": "A neural network where information flows in one direction from input to output without cycles, contrasting with recurrent networks that have feedback connections.", - "chapter_source": "nn_architectures", - "aliases": [], - "see_also": [] - }, - { - "term": "gpt-2", - "definition": "A 1.5-billion parameter autoregressive language model released by OpenAI in 2019, serving as a primary Lighthouse Model for analyzing memory bandwidth constraints in Transformer inference.", - "chapter_source": "nn_architectures", - "aliases": [], - "see_also": [ - "transformer", - "memory bandwidth" - ] - }, - { - "term": "gradient descent", - "definition": "An optimization algorithm that iteratively adjusts neural network parameters in the direction that minimizes the loss function by following the negative gradient.", - "chapter_source": "nn_architectures", - "aliases": [], - "see_also": [] - }, - { - "term": "gru", - "definition": "Gated Recurrent Unit, a simplified variant of LSTM that uses fewer gates while maintaining the ability to capture long-term dependencies in sequential data.", - "chapter_source": "nn_architectures", - "aliases": [], - "see_also": [] - }, - { - "term": "hidden state", - "definition": "The internal memory of recurrent neural networks that carries information from previous time steps, enabling the network to maintain context across sequential inputs.", - "chapter_source": "nn_architectures", - "aliases": [], - "see_also": [] - }, - { - "term": "kernel", - "definition": "A small matrix of learnable weights used in convolutional layers to detect specific features through the convolution operation, also called a filter.", - "chapter_source": "nn_architectures", - "aliases": [], - "see_also": [] - }, - { - "term": "layer normalization", - "definition": "A normalization technique that normalizes inputs across the features dimension for each sample, commonly used in transformer architectures to stabilize training.", - "chapter_source": "nn_architectures", - "aliases": [], - "see_also": [] - }, - { - "term": "llama", - "definition": "Large Language Model Meta AI, a family of open foundation models that popularized efficient architectural choices like RMSNorm and SwiGLU, serving as a modern reference point for large-scale Transformer efficiency.", - "chapter_source": "nn_architectures", - "aliases": [], - "see_also": [ - "transformer", - "foundation model" - ] - }, - { - "term": "lstm", - "definition": "Long Short-Term Memory, a type of recurrent neural network architecture designed to handle long-term dependencies through gating mechanisms that control information flow.", - "chapter_source": "nn_architectures", - "aliases": [], - "see_also": [] - }, - { - "term": "multi-head attention", - "definition": "An attention mechanism that uses multiple parallel attention heads, each focusing on different aspects of the input to capture diverse types of relationships simultaneously.", - "chapter_source": "nn_architectures", - "aliases": [], - "see_also": [] - }, - { - "term": "multi-layer perceptron", - "definition": "A feedforward neural network with one or more hidden layers between input and output, capable of learning non-linear mappings through dense connections and activation functions.", - "chapter_source": "nn_architectures", - "aliases": [], - "see_also": [] - }, - { - "term": "neural network", - "definition": "A computational model inspired by biological neural networks, consisting of interconnected nodes (neurons) that process information through weighted connections and activation functions.", - "chapter_source": "nn_architectures", - "aliases": [], - "see_also": [] - }, - { - "term": "padding", - "definition": "A technique in convolutional networks that adds zeros or other values around the input borders to control the spatial dimensions of the output feature maps.", - "chapter_source": "nn_architectures", - "aliases": [], - "see_also": [] - }, - { - "term": "pooling", - "definition": "A downsampling operation in convolutional networks that reduces spatial dimensions while retaining important features, commonly using max or average operations over local regions.", - "chapter_source": "nn_architectures", - "aliases": [], - "see_also": [] - }, - { - "term": "positional encoding", - "definition": "A method used in transformer architectures to inject information about the position of tokens in a sequence, since transformers lack inherent sequential processing.", - "chapter_source": "nn_architectures", - "aliases": [], - "see_also": [] - }, - { - "term": "query key value", - "definition": "The three components of attention mechanisms where queries determine what to look for, keys represent what is available, and values contain the actual information to be weighted and combined.", - "chapter_source": "nn_architectures", - "aliases": [], - "see_also": [] - }, - { - "term": "receptive field", - "definition": "The region of the input that influences a particular neuron's output, determining the spatial extent of patterns that can be detected by that neuron.", - "chapter_source": "nn_architectures", - "aliases": [], - "see_also": [] - }, - { - "term": "recurrent neural network", - "definition": "A type of neural network designed for sequential data processing, featuring connections that create loops allowing information to persist across time steps.", - "chapter_source": "nn_architectures", - "aliases": [], - "see_also": [] - }, - { - "term": "regularization", - "definition": "Techniques used to prevent overfitting in neural networks by adding constraints or penalties, including methods like dropout, weight decay, and data augmentation.", - "chapter_source": "nn_architectures", - "aliases": [], - "see_also": [] - }, - { - "term": "residual connection", - "definition": "A skip connection that adds the input of a layer to its output, enabling the training of very deep networks by mitigating the vanishing gradient problem.", - "chapter_source": "nn_architectures", - "aliases": [], - "see_also": [] - }, - { - "term": "resnet", - "definition": "Residual Network, a deep convolutional architecture that introduced skip connections, enabling the training of networks with hundreds of layers and achieving breakthrough performance.", - "chapter_source": "nn_architectures", - "aliases": [], - "see_also": [] - }, - { - "term": "resnet-50", - "definition": "A specific 50-layer variant of the Residual Network architecture that serves as the canonical Lighthouse Model for compute-bound workloads, balancing depth and computational cost for vision benchmarks.", - "chapter_source": "nn_architectures", - "aliases": [], - "see_also": [ - "resnet", - "compute-bound" - ] - }, - { - "term": "self-attention", - "definition": "An attention mechanism where queries, keys, and values all come from the same sequence, allowing each position to attend to all positions including itself.", - "chapter_source": "nn_architectures", - "aliases": [], - "see_also": [] - }, - { - "term": "skip connection", - "definition": "A direct connection that bypasses one or more layers, allowing gradients to flow more easily through deep networks and enabling better training of very deep architectures.", - "chapter_source": "nn_architectures", - "aliases": [], - "see_also": [] - }, - { - "term": "softmax", - "definition": "An activation function that converts a vector of real numbers into a probability distribution, commonly used in the output layer for multi-class classification tasks.", - "chapter_source": "nn_architectures", - "aliases": [], - "see_also": [] - }, - { - "term": "stride", - "definition": "The step size by which a convolutional filter moves across the input, controlling the spatial dimensions of the output and the degree of overlap between filter applications.", - "chapter_source": "nn_architectures", - "aliases": [], - "see_also": [] - }, - { - "term": "transformer", - "definition": "A neural network architecture based entirely on attention mechanisms, eliminating recurrence and convolution while achieving state-of-the-art performance across many domains.", - "chapter_source": "nn_architectures", - "aliases": [], - "see_also": [] - }, - { - "term": "translation invariance", - "definition": "The property of convolutional networks to recognize patterns regardless of their position in the input, achieved through weight sharing and pooling operations.", - "chapter_source": "nn_architectures", - "aliases": [], - "see_also": [] - }, - { - "term": "universal approximation theorem", - "definition": "A theoretical result proving that neural networks with sufficient width and non-linear activation functions can approximate any continuous function on a compact domain.", - "chapter_source": "nn_architectures", - "aliases": [], - "see_also": [] - }, - { - "term": "vanishing gradient", - "definition": "A problem in deep neural networks where gradients become exponentially smaller as they propagate backward, making it difficult to train early layers effectively.", - "chapter_source": "nn_architectures", - "aliases": [], - "see_also": [] - }, - { - "term": "weight sharing", - "definition": "The practice of using the same parameters across different spatial locations, as in convolutional networks, reducing the number of parameters while maintaining pattern detection capabilities.", - "chapter_source": "nn_architectures", - "aliases": [], - "see_also": [] - } - ] -} \ No newline at end of file diff --git a/book/quarto/contents/vol1/nn_computation/nn_computation_glossary.json b/book/quarto/contents/vol1/nn_computation/nn_computation_glossary.json deleted file mode 100644 index d57c053478..0000000000 --- a/book/quarto/contents/vol1/nn_computation/nn_computation_glossary.json +++ /dev/null @@ -1,418 +0,0 @@ -{ - "metadata": { - "chapter": "nn_computation", - "version": "1.0.1", - "generated": "2025-09-15T14:08:03.493898", - "total_terms": 49, - "standardized": true, - "last_updated": "2026-01-11T00:00:00.000000" - }, - "terms": [ - { - "term": "inference", - "definition": "The operational phase where trained neural networks make predictions on new data using fixed parameters, without weight updates.", - "chapter_source": "nn_computation", - "aliases": [], - "see_also": [] - }, - { - "term": "logits", - "definition": "The raw, unnormalized scores output by the last layer of a neural network before the activation function (like Softmax) converts them into probabilities.", - "chapter_source": "nn_computation", - "aliases": [], - "see_also": ["softmax"] - }, - { - "term": "softmax", - "definition": "An activation function that converts logits into a probability distribution where outputs sum to 1, used in multi-class classification.", - "chapter_source": "nn_computation", - "aliases": [], - "see_also": [] - }, - { - "term": "tanh", - "definition": "Hyperbolic tangent activation function that maps inputs to (-1, 1), providing zero-centered outputs.", - "chapter_source": "nn_computation", - "aliases": [], - "see_also": [] - }, - { - "term": "dying relu", - "definition": "A failure mode where ReLU neurons become permanently inactive, outputting zero for all inputs due to negative pre-activations.", - "chapter_source": "nn_computation", - "aliases": [], - "see_also": ["relu"] - }, - { - "term": "chain rule", - "definition": "The calculus rule enabling computation of derivatives for composite functions, fundamental to backpropagation.", - "chapter_source": "nn_computation", - "aliases": [], - "see_also": ["backpropagation"] - }, - { - "term": "one-hot encoding", - "definition": "A representation where categorical labels become vectors with a single 1 and remaining 0s.", - "chapter_source": "nn_computation", - "aliases": [], - "see_also": [] - }, - { - "term": "computational graph", - "definition": "A directed graph representing the sequence of operations in neural network computation, enabling automatic differentiation.", - "chapter_source": "nn_computation", - "aliases": [], - "see_also": [] - }, - { - "term": "credit assignment problem", - "definition": "The challenge of determining which weights in a multi-layer network contributed to prediction errors.", - "chapter_source": "nn_computation", - "aliases": [], - "see_also": [] - }, - { - "term": "activation function", - "definition": "A mathematical function applied to the weighted sum of inputs in a neural network neuron to introduce nonlinearity, enabling the network to learn complex patterns beyond simple linear combinations.", - "chapter_source": "nn_computation", - "aliases": [], - "see_also": [] - }, - { - "term": "artificial intelligence", - "definition": "The field of computer science focused on creating systems that can perform tasks typically requiring human intelligence, such as perception, reasoning, learning, and decision-making.", - "chapter_source": "nn_computation", - "aliases": [], - "see_also": [] - }, - { - "term": "artificial neural network", - "definition": "A computational model inspired by biological neural networks, consisting of interconnected nodes (neurons) organized in layers that can learn patterns from data through adjustable weights and biases.", - "chapter_source": "nn_computation", - "aliases": [], - "see_also": [] - }, - { - "term": "backpropagation", - "definition": "An algorithm that computes gradients of the loss function with respect to network weights by propagating error signals backward through the network layers, enabling systematic weight updates during training.", - "chapter_source": "nn_computation", - "aliases": [], - "see_also": [] - }, - { - "term": "batch size", - "definition": "The number of training examples processed simultaneously during one iteration of neural network training, affecting both computational efficiency and gradient estimation quality.", - "chapter_source": "nn_computation", - "aliases": [], - "see_also": [] - }, - { - "term": "bias", - "definition": "A learnable parameter added to the weighted sum in each neuron that allows the activation function to shift, providing additional flexibility for the network to fit complex patterns.", - "chapter_source": "nn_computation", - "aliases": [], - "see_also": [] - }, - { - "term": "biological neuron", - "definition": "A cell in the nervous system that receives, processes, and transmits information through electrical and chemical signals, serving as inspiration for artificial neural networks.", - "chapter_source": "nn_computation", - "aliases": [], - "see_also": [] - }, - { - "term": "convolutional neural network", - "definition": "A specialized neural network architecture designed for processing grid-like data such as images, using convolutional layers that apply filters to detect local features.", - "chapter_source": "nn_computation", - "aliases": [], - "see_also": [] - }, - { - "term": "cross-entropy loss", - "definition": "A loss function commonly used in classification tasks that measures the difference between predicted probability distributions and true class labels, providing strong gradients for effective learning.", - "chapter_source": "nn_computation", - "aliases": [], - "see_also": [] - }, - { - "term": "deep learning", - "definition": "A subfield of machine learning that uses artificial neural networks with multiple layers to automatically learn hierarchical representations from data without explicit feature engineering.", - "chapter_source": "nn_computation", - "aliases": [], - "see_also": [] - }, - { - "term": "dense layer", - "definition": "A fully-connected neural network layer where each neuron receives input from all neurons in the previous layer, enabling comprehensive information integration across features.", - "chapter_source": "nn_computation", - "aliases": [], - "see_also": [] - }, - { - "term": "epoch", - "definition": "One complete pass through the entire training dataset during neural network training, consisting of multiple batch iterations depending on dataset size and batch size.", - "chapter_source": "nn_computation", - "aliases": [], - "see_also": [] - }, - { - "term": "feature engineering", - "definition": "The process of manually designing and extracting relevant features from raw data to improve machine learning model performance, largely automated in deep learning systems.", - "chapter_source": "nn_computation", - "aliases": [], - "see_also": [] - }, - { - "term": "feedforward network", - "definition": "A neural network architecture where information flows in one direction from input to output layers without cycles, forming the foundation for many deep learning models.", - "chapter_source": "nn_computation", - "aliases": [], - "see_also": [] - }, - { - "term": "flops", - "definition": "Floating Point Operations Per Second, a measure of computational throughput that quantifies the number of mathematical operations involving decimal numbers a system can perform.", - "chapter_source": "nn_computation", - "aliases": [], - "see_also": [] - }, - { - "term": "forward propagation", - "definition": "The process of computing neural network predictions by passing input data through successive layers, applying weights, biases, and activation functions at each stage.", - "chapter_source": "nn_computation", - "aliases": [], - "see_also": [] - }, - { - "term": "gradient descent", - "definition": "An optimization algorithm that iteratively adjusts neural network parameters in the direction that minimizes the loss function, using gradients to determine update directions and magnitudes.", - "chapter_source": "nn_computation", - "aliases": [], - "see_also": [] - }, - { - "term": "graphics processing unit", - "definition": "A specialized processor originally designed for rendering graphics that provides parallel processing capabilities essential for efficient neural network computation and training.", - "chapter_source": "nn_computation", - "aliases": [], - "see_also": [] - }, - { - "term": "hidden layer", - "definition": "An intermediate layer in a neural network between input and output layers that learns abstract representations by transforming data through learned weights and activation functions.", - "chapter_source": "nn_computation", - "aliases": [], - "see_also": [] - }, - { - "term": "hyperparameter", - "definition": "A configuration setting that controls the learning process but is not learned from data, such as learning rate, batch size, or network architecture choices.", - "chapter_source": "nn_computation", - "aliases": [], - "see_also": [] - }, - { - "term": "learning rate", - "definition": "A hyperparameter that determines the step size for weight updates during gradient descent optimization, critically affecting training stability and convergence speed.", - "chapter_source": "nn_computation", - "aliases": [], - "see_also": [] - }, - { - "term": "loss function", - "definition": "A mathematical function that quantifies the difference between neural network predictions and true labels, providing the optimization objective for training algorithms.", - "chapter_source": "nn_computation", - "aliases": [], - "see_also": [] - }, - { - "term": "machine learning", - "definition": "A subset of artificial intelligence that enables systems to automatically improve performance on tasks through experience and data rather than explicit programming.", - "chapter_source": "nn_computation", - "aliases": [], - "see_also": [] - }, - { - "term": "mini-batch gradient descent", - "definition": "A training approach that computes gradients and updates weights using a small subset of training examples simultaneously, balancing computational efficiency with gradient estimation quality.", - "chapter_source": "nn_computation", - "aliases": [], - "see_also": [] - }, - { - "term": "multilayer perceptron", - "definition": "A feedforward neural network with one or more hidden layers between input and output layers, capable of learning nonlinear relationships in data.", - "chapter_source": "nn_computation", - "aliases": [], - "see_also": [] - }, - { - "term": "neural network", - "definition": "A computational model consisting of interconnected nodes organized in layers that can learn to map inputs to outputs through adjustable connection weights.", - "chapter_source": "nn_computation", - "aliases": [], - "see_also": [] - }, - { - "term": "overfitting", - "definition": "A phenomenon where a model learns specific details of training data so well that it fails to generalize to new, unseen examples, typically indicated by high training accuracy but poor validation performance.", - "chapter_source": "nn_computation", - "aliases": [], - "see_also": [] - }, - { - "term": "parameter", - "definition": "A learnable component of a neural network, including weights and biases, that gets adjusted during training to minimize the loss function.", - "chapter_source": "nn_computation", - "aliases": [], - "see_also": [] - }, - { - "term": "perceptron", - "definition": "The fundamental building block of neural networks, consisting of weighted inputs, a bias term, and an activation function that produces a single output.", - "chapter_source": "nn_computation", - "aliases": [], - "see_also": [] - }, - { - "term": "relu", - "definition": "Rectified Linear Unit activation function defined as f(x) = max(0,x) that introduces nonlinearity while maintaining computational efficiency and avoiding vanishing gradient problems.", - "chapter_source": "nn_computation", - "aliases": [], - "see_also": [] - }, - { - "term": "sigmoid", - "definition": "An activation function that maps input values to a range between 0 and 1, historically popular but prone to vanishing gradient problems in deep networks.", - "chapter_source": "nn_computation", - "aliases": [], - "see_also": [] - }, - { - "term": "supervised learning", - "definition": "A machine learning approach where models learn from labeled training examples to make predictions on new, unlabeled data.", - "chapter_source": "nn_computation", - "aliases": [], - "see_also": [] - }, - { - "term": "tensor", - "definition": "A multi-dimensional array used to represent data in neural networks, generalizing scalars (0D), vectors (1D), and matrices (2D) to higher dimensions.", - "chapter_source": "nn_computation", - "aliases": [], - "see_also": [] - }, - { - "term": "training", - "definition": "The process of adjusting neural network parameters using labeled data and optimization algorithms to minimize prediction errors and improve performance.", - "chapter_source": "nn_computation", - "aliases": [], - "see_also": [] - }, - { - "term": "vanishing gradient", - "definition": "A problem in deep neural networks where gradients become exponentially smaller as they propagate backward through layers, making it difficult for early layers to learn effectively.", - "chapter_source": "nn_computation", - "aliases": [], - "see_also": [] - }, - { - "term": "weight", - "definition": "A learnable parameter that determines the strength of connection between neurons in different layers, adjusted during training to minimize the loss function.", - "chapter_source": "nn_computation", - "aliases": [], - "see_also": [] - }, - { - "term": "weight matrix", - "definition": "An organized collection of weights connecting one layer to another in a neural network, enabling efficient computation through matrix operations.", - "chapter_source": "nn_computation", - "aliases": [], - "see_also": [] - }, - { - "term": "ml systems spectrum", - "definition": "The range of machine learning system deployments from cloud-based systems with abundant resources to tiny embedded devices with severe constraints, each requiring different optimization strategies and trade-offs.", - "chapter_source": "nn_computation", - "aliases": [], - "see_also": [] - }, - { - "term": "virtuous cycle", - "definition": "The self-reinforcing process in deep learning where improvements in data availability, algorithms, and computing power each enable further advances in the other areas, accelerating overall progress.", - "chapter_source": "nn_computation", - "aliases": [], - "see_also": [] - }, - { - "term": "bias terms", - "definition": "Learnable parameters in neural networks that shift the activation function, allowing neurons to activate even when all inputs are zero, providing additional flexibility for fitting complex patterns.", - "chapter_source": "nn_computation", - "aliases": [], - "see_also": [] - }, - { - "term": "threshold for activation", - "definition": "The input level at which a neuron begins to produce significant output, determined by the combination of weights, biases, and the chosen activation function, controlling when the neuron contributes to the network's computation.", - "chapter_source": "nn_computation", - "aliases": [], - "see_also": [] - }, - { - "term": "inference", - "definition": "The operational phase where trained neural networks make predictions on new data using fixed parameters, without weight updates, requiring only forward propagation computation.", - "chapter_source": "nn_computation", - "aliases": [], - "see_also": [] - }, - { - "term": "softmax", - "definition": "An activation function that converts logits into a probability distribution where outputs sum to 1, commonly used in the output layer of multi-class classification networks.", - "chapter_source": "nn_computation", - "aliases": [], - "see_also": [] - }, - { - "term": "tanh", - "definition": "The hyperbolic tangent activation function that maps inputs to the range (-1, 1), providing zero-centered outputs that can improve gradient flow compared to sigmoid.", - "chapter_source": "nn_computation", - "aliases": [], - "see_also": [] - }, - { - "term": "dying relu", - "definition": "A failure mode where ReLU neurons become permanently inactive, outputting zero for all inputs because their pre-activation values remain consistently negative during training.", - "chapter_source": "nn_computation", - "aliases": [], - "see_also": [] - }, - { - "term": "chain rule", - "definition": "The calculus rule for computing derivatives of composite functions, fundamental to backpropagation as it enables gradient computation through successive network layers.", - "chapter_source": "nn_computation", - "aliases": [], - "see_also": [] - }, - { - "term": "one-hot encoding", - "definition": "A representation for categorical labels as vectors where exactly one element is 1 and all others are 0, commonly used for class labels in classification tasks.", - "chapter_source": "nn_computation", - "aliases": [], - "see_also": [] - }, - { - "term": "computational graph", - "definition": "A directed graph representing the sequence of mathematical operations in neural network computation, enabling automatic differentiation by tracking dependencies between operations.", - "chapter_source": "nn_computation", - "aliases": [], - "see_also": [] - }, - { - "term": "credit assignment problem", - "definition": "The challenge of determining which weights in a multi-layer network contributed to prediction errors, solved in neural networks by the backpropagation algorithm.", - "chapter_source": "nn_computation", - "aliases": [], - "see_also": [] - } - ] -} diff --git a/book/quarto/contents/vol1/optimizations/model_compression.qmd b/book/quarto/contents/vol1/optimizations/model_compression.qmd index 1727985d2b..904c6111b2 100644 --- a/book/quarto/contents/vol1/optimizations/model_compression.qmd +++ b/book/quarto/contents/vol1/optimizations/model_compression.qmd @@ -1,7 +1,6 @@ --- quiz: model_compression_quizzes.json concepts: model_compression_concepts.yml -glossary: model_compression_glossary.json crossrefs: model_compression_xrefs.json engine: jupyter --- @@ -234,10 +233,10 @@ According to the iron law $(T = \frac{D_{\text{vol}}}{\text{BW}} + \frac{O}{R_{\ ```{=latex} \vspace{-9pt} ``` -| **Operation** | **Bit-Width** | **Relative Energy** | -|:----------------|--------------:|--------------------:| -| **Integer Add** | 8-bit | 1$\times$ | -| **Float Add** | 32-bit | `{python} CompressionSetup.energy_float_add_ratio_str`$\times$ | +| **Operation** | **Bit-Width** | **Relative Energy** | +|:----------------|--------------:|-------------------------------------------------------------------:| +| **Integer Add** | 8-bit | 1$\times$ | +| **Float Add** | 32-bit | `{python} CompressionSetup.energy_float_add_ratio_str`$\times$ | | **DRAM Read** | 64-bit | **`{python} CompressionSetup.energy_dram_read_ratio_str`$\times$** | : **The Energy Hierarchy**: Relative energy cost of representative arithmetic and memory operations, normalized to an 8-bit integer add. A 32-bit float add costs `{python} CompressionSetup.energy_float_add_ratio_str`$\times$ more than its 8-bit integer counterpart, but a single 64-bit DRAM read costs `{python} CompressionSetup.energy_dram_read_ratio_str`$\times$ more—more than four orders of magnitude above on-chip compute. This gap is why bit-width reductions that shrink data movement dominate the energy budget of inference far more than the arithmetic savings alone would suggest. {#tbl-model-compression-energy-hierarchy} diff --git a/book/quarto/contents/vol1/optimizations/model_compression_glossary.json b/book/quarto/contents/vol1/optimizations/model_compression_glossary.json deleted file mode 100644 index 324e74ca6c..0000000000 --- a/book/quarto/contents/vol1/optimizations/model_compression_glossary.json +++ /dev/null @@ -1,348 +0,0 @@ -{ - "metadata": { - "chapter": "optimizations", - "version": "1.0.0", - "generated": "2025-09-15T14:08:03.500952", - "total_terms": 50, - "standardized": true, - "last_updated": "2025-09-15T15:01:37.289414" - }, - "terms": [ - { - "term": "activation-based pruning", - "definition": "A pruning method that evaluates the average activation values of neurons or filters over a dataset to identify and remove neurons that consistently produce low activations and contribute little information to the network's decision process.", - "chapter_source": "optimizations", - "aliases": [], - "see_also": [] - }, - { - "term": "architectural efficiency", - "definition": "The dimension of model optimization that focuses on how computations are performed efficiently during training and inference by exploiting sparsity, factorizing large components, and dynamically adjusting computation based on input complexity.", - "chapter_source": "optimizations", - "aliases": [], - "see_also": [] - }, - { - "term": "automl", - "definition": "Automated Machine Learning that uses machine learning itself to automate model design decisions, including architecture search, hyperparameter optimization, and feature selection to create efficient models without manual intervention.", - "chapter_source": "optimizations", - "aliases": [], - "see_also": [] - }, - { - "term": "binarization", - "definition": "An extreme quantization technique that reduces neural network weights and activations to binary values (typically -1 and +1), achieving maximum compression but often requiring specialized training procedures and hardware support.", - "chapter_source": "optimizations", - "aliases": [], - "see_also": [] - }, - { - "term": "calibration", - "definition": "The process in post-training quantization of analyzing a representative dataset to determine optimal quantization parameters, including scale factors and zero points, that minimize accuracy loss when converting from high to low precision.", - "chapter_source": "optimizations", - "aliases": [], - "see_also": [] - }, - { - "term": "channelwise quantization", - "definition": "A quantization granularity approach where each channel in a layer uses its own set of quantization parameters, providing more precise representation than layerwise quantization while maintaining hardware efficiency.", - "chapter_source": "optimizations", - "aliases": [], - "see_also": [] - }, - { - "term": "conditional computation", - "definition": "A dynamic optimization technique where different parts of a neural network are selectively activated based on input characteristics, reducing computational load by skipping unnecessary computations for specific inputs.", - "chapter_source": "optimizations", - "aliases": [], - "see_also": [] - }, - { - "term": "cp decomposition", - "definition": "CANDECOMP/PARAFAC decomposition that expresses a tensor as a sum of rank-one components, used to compress neural network layers by reducing the number of parameters while preserving computational functionality.", - "chapter_source": "optimizations", - "aliases": [], - "see_also": [] - }, - { - "term": "dynamic pruning", - "definition": "A model optimization technique that removes unnecessary parameters from neural networks while maintaining predictive performance, reducing model size and computational cost by eliminating redundant weights, neurons, or layers.", - "chapter_source": "optimizations", - "aliases": [], - "see_also": [] - }, - { - "term": "dynamic quantization", - "definition": "The process of reducing numerical precision in neural networks by mapping high-precision weights and activations to lower-bit representations, significantly reducing memory usage and computational requirements.", - "chapter_source": "optimizations", - "aliases": [], - "see_also": [] - }, - { - "term": "early exit architectures", - "definition": "Neural network designs that include multiple prediction heads at different depths, allowing samples to exit early when confident predictions can be made, reducing average computational cost per inference.", - "chapter_source": "optimizations", - "aliases": [], - "see_also": [] - }, - { - "term": "efficientnet", - "definition": "A family of neural network architectures discovered through Neural Architecture Search that achieves better accuracy-efficiency trade-offs by using compound scaling to balance network depth, width, and input resolution.", - "chapter_source": "optimizations", - "aliases": [], - "see_also": [] - }, - { - "term": "flops", - "definition": "Floating Point Operations Per Second, a measure of computational complexity that counts the number of arithmetic operations required to execute a model, commonly used to compare model efficiency.", - "chapter_source": "optimizations", - "aliases": [], - "see_also": [] - }, - { - "term": "gradient-based pruning", - "definition": "A pruning method that uses gradient information during training to identify neurons or filters with smaller gradient magnitudes, which contribute less to reducing the loss function and can be safely removed.", - "chapter_source": "optimizations", - "aliases": [], - "see_also": [] - }, - { - "term": "groupwise quantization", - "definition": "A quantization approach where parameters are divided into groups, with each group sharing quantization parameters, offering a balance between compression and accuracy by providing more granular control than layerwise methods.", - "chapter_source": "optimizations", - "aliases": [], - "see_also": [] - }, - { - "term": "hardware-aware design", - "definition": "The practice of designing neural network architectures specifically optimized for target hardware platforms, considering factors like memory hierarchy, compute units, and data movement patterns to maximize efficiency.", - "chapter_source": "optimizations", - "aliases": [], - "see_also": [] - }, - { - "term": "int8 quantization", - "definition": "A numerical precision reduction technique that represents model weights and activations using 8-bit integers instead of 32-bit floating point numbers, reducing memory usage and enabling faster inference on specialized hardware.", - "chapter_source": "optimizations", - "aliases": [], - "see_also": [] - }, - { - "term": "iterative pruning", - "definition": "A gradual pruning strategy that removes parameters in multiple stages with fine-tuning between each stage, allowing the model to adapt to reduced capacity and typically achieving better accuracy than one-shot pruning.", - "chapter_source": "optimizations", - "aliases": [], - "see_also": [] - }, - { - "term": "knowledge distillation", - "definition": "A model compression technique where a smaller \"student\" network learns to mimic the behavior of a larger \"teacher\" network by training on the teacher's soft output probabilities rather than just hard labels.", - "chapter_source": "optimizations", - "aliases": [], - "see_also": [] - }, - { - "term": "layerwise quantization", - "definition": "A quantization granularity where all parameters within a single layer share the same quantization parameters, providing computational efficiency but potentially limiting representational precision compared to finer-grained approaches.", - "chapter_source": "optimizations", - "aliases": [], - "see_also": [] - }, - { - "term": "lottery ticket hypothesis", - "definition": "The theory that large neural networks contain sparse subnetworks that, when trained in isolation from proper initialization, can achieve comparable accuracy to the full network while being significantly smaller.", - "chapter_source": "optimizations", - "aliases": [], - "see_also": [] - }, - { - "term": "low-rank factorization", - "definition": "A matrix decomposition technique that approximates large weight matrices as products of smaller matrices, reducing the number of parameters and computational operations required for neural network layers.", - "chapter_source": "optimizations", - "aliases": [], - "see_also": [] - }, - { - "term": "magnitude-based pruning", - "definition": "The most common pruning method that removes parameters with the smallest absolute values, based on the assumption that weights with smaller magnitudes contribute less to the model's output.", - "chapter_source": "optimizations", - "aliases": [], - "see_also": [] - }, - { - "term": "mixed-precision training", - "definition": "A training technique that uses different numerical precisions for different operations, typically combining FP16 for forward and backward passes with FP32 for gradient updates to balance efficiency and numerical stability.", - "chapter_source": "optimizations", - "aliases": [], - "see_also": [] - }, - { - "term": "model compression", - "definition": "The broad category of techniques aimed at reducing model size and computational requirements while maintaining accuracy, including pruning, quantization, knowledge distillation, and architectural modifications.", - "chapter_source": "optimizations", - "aliases": [], - "see_also": [] - }, - { - "term": "model optimization", - "definition": "The systematic refinement of machine learning models to enhance their efficiency while maintaining effectiveness, balancing trade-offs between accuracy, computational cost, memory usage, latency, and energy efficiency.", - "chapter_source": "optimizations", - "aliases": [], - "see_also": [] - }, - { - "term": "neural architecture search", - "definition": "An automated approach that uses machine learning algorithms to discover optimal neural network architectures by searching through possible combinations of layers, connections, and hyperparameters for specific constraints.", - "chapter_source": "optimizations", - "aliases": [], - "see_also": [] - }, - { - "term": "numerical precision optimization", - "definition": "The dimension of model optimization that addresses how numerical values are represented and processed, including quantization techniques that map high-precision values to lower-bit representations.", - "chapter_source": "optimizations", - "aliases": [], - "see_also": [] - }, - { - "term": "one-shot pruning", - "definition": "A pruning strategy where a large fraction of parameters is removed in a single step, typically followed by fine-tuning to recover accuracy, offering simplicity but potentially requiring more aggressive fine-tuning.", - "chapter_source": "optimizations", - "aliases": [], - "see_also": [] - }, - { - "term": "post-training quantization", - "definition": "A quantization approach applied to already-trained models without modifying the training process, typically involving calibration on representative data to determine optimal quantization parameters.", - "chapter_source": "optimizations", - "aliases": [], - "see_also": [] - }, - { - "term": "quantization-aware training", - "definition": "A training approach where quantization effects are simulated during the training process, allowing the model to adapt to reduced precision and typically achieving better accuracy than post-training quantization.", - "chapter_source": "optimizations", - "aliases": [], - "see_also": [] - }, - { - "term": "singular value decomposition", - "definition": "A matrix factorization technique that decomposes a matrix into the product of three matrices, commonly used in low-rank approximations to compress neural network layers by retaining only the most significant singular values.", - "chapter_source": "optimizations", - "aliases": [], - "see_also": [] - }, - { - "term": "sparsity", - "definition": "The property of neural networks where many weights are zero or near-zero, which can be exploited for computational efficiency through specialized hardware support and algorithms designed for sparse operations.", - "chapter_source": "optimizations", - "aliases": [], - "see_also": [] - }, - { - "term": "static quantization", - "definition": "A quantization approach where quantization parameters are determined once during calibration and remain fixed during inference, providing computational efficiency but less adaptability than dynamic approaches.", - "chapter_source": "optimizations", - "aliases": [], - "see_also": [] - }, - { - "term": "structured pruning", - "definition": "A pruning approach that removes entire computational units such as neurons, channels, or layers, producing smaller dense models that are more hardware-friendly than the sparse matrices created by unstructured pruning.", - "chapter_source": "optimizations", - "aliases": [], - "see_also": [] - }, - { - "term": "student-teacher learning", - "definition": "The core mechanism of knowledge distillation where a smaller student network learns from a larger teacher network, typically using soft targets that provide more information than hard classification labels.", - "chapter_source": "optimizations", - "aliases": [], - "see_also": [] - }, - { - "term": "tensor decomposition", - "definition": "The extension of matrix factorization to higher-order tensors, used to compress neural network layers by representing weight tensors as combinations of smaller tensors with fewer parameters.", - "chapter_source": "optimizations", - "aliases": [], - "see_also": [] - }, - { - "term": "ternarization", - "definition": "An extreme quantization technique that constrains weights to three values (typically -1, 0, +1), providing significant compression while maintaining more representational capacity than binary quantization.", - "chapter_source": "optimizations", - "aliases": [], - "see_also": [] - }, - { - "term": "tucker decomposition", - "definition": "A tensor decomposition method that generalizes singular value decomposition to higher-order tensors using a core tensor and factor matrices, commonly used for compressing convolutional neural network layers.", - "chapter_source": "optimizations", - "aliases": [], - "see_also": [] - }, - { - "term": "unstructured pruning", - "definition": "A pruning approach that removes individual weights while preserving the overall network architecture, creating sparse weight matrices that require specialized hardware support to realize computational benefits.", - "chapter_source": "optimizations", - "aliases": [], - "see_also": [] - }, - { - "term": "l0-norm constraint", - "definition": "A regularization technique that counts the number of non-zero parameters in a model, used in structured pruning to directly control model sparsity by penalizing the number of active weights.", - "chapter_source": "optimizations", - "aliases": [], - "see_also": [] - }, - { - "term": "network structure modification", - "definition": "Architectural changes to neural networks that improve efficiency, including techniques like depthwise separable convolutions, bottleneck layers, and efficient attention mechanisms that reduce computational complexity.", - "chapter_source": "optimizations", - "aliases": [], - "see_also": [] - }, - { - "term": "uniform quantization", - "definition": "A quantization approach where the range of values is divided into evenly spaced intervals, providing simple implementation but potentially suboptimal for non-uniform value distributions.", - "chapter_source": "optimizations", - "aliases": [], - "see_also": [] - }, - { - "term": "fp32 to int8", - "definition": "A common quantization transformation that converts 32-bit floating point weights and activations to 8-bit integers, achieving roughly 4x memory reduction while maintaining acceptable accuracy for many models.", - "chapter_source": "optimizations", - "aliases": [], - "see_also": [] - }, - { - "term": "quantization granularity", - "definition": "The level at which quantization parameters are applied, ranging from per-tensor (coarsest) to per-channel or per-group (finer), with finer granularity typically preserving more accuracy but requiring more storage.", - "chapter_source": "optimizations", - "aliases": [], - "see_also": [] - }, - { - "term": "nas-generated architecture", - "definition": "Neural network architectures discovered through automated Neural Architecture Search rather than manual design, often achieving better efficiency-accuracy trade-offs through exhaustive exploration of design spaces.", - "chapter_source": "optimizations", - "aliases": [], - "see_also": [] - }, - { - "term": "latency constraints", - "definition": "Real-time requirements that limit the maximum acceptable delay for model inference, driving optimization decisions in deployment scenarios where response time is critical.", - "chapter_source": "optimizations", - "aliases": [], - "see_also": [] - }, - { - "term": "unstructured sparsity", - "definition": "A form of model sparsity where individual weights are set to zero without following any particular pattern, creating irregular sparsity patterns that require specialized hardware support to realize computational benefits.", - "chapter_source": "optimizations", - "aliases": [], - "see_also": [] - } - ] -} diff --git a/book/quarto/contents/vol1/responsible_engr/responsible_engr.qmd b/book/quarto/contents/vol1/responsible_engr/responsible_engr.qmd index 0733cf79c5..ae50719f13 100644 --- a/book/quarto/contents/vol1/responsible_engr/responsible_engr.qmd +++ b/book/quarto/contents/vol1/responsible_engr/responsible_engr.qmd @@ -1,7 +1,6 @@ --- quiz: responsible_engr_quizzes.json concepts: responsible_engr_concepts.yml -glossary: responsible_engr_glossary.json engine: jupyter --- @@ -1598,10 +1597,10 @@ Edge deployment scenarios\index{Edge Deployment!power constraints} make efficien The benchmarks in @tbl-model-efficiency-comparison provide actionable guidance for efficiency optimization. Techniques that enable deployment on power-constrained platforms (quantization, pruning, and efficient architectures) directly reduce environmental impact per inference regardless of deployment context. Power savings at inference time translate directly to financial savings when aggregated across millions of requests. -| **Model** | **Parameters** | **Inference Power** | **Latency** | **Fits Smartphone?** | **Fits IoT?** | -|:--------------------|:---------------------------------------------:|:--------------------------------------------:|:----------------------------------------------:|:--------------------:|:-------------:| -| **MobileNetV2** | `{python} EdgeEfficiencyCalc.mv2_params_str` | `{python} EdgeEfficiencyCalc.mv2_power_str` | `{python} EdgeEfficiencyCalc.mv2_latency_str` | `{python} EdgeEfficiencyCalc.mv2_fits_phone_str` | `{python} EdgeEfficiencyCalc.mv2_fits_iot_str` | -| **EfficientNet-B0** | `{python} EdgeEfficiencyCalc.eff_params_str` | `{python} EdgeEfficiencyCalc.eff_power_str` | `{python} EdgeEfficiencyCalc.eff_latency_str` | `{python} EdgeEfficiencyCalc.eff_fits_phone_str` | `{python} EdgeEfficiencyCalc.eff_fits_iot_str` | +| **Model** | **Parameters** | **Inference Power** | **Latency** | **Fits Smartphone?** | **Fits IoT?** | +|:--------------------|:---------------------------------------------:|:--------------------------------------------:|:----------------------------------------------:|:-------------------------------------------------:|:-----------------------------------------------:| +| **MobileNetV2** | `{python} EdgeEfficiencyCalc.mv2_params_str` | `{python} EdgeEfficiencyCalc.mv2_power_str` | `{python} EdgeEfficiencyCalc.mv2_latency_str` | `{python} EdgeEfficiencyCalc.mv2_fits_phone_str` | `{python} EdgeEfficiencyCalc.mv2_fits_iot_str` | +| **EfficientNet-B0** | `{python} EdgeEfficiencyCalc.eff_params_str` | `{python} EdgeEfficiencyCalc.eff_power_str` | `{python} EdgeEfficiencyCalc.eff_latency_str` | `{python} EdgeEfficiencyCalc.eff_fits_phone_str` | `{python} EdgeEfficiencyCalc.eff_fits_iot_str` | | **ResNet-50** | `{python} EdgeEfficiencyCalc.rn50_params_str` | `{python} EdgeEfficiencyCalc.rn50_power_str` | `{python} EdgeEfficiencyCalc.rn50_latency_str` | `{python} EdgeEfficiencyCalc.rn50_fits_phone_str` | `{python} EdgeEfficiencyCalc.rn50_fits_iot_str` | | **TinyML Model** | `{python} EdgeEfficiencyCalc.tiny_params_str` | `{python} EdgeEfficiencyCalc.tiny_power_str` | `{python} EdgeEfficiencyCalc.tiny_latency_str` | `{python} EdgeEfficiencyCalc.tiny_fits_phone_str` | `{python} EdgeEfficiencyCalc.tiny_fits_iot_str` | diff --git a/book/quarto/contents/vol1/responsible_engr/responsible_engr_glossary.json b/book/quarto/contents/vol1/responsible_engr/responsible_engr_glossary.json deleted file mode 100644 index f13d975a97..0000000000 --- a/book/quarto/contents/vol1/responsible_engr/responsible_engr_glossary.json +++ /dev/null @@ -1,117 +0,0 @@ -{ - "metadata": { - "chapter": "responsible_engr", - "version": "1.0.0", - "generated": "2026-01-07T12:00:00.000000", - "total_terms": 15, - "standardized": true, - "last_updated": "2026-01-07T12:00:00.000000" - }, - "terms": [ - { - "term": "silent bias", - "definition": "Model unfairness that produces valid-looking but discriminatory outputs, evading traditional error monitoring and requiring disaggregated evaluation to detect.", - "chapter_source": "responsible_engr", - "aliases": [], - "see_also": [] - }, - { - "term": "demographic parity", - "definition": "A fairness criterion requiring that the probability of receiving a positive prediction is independent of group membership across protected attributes.", - "chapter_source": "responsible_engr", - "aliases": [], - "see_also": ["equalized odds"] - }, - { - "term": "equal opportunity", - "definition": "A fairness criterion requiring equal true positive rates among qualified applicants across different demographic groups.", - "chapter_source": "responsible_engr", - "aliases": [], - "see_also": ["equalized odds"] - }, - { - "term": "equalized odds", - "definition": "A fairness criterion requiring that both true positive and false positive rates are equal across different demographic groups.", - "chapter_source": "responsible_engr", - "aliases": [], - "see_also": ["demographic parity", "equal opportunity"] - }, - { - "term": "model cards", - "definition": "A standardized format for documenting machine learning models, capturing information essential for responsible deployment, including intended use, performance factors, and ethical considerations.", - "chapter_source": "responsible_engr", - "aliases": [], - "see_also": ["datasheets for datasets"] - }, - { - "term": "datasheets for datasets", - "definition": "Documentation for training data that captures provenance, collection methodology, demographic composition, and known limitations affecting model behavior.", - "chapter_source": "responsible_engr", - "aliases": [], - "see_also": ["model cards"] - }, - { - "term": "total cost of ownership (tco)", - "definition": "A comprehensive financial metric for ML systems encompassing training, inference, and operational costs over the system's entire lifecycle.", - "chapter_source": "responsible_engr", - "aliases": ["tco"], - "see_also": [] - }, - { - "term": "green ai", - "definition": "A movement in AI research and practice that prioritizes computational efficiency and energy consumption as primary metrics alongside traditional performance metrics like accuracy.", - "chapter_source": "responsible_engr", - "aliases": [], - "see_also": [] - }, - { - "term": "disaggregated evaluation", - "definition": "The practice of breaking down model performance metrics by demographic groups or other factors to reveal disparities that are hidden by aggregate measures.", - "chapter_source": "responsible_engr", - "aliases": ["stratified evaluation"], - "see_also": [] - }, - { - "term": "silent failure", - "definition": "A system failure mode where an ML model continues to produce plausible-looking outputs that are gradually less accurate or contextually relevant without triggering conventional error alerts.", - "chapter_source": "responsible_engr", - "aliases": [], - "see_also": ["silent bias"] - }, - { - "term": "feedback loop", - "definition": "A phenomenon where a model's outputs influence its own future training data, potentially reinforcing and amplifying initial biases over time.", - "chapter_source": "responsible_engr", - "aliases": [], - "see_also": [] - }, - { - "term": "intersectional analysis", - "definition": "Evaluation that considers combinations of demographic attributes (e.g., race and gender simultaneously) to detect concentrated harms not visible in single-factor analysis.", - "chapter_source": "responsible_engr", - "aliases": [], - "see_also": ["disaggregated evaluation"] - }, - { - "term": "red ai", - "definition": "AI research and development that prioritizes maximizing accuracy or performance without regard for the increasing computational and environmental costs required.", - "chapter_source": "responsible_engr", - "aliases": [], - "see_also": ["green ai"] - }, - { - "term": "carbon footprint", - "definition": "The total greenhouse gas emissions, typically measured in CO2 equivalent, produced directly and indirectly by training and operating an ML system.", - "chapter_source": "responsible_engr", - "aliases": [], - "see_also": ["green ai"] - }, - { - "term": "responsible engineering gap", - "definition": "The disparity between technical optimization success (e.g., high benchmark accuracy) and responsible deployment outcomes (e.g., fairness and safety in production).", - "chapter_source": "responsible_engr", - "aliases": [], - "see_also": [] - } - ] -} diff --git a/book/quarto/contents/vol1/training/training_glossary.json b/book/quarto/contents/vol1/training/training_glossary.json deleted file mode 100644 index 7d1017cb44..0000000000 --- a/book/quarto/contents/vol1/training/training_glossary.json +++ /dev/null @@ -1,338 +0,0 @@ -{ - "metadata": { - "chapter": "training", - "version": "1.0.0", - "generated": "2025-09-15T14:08:03.503564", - "total_terms": 48, - "standardized": true, - "last_updated": "2025-09-15T15:01:37.291387" - }, - "terms": [ - { - "term": "activation checkpointing", - "definition": "A memory optimization technique that reduces memory usage during backpropagation by selectively discarding and recomputing activations instead of storing all intermediate results.", - "chapter_source": "training", - "aliases": [], - "see_also": [] - }, - { - "term": "activation function", - "definition": "A mathematical function applied element-wise to neural network outputs to introduce non-linearity, enabling networks to learn complex patterns and preventing them from collapsing into linear models.", - "chapter_source": "training", - "aliases": [], - "see_also": [] - }, - { - "term": "adam optimization", - "definition": "An adaptive learning rate optimization algorithm that combines momentum and RMSprop by maintaining exponentially decaying averages of both gradients and squared gradients for each parameter.", - "chapter_source": "training", - "aliases": [], - "see_also": [] - }, - { - "term": "all-reduce", - "definition": "A collective communication operation in distributed computing where each process contributes data and all processes receive the combined result, commonly used for gradient aggregation in distributed training.", - "chapter_source": "training", - "aliases": [], - "see_also": [] - }, - { - "term": "application-specific integrated circuit", - "definition": "A specialized chip designed for specific tasks that offers maximum efficiency by abandoning general-purpose flexibility, exemplified by Cerebras Wafer-Scale Engine for machine learning training.", - "chapter_source": "training", - "aliases": [], - "see_also": [] - }, - { - "term": "automatic mixed precision", - "definition": "A training technique that automatically manages the use of different numerical precisions (FP16, FP32) to optimize memory usage and computational speed while maintaining model accuracy.", - "chapter_source": "training", - "aliases": [], - "see_also": [] - }, - { - "term": "backpropagation", - "definition": "An algorithm that computes gradients by systematically applying the chain rule backward through a neural network's computational graph, enabling parameter updates during training.", - "chapter_source": "training", - "aliases": [], - "see_also": [] - }, - { - "term": "batch normalization", - "definition": "A technique that normalizes inputs to each layer to have zero mean and unit variance, which stabilizes training and often allows for higher learning rates and faster convergence.", - "chapter_source": "training", - "aliases": [], - "see_also": [] - }, - { - "term": "batch normalization", - "definition": "A technique that normalizes the inputs to each layer during training, reducing internal covariate shift and allowing higher learning rates while improving training stability and speed.", - "chapter_source": "training", - "aliases": [], - "see_also": [] - }, - { - "term": "batched operations", - "definition": "Matrix computations that process multiple inputs simultaneously, converting matrix-vector operations into more efficient matrix-matrix operations to improve hardware utilization.", - "chapter_source": "training", - "aliases": [], - "see_also": [] - }, - { - "term": "bfloat16", - "definition": "A 16-bit floating-point format developed by Google Brain that maintains the same dynamic range as FP32 but with reduced precision, making it particularly suitable for deep learning training.", - "chapter_source": "training", - "aliases": [], - "see_also": [] - }, - { - "term": "cerebras wafer-scale engine", - "definition": "A revolutionary single-wafer processor containing 2.6 trillion transistors and 850,000 cores, designed to eliminate inter-device communication bottlenecks in large-scale machine learning training.", - "chapter_source": "training", - "aliases": [], - "see_also": [] - }, - { - "term": "communication tax", - "definition": "The performance penalty incurred in distributed systems due to the latency and bandwidth costs of synchronizing state between nodes.", - "chapter_source": "training" - }, - { - "term": "data parallelism", - "definition": "A distributed training strategy that splits the dataset across multiple devices while each device maintains a complete copy of the model, enabling parallel computation of gradients.", - "chapter_source": "training", - "aliases": [], - "see_also": [] - }, - { - "term": "dense matrix-matrix multiplication", - "definition": "The fundamental computational operation in neural networks that dominates training time, accounting for 60-90% of computation in typical models.", - "chapter_source": "training", - "aliases": [], - "see_also": [] - }, - { - "term": "distributed training", - "definition": "A method of training machine learning models across multiple machines or devices to handle larger datasets and models that exceed single-device computational or memory capacity.", - "chapter_source": "training", - "aliases": [], - "see_also": [] - }, - { - "term": "distributed training", - "definition": "Training neural networks across multiple devices or machines, using strategies like data parallelism, model parallelism, or pipeline parallelism to handle larger models and datasets efficiently.", - "chapter_source": "training", - "aliases": [], - "see_also": [] - }, - { - "term": "dying relu problem", - "definition": "A phenomenon where ReLU neurons become permanently inactive and output zero for all inputs, preventing them from contributing to learning when weighted inputs consistently produce negative values.", - "chapter_source": "training", - "aliases": [], - "see_also": [] - }, - { - "term": "field-programmable gate array", - "definition": "Reconfigurable hardware that can be programmed for specific tasks, offering flexibility between general-purpose processors and application-specific integrated circuits, useful for custom ML accelerations.", - "chapter_source": "training", - "aliases": [], - "see_also": [] - }, - { - "term": "forward pass", - "definition": "The computation phase where input data flows through a neural network's layers to produce outputs, involving matrix multiplications and activation function applications.", - "chapter_source": "training", - "aliases": [], - "see_also": [] - }, - { - "term": "fp16 computation", - "definition": "The use of 16-bit floating-point arithmetic for neural network operations to reduce memory usage and increase computational speed on modern hardware accelerators.", - "chapter_source": "training", - "aliases": [], - "see_also": [] - }, - { - "term": "gradient accumulation", - "definition": "A technique that simulates larger batch sizes by accumulating gradients from multiple smaller batches before updating model parameters, enabling training with limited memory.", - "chapter_source": "training", - "aliases": [], - "see_also": [] - }, - { - "term": "gradient clipping", - "definition": "A regularization technique that prevents gradient explosion by limiting the magnitude of gradients during backpropagation, typically by scaling gradients when their norm exceeds a threshold.", - "chapter_source": "training", - "aliases": [], - "see_also": [] - }, - { - "term": "gradient descent", - "definition": "The fundamental optimization algorithm that iteratively adjusts model parameters in the direction opposite to the gradient of the loss function to minimize training error.", - "chapter_source": "training", - "aliases": [], - "see_also": [] - }, - { - "term": "gradient synchronization", - "definition": "The process in distributed training where locally computed gradients are aggregated across devices to ensure all devices update their parameters consistently.", - "chapter_source": "training", - "aliases": [], - "see_also": [] - }, - { - "term": "graphics processing unit", - "definition": "Specialized parallel processors originally designed for graphics rendering but widely adopted for machine learning due to their ability to efficiently execute matrix operations and handle thousands of parallel computations.", - "chapter_source": "training", - "aliases": [], - "see_also": [] - }, - { - "term": "hybrid parallelism", - "definition": "A distributed training approach that combines data parallelism and model parallelism to leverage the benefits of both strategies for training very large models.", - "chapter_source": "training", - "aliases": [], - "see_also": [] - }, - { - "term": "learning rate scheduling", - "definition": "The systematic adjustment of learning rates during training, using strategies like step decay, exponential decay, or cosine annealing to improve convergence and final model performance.", - "chapter_source": "training", - "aliases": [], - "see_also": [] - }, - { - "term": "linear scaling failure", - "definition": "The phenomenon where increasing computing resources (e.g., doubling GPUs) results in sub-linear performance gains due to communication overhead and synchronization costs.", - "chapter_source": "training" - }, - { - "term": "loss scaling", - "definition": "A technique used in mixed-precision training that multiplies the loss by a large factor before backpropagation to prevent gradient underflow in reduced precision formats.", - "chapter_source": "training", - "aliases": [], - "see_also": [] - }, - { - "term": "mini-batch processing", - "definition": "An optimization approach that computes gradients over small batches of examples, balancing the computational efficiency of batch processing with the memory constraints of stochastic methods.", - "chapter_source": "training", - "aliases": [], - "see_also": [] - }, - { - "term": "mixed-precision training", - "definition": "A training methodology that combines different numerical precisions (typically FP16 and FP32) to optimize memory usage and computational speed while maintaining training stability.", - "chapter_source": "training", - "aliases": [], - "see_also": [] - }, - { - "term": "model parallelism", - "definition": "A distributed training strategy that splits a neural network model across multiple devices, with each device responsible for computing a portion of the network.", - "chapter_source": "training", - "aliases": [], - "see_also": [] - }, - { - "term": "momentum", - "definition": "An optimization technique that accumulates a velocity vector across iterations to help gradient descent navigate through local minima and accelerate convergence in consistent gradient directions.", - "chapter_source": "training", - "aliases": [], - "see_also": [] - }, - { - "term": "pipeline parallelism", - "definition": "A form of model parallelism where different layers of a model are placed on different devices and data flows through them in a pipeline fashion, allowing multiple batches to be processed simultaneously.", - "chapter_source": "training", - "aliases": [], - "see_also": [] - }, - { - "term": "prefetching", - "definition": "A system optimization technique that loads data into memory before it is needed, overlapping data loading with computation to reduce idle time and improve training throughput.", - "chapter_source": "training", - "aliases": [], - "see_also": [] - }, - { - "term": "rectified linear unit", - "definition": "An activation function that outputs the input if positive and zero otherwise, widely used in modern neural networks for its computational simplicity and ability to avoid vanishing gradients.", - "chapter_source": "training", - "aliases": [], - "see_also": [] - }, - { - "term": "rmsprop", - "definition": "An adaptive learning rate optimization algorithm that maintains a moving average of squared gradients to automatically adjust learning rates for each parameter during training.", - "chapter_source": "training", - "aliases": [], - "see_also": [] - }, - { - "term": "sigmoid", - "definition": "An activation function that maps inputs to the range (0,1) through an S-shaped curve, commonly used in output layers for binary classification but prone to vanishing gradient problems.", - "chapter_source": "training", - "aliases": [], - "see_also": [] - }, - { - "term": "softmax", - "definition": "An activation function that converts raw scores into a probability distribution where outputs sum to 1, essential for multi-class classification tasks.", - "chapter_source": "training", - "aliases": [], - "see_also": [] - }, - { - "term": "stochastic gradient descent", - "definition": "A variant of gradient descent that estimates gradients using individual training examples or small batches rather than the entire dataset, reducing memory requirements and enabling online learning.", - "chapter_source": "training", - "aliases": [], - "see_also": [] - }, - { - "term": "systolic array", - "definition": "A specialized hardware architecture that efficiently performs matrix operations by streaming data through a grid of processing elements, minimized data movement and energy consumption.", - "chapter_source": "training", - "aliases": [], - "see_also": [] - }, - { - "term": "tanh", - "definition": "An activation function that maps inputs to the range (-1,1) with zero-centered output, helping to stabilize gradient-based optimization compared to sigmoid functions.", - "chapter_source": "training", - "aliases": [], - "see_also": [] - }, - { - "term": "tensor parallelism", - "definition": "A model parallelism strategy where individual tensor operations (like matrix multiplication) are split across multiple devices, reducing memory per device and latency for large layers.", - "chapter_source": "training" - }, - { - "term": "tensor processing unit", - "definition": "Google's custom application-specific integrated circuit designed specifically for machine learning workloads, optimized for matrix operations and featuring systolic array architecture.", - "chapter_source": "training", - "aliases": [], - "see_also": [] - }, - { - "term": "time-to-accuracy", - "definition": "The wall-clock time required to train a model to a specified validation accuracy, the ultimate metric for training system performance.", - "chapter_source": "training" - }, - { - "term": "vanishing gradient problem", - "definition": "A challenge in training deep neural networks where gradients become exponentially smaller as they propagate backward through layers, making it difficult to train early layers effectively.", - "chapter_source": "training", - "aliases": [], - "see_also": [] - }, - { - "term": "warp", - "definition": "A group of threads (typically 32 on NVIDIA GPUs) that execute the same instruction in lock-step; the fundamental unit of scheduling and execution on GPUs.", - "chapter_source": "training" - } - ] -} \ No newline at end of file diff --git a/book/quarto/contents/vol2/backmatter/glossary/vol2_glossary.json b/book/quarto/contents/vol2/backmatter/glossary/vol2_glossary.json deleted file mode 100644 index 7376a50d8c..0000000000 --- a/book/quarto/contents/vol2/backmatter/glossary/vol2_glossary.json +++ /dev/null @@ -1,1860 +0,0 @@ -{ - "metadata": { - "type": "volume_glossary", - "volume": "vol2", - "version": "1.0.0", - "generated": "2026-02-11T21:07:21.594794", - "total_terms": 250, - "source": "aggregated_from_vol2_chapter_glossaries", - "standardized": true, - "description": "Glossary for VOL2 built from chapter glossaries" - }, - "terms": [ - { - "term": "accountability", - "definition": "The mechanisms by which individuals or organizations are held responsible for the outcomes of AI systems, involving traceability, documentation, auditing, and the ability to remedy harms.", - "chapter_source": "responsible_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "adapter modules", - "definition": "Small trainable neural network components inserted between frozen layers of a pretrained model to enable lightweight adaptation without modifying the base architecture.", - "chapter_source": "ondevice_learning", - "aliases": [], - "see_also": [] - }, - { - "term": "adaptive resource pattern", - "definition": "A design pattern that enables systems to dynamically adjust their operations in response to varying resource availability, ensuring efficiency and resilience by scaling up or down based on computational load, network bandwidth, and storage capacity.", - "chapter_source": "ai_good", - "aliases": [], - "see_also": [] - }, - { - "term": "adversarial attack", - "definition": "A type of attack where carefully crafted inputs are designed to cause machine learning models to make incorrect predictions while remaining nearly indistinguishable from legitimate data to humans", - "chapter_source": "security_privacy", - "aliases": [], - "see_also": [], - "appears_in": [ - "security_privacy", - "robust_ai" - ] - }, - { - "term": "adversarial example", - "definition": "A maliciously modified input that is designed to fool a machine learning model into making an incorrect prediction, often created by adding small, imperceptible perturbations to legitimate data", - "chapter_source": "security_privacy", - "aliases": [], - "see_also": [], - "appears_in": [ - "security_privacy", - "responsible_ai", - "robust_ai" - ] - }, - { - "term": "adversarial training", - "definition": "A defense technique that involves training models on adversarial examples to improve their robustness and ability to correctly classify adversarial inputs", - "chapter_source": "security_privacy", - "aliases": [], - "see_also": [], - "appears_in": [ - "security_privacy", - "responsible_ai", - "robust_ai" - ] - }, - { - "term": "agi", - "definition": "Artificial General Intelligence - computational systems that match or exceed human cognitive capabilities across all domains of knowledge and reasoning, capable of generalizing across diverse problem domains without task-specific training.", - "chapter_source": "emerging_challenges", - "aliases": [], - "see_also": [] - }, - { - "term": "ai for good", - "definition": "The design, development, and deployment of machine learning systems aimed at addressing important societal and environmental challenges to enhance human welfare, promote sustainability, and contribute to global development goals.", - "chapter_source": "ai_good", - "aliases": [], - "see_also": [] - }, - { - "term": "algorithmic fairness", - "definition": "The principle that automated systems should not disproportionately disadvantage individuals or groups based on protected attributes such as race, gender, or age.", - "chapter_source": "responsible_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "anomaly detection", - "definition": "The identification of patterns in data that do not conform to expected behavior, often used to detect outliers, faults, or malicious activities in systems.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "anonymization", - "definition": "The process of removing or modifying personally identifiable information from datasets to protect individual privacy, though often insufficient against sophisticated re-identification attacks.", - "chapter_source": "security_privacy", - "aliases": [], - "see_also": [] - }, - { - "term": "artificial general intelligence", - "definition": "A hypothetical form of AI that matches or exceeds human cognitive abilities across all domains, representing the ultimate goal of AI research beyond current narrow AI systems.", - "chapter_source": "emerging_challenges", - "aliases": [], - "see_also": [] - }, - { - "term": "artificial intelligence", - "definition": "A broad field of computer science focused on creating systems that can perform tasks typically requiring human intelligence, including learning, reasoning, and decision-making", - "chapter_source": "responsible_ai", - "aliases": [], - "see_also": [], - "appears_in": [ - "responsible_ai", - "sustainable_ai" - ] - }, - { - "term": "attack taxonomy", - "definition": "Systematic classification of cybersecurity threats and adversarial attacks against ML systems, organizing threats by method, target, and impact to guide defense strategies.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "autoencoder", - "definition": "A neural network architecture that learns compressed data representations by minimizing reconstruction error, commonly used for anomaly detection and dimensionality reduction.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "automation bias", - "definition": "The tendency for humans to over-rely on automated system outputs even when clear errors are present, potentially compromising human oversight.", - "chapter_source": "responsible_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "automl", - "definition": "Automated machine learning that uses algorithms to automate the process of applying machine learning to real-world problems, including feature engineering, model selection, and hyperparameter tuning.", - "chapter_source": "emerging_challenges", - "aliases": [], - "see_also": [] - }, - { - "term": "availability attack", - "definition": "A type of data poisoning attack that aims to degrade the overall performance of a machine learning model by introducing noise or corrupting training data across multiple classes.", - "chapter_source": "security_privacy", - "aliases": [], - "see_also": [] - }, - { - "term": "backdoor attack", - "definition": "A type of data poisoning where hidden triggers are embedded in training data, causing models to behave maliciously when specific patterns are encountered during inference", - "chapter_source": "security_privacy", - "aliases": [], - "see_also": [], - "appears_in": [ - "security_privacy", - "robust_ai" - ] - }, - { - "term": "backpropagation", - "definition": "The algorithm for computing gradients in neural networks by propagating error signals backward through layers, essential for training but computationally expensive on resource-constrained devices", - "chapter_source": "ondevice_learning", - "aliases": [], - "see_also": [], - "appears_in": [ - "ondevice_learning", - "sustainable_ai" - ] - }, - { - "term": "bayesian neural networks", - "definition": "Neural networks that incorporate probability distributions over their weights, enabling uncertainty quantification in predictions and more robust decision making.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "bias detection", - "definition": "Systematic methods for identifying unfair discrimination or disparate treatment across different demographic groups in machine learning system outputs.", - "chapter_source": "responsible_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "bias mitigation", - "definition": "Techniques and interventions designed to reduce unfair discrimination in machine learning systems, applied during data collection, model training, or post-processing stages.", - "chapter_source": "responsible_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "bias-only adaptation", - "definition": "A lightweight training strategy that freezes all model weights and updates only scalar bias terms, drastically reducing memory requirements and computational overhead for on-device learning.", - "chapter_source": "ondevice_learning", - "aliases": [], - "see_also": [] - }, - { - "term": "biodiversity monitoring", - "definition": "The systematic observation and measurement of biological diversity using technology such as camera traps and sensor networks to track species populations, habitat changes, and conservation effectiveness.", - "chapter_source": "ai_good", - "aliases": [], - "see_also": [] - }, - { - "term": "bit flip", - "definition": "A hardware fault where a single bit in memory or a register unexpectedly changes its value from 0 to 1 or vice versa, potentially corrupting data or computations.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "black-box attack", - "definition": "An adversarial attack where the attacker has no knowledge of the model's internal architecture, parameters, or training data, and must rely solely on querying the model and observing outputs.", - "chapter_source": "security_privacy", - "aliases": [], - "see_also": [] - }, - { - "term": "brain-computer interface", - "definition": "A direct communication pathway between the brain and an external device, enabling control of computers or prosthetics through neural signals and representing a convergence of ML with neurotechnology.", - "chapter_source": "emerging_challenges", - "aliases": [], - "see_also": [] - }, - { - "term": "built-in self-test (bist)", - "definition": "Hardware testing mechanisms that allow components to test themselves for faults using dedicated circuitry and predefined test patterns.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "cache timing attack", - "definition": "A type of side-channel attack that exploits variations in memory cache access patterns to infer sensitive information about program execution or data.", - "chapter_source": "security_privacy", - "aliases": [], - "see_also": [] - }, - { - "term": "carbon footprint", - "definition": "The total amount of greenhouse gas emissions produced directly and indirectly by an individual, organization, event, or product, typically measured in CO2 equivalent.", - "chapter_source": "sustainable_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "carbon-aware scheduling", - "definition": "A computational approach that schedules AI workloads based on the carbon intensity of the electricity grid, prioritizing execution when renewable energy sources are most available.", - "chapter_source": "sustainable_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "catastrophic forgetting", - "definition": "The phenomenon where neural networks lose previously learned knowledge when adapting to new tasks, a critical challenge in continual on-device learning scenarios.", - "chapter_source": "ondevice_learning", - "aliases": [], - "see_also": [] - }, - { - "term": "checkpoint and restart mechanisms", - "definition": "Techniques that periodically save a program's state so it can resume from the last saved state after a failure, improving system resilience.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "client scheduling", - "definition": "The process of selecting which devices participate in federated learning rounds based on availability, data quality, and resource constraints to ensure representative model updates.", - "chapter_source": "ondevice_learning", - "aliases": [], - "see_also": [] - }, - { - "term": "cloud ml", - "definition": "Machine learning systems that use cloud computing infrastructure to provide scalable computational resources for training and inference, typically offering high-bandwidth connectivity and substantial processing power.", - "chapter_source": "ai_good", - "aliases": [], - "see_also": [] - }, - { - "term": "combinational logic", - "definition": "Digital logic circuits where the output depends only on the current input states, not any past states or memory elements.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "compound ai systems", - "definition": "AI architectures that combine multiple specialized models, tools, and components to achieve complex capabilities through systematic integration rather than relying on a single monolithic model.", - "chapter_source": "emerging_challenges", - "aliases": [], - "see_also": [] - }, - { - "term": "concept bottleneck models", - "definition": "Neural network architectures that first predict interpretable intermediate concepts before making final predictions, combining deep learning power with transparency.", - "chapter_source": "responsible_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "concept drift", - "definition": "A change in the relationship between input features and target outputs over time, requiring model adaptation to maintain performance.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "conservation technology", - "definition": "Technological solutions designed to protect and monitor wildlife and ecosystems, including camera traps, sensor networks, and satellite monitoring systems for tracking animal behavior and detecting threats.", - "chapter_source": "ai_good", - "aliases": [], - "see_also": [] - }, - { - "term": "constitutional ai", - "definition": "A training method where models learn to improve their own outputs by critiquing responses against a set of principles, enabling iterative self-refinement and reducing harmful content while maintaining helpfulness", - "chapter_source": "emerging_challenges", - "aliases": [], - "see_also": [] - }, - { - "term": "continual learning", - "definition": "The ability of machine learning systems to learn continuously from a stream of data while retaining previously acquired knowledge, addressing the challenge of catastrophic forgetting in neural networks", - "chapter_source": "emerging_challenges", - "aliases": [], - "see_also": [], - "appears_in": [ - "emerging_challenges", - "ondevice_learning", - "robust_ai" - ] - }, - { - "term": "cooling effectiveness", - "definition": "The efficiency with which a data center cooling system removes heat from computing equipment, typically measured as the ratio of heat removed to energy consumed for cooling.", - "chapter_source": "sustainable_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "counterfactual explanations", - "definition": "Explanations that describe how a model's output would change if specific input features were modified, particularly useful for understanding decision boundaries.", - "chapter_source": "responsible_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "covariate shift", - "definition": "A type of distribution shift where the input distribution changes while the conditional relationship between inputs and outputs remains stable.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "data center", - "definition": "A facility housing computer systems and associated components such as telecommunications and storage systems, typically including redundant power supplies, cooling systems, and network connections.", - "chapter_source": "sustainable_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "data compression", - "definition": "Techniques for reducing the size and complexity of training data through encoding, quantization, or feature extraction to enable efficient storage and processing on memory-constrained devices.", - "chapter_source": "ondevice_learning", - "aliases": [], - "see_also": [] - }, - { - "term": "data poisoning", - "definition": "An attack method where adversaries inject carefully crafted malicious data points into the training dataset to manipulate model behavior in targeted or systematic ways", - "chapter_source": "security_privacy", - "aliases": [], - "see_also": [], - "appears_in": [ - "security_privacy", - "robust_ai" - ] - }, - { - "term": "data sanitization", - "definition": "The process of deliberately and permanently removing or destroying data stored on memory devices to make it unrecoverable, ensuring data security.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "deep learning", - "definition": "A subset of machine learning using neural networks with multiple hidden layers to automatically learn hierarchical representations from data.", - "chapter_source": "sustainable_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "defensive distillation", - "definition": "A technique that trains a student model to mimic a teacher model's behavior using soft labels, reducing sensitivity to adversarial perturbations.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "demographic parity", - "definition": "A fairness criterion requiring that the probability of receiving a positive prediction is independent of group membership across protected attributes.", - "chapter_source": "responsible_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "dennard scaling", - "definition": "The historical observation that as transistors become smaller, their power density remains approximately constant, allowing for more transistors without proportional increases in power consumption.", - "chapter_source": "sustainable_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "depthwise separable convolutions", - "definition": "A computational technique that decomposes standard convolutions into depthwise and pointwise operations, reducing parameters and computation by 8-9x for mobile-optimized architectures.", - "chapter_source": "ondevice_learning", - "aliases": [], - "see_also": [] - }, - { - "term": "differential privacy", - "definition": "A mathematical framework that provides formal privacy guarantees by adding calibrated noise to computations, ensuring that the inclusion or exclusion of any individual's data has a provably limited effect on the output", - "chapter_source": "ondevice_learning", - "aliases": [], - "see_also": [], - "appears_in": [ - "ondevice_learning", - "security_privacy", - "responsible_ai" - ] - }, - { - "term": "digital divide", - "definition": "The gap between those who have access to modern information and communication technology and those who do not, particularly affecting underserved communities' ability to benefit from digital solutions.", - "chapter_source": "ai_good", - "aliases": [], - "see_also": [] - }, - { - "term": "digital twin", - "definition": "A virtual representation of a physical system that uses real-time data and machine learning to mirror, predict, and optimize the behavior of its physical counterpart.", - "chapter_source": "emerging_challenges", - "aliases": [], - "see_also": [] - }, - { - "term": "disaster response systems", - "definition": "Automated systems that use machine learning to detect, predict, and respond to natural disasters through satellite imagery analysis, sensor networks, and resource allocation optimization.", - "chapter_source": "ai_good", - "aliases": [], - "see_also": [] - }, - { - "term": "distributed knowledge pattern", - "definition": "A design pattern that addresses collective learning and inference across decentralized nodes, emphasizing peer-to-peer knowledge sharing and collaborative model improvement while maintaining operational independence.", - "chapter_source": "ai_good", - "aliases": [], - "see_also": [] - }, - { - "term": "distributed training", - "definition": "The practice of training machine learning models across multiple computing nodes or devices to reduce training time and enable larger model architectures.", - "chapter_source": "sustainable_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "distribution shift", - "definition": "The phenomenon where data encountered during model deployment differs from the training distribution, potentially degrading model performance", - "chapter_source": "responsible_ai", - "aliases": [], - "see_also": [], - "appears_in": [ - "responsible_ai", - "robust_ai" - ] - }, - { - "term": "distribution shift types", - "definition": "Formal categorization of changes in data distributions including covariate shift, label shift, concept drift, and domain shift, each requiring specific adaptation techniques.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "domain adaptation", - "definition": "Machine learning techniques that enable models trained on one domain to perform well on a different but related domain, addressing distribution mismatch challenges.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "domain-specific ai applications", - "definition": "Machine learning solutions tailored to specific sectors like healthcare, agriculture, education, or disaster response, designed to address unique challenges and constraints.", - "chapter_source": "ai_good", - "aliases": [], - "see_also": [] - }, - { - "term": "double modular redundancy (dmr)", - "definition": "A fault-tolerance technique where computations are duplicated across two independent systems to identify and correct errors through comparison.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "dual-use dilemma", - "definition": "The challenge of mitigating misuse of technology that has both positive and negative potential applications, particularly relevant in AI security.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "edge ai", - "definition": "The deployment of artificial intelligence algorithms directly on edge devices like smartphones, IoT sensors, and embedded systems, enabling real-time processing without cloud connectivity.", - "chapter_source": "emerging_challenges", - "aliases": [], - "see_also": [] - }, - { - "term": "edge computing", - "definition": "A distributed computing paradigm that brings computation and data storage closer to data sources, enabling real-time processing with reduced latency and lower bandwidth requirements", - "chapter_source": "ai_good", - "aliases": [], - "see_also": [], - "appears_in": [ - "ai_good", - "ondevice_learning", - "sustainable_ai" - ] - }, - { - "term": "edge ml", - "definition": "Machine learning systems that perform inference and sometimes training at the edge of networks, typically on resource-constrained devices like smartphones or embedded systems with limited computational power.", - "chapter_source": "ai_good", - "aliases": [], - "see_also": [] - }, - { - "term": "edge training", - "definition": "The process of training or fine-tuning machine learning models directly on edge devices, enabling personalization and adaptation without requiring data transmission to cloud servers.", - "chapter_source": "ondevice_learning", - "aliases": [], - "see_also": [] - }, - { - "term": "electromigration", - "definition": "The movement of metal atoms in a conductor under the influence of an electric field, potentially causing permanent hardware faults over time.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "embodied carbon", - "definition": "The total greenhouse gas emissions generated during the manufacturing, transportation, and installation of a product before it begins operation.", - "chapter_source": "sustainable_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "emergent capabilities", - "definition": "Abilities that appear suddenly in neural networks at specific parameter thresholds, such as reasoning and arithmetic skills that emerge discontinuously rather than gradually improving with scale.", - "chapter_source": "emerging_challenges", - "aliases": [], - "see_also": [] - }, - { - "term": "energy efficiency", - "definition": "The ratio of useful output to energy input, measuring how effectively a system converts energy into desired computational work.", - "chapter_source": "sustainable_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "ensemble methods", - "definition": "Machine learning approaches that combine predictions from multiple models to improve accuracy, robustness, and reliability compared to individual models.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "environmental impact measurement", - "definition": "Systematic tracking and quantification of the ecological effects of AI systems, including energy consumption, carbon emissions, and resource depletion across the complete system lifecycle.", - "chapter_source": "sustainable_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "environmental monitoring", - "definition": "The systematic collection and analysis of environmental data using sensor networks and machine learning to track ecosystem health, pollution levels, and climate change impacts.", - "chapter_source": "ai_good", - "aliases": [], - "see_also": [] - }, - { - "term": "equality of opportunity", - "definition": "A fairness criterion focused on ensuring equal true positive rates across groups, guaranteeing that qualified individuals are treated equally regardless of group membership.", - "chapter_source": "responsible_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "equalized odds", - "definition": "A fairness definition requiring that true positive and false positive rates are equal across different demographic groups.", - "chapter_source": "responsible_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "error-correcting codes", - "definition": "Methods used in data storage and transmission to detect and correct errors, improving system reliability and data integrity.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "esp32", - "definition": "A low-cost microcontroller unit widely used in IoT applications, featuring a 240 MHz processor and 520 KB of RAM, commonly deployed in resource-constrained social impact applications.", - "chapter_source": "ai_good", - "aliases": [], - "see_also": [] - }, - { - "term": "exact model theft", - "definition": "An attack that aims to extract the precise internal structure, parameters, and architecture of a machine learning model, allowing complete reproduction of the original model.", - "chapter_source": "security_privacy", - "aliases": [], - "see_also": [] - }, - { - "term": "experience replay", - "definition": "A memory-based technique that stores past training examples in a buffer to prevent catastrophic forgetting and stabilize learning in streaming or continual adaptation scenarios.", - "chapter_source": "ondevice_learning", - "aliases": [], - "see_also": [] - }, - { - "term": "expert collapse", - "definition": "A training pathology in mixture of experts models where only a few experts receive significant training signal, causing other experts to become underutilized and reducing the model's effective capacity.", - "chapter_source": "emerging_challenges", - "aliases": [], - "see_also": [] - }, - { - "term": "explainability", - "definition": "The ability of stakeholders to understand how a machine learning model produces its outputs through post-hoc explanation techniques.", - "chapter_source": "responsible_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "explainable ai", - "definition": "AI systems designed to provide clear, interpretable explanations for their decisions and predictions, addressing the \"black box\" problem of complex machine learning models.", - "chapter_source": "emerging_challenges", - "aliases": [], - "see_also": [] - }, - { - "term": "external memory", - "definition": "Mechanisms that allow neural networks to access and manipulate external storage systems, extending their working memory beyond parameter storage to enable more complex reasoning and information retrieval.", - "chapter_source": "emerging_challenges", - "aliases": [], - "see_also": [] - }, - { - "term": "f1 score", - "definition": "A measure of model accuracy that combines precision and recall into a single metric, calculated as their harmonic mean.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "fairness constraints", - "definition": "Technical and policy restrictions designed to ensure equitable treatment across demographic groups in machine learning systems.", - "chapter_source": "responsible_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "fast gradient sign method (fgsm)", - "definition": "A gradient-based adversarial attack that generates adversarial examples by adding small perturbations in the direction of the gradient.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "fault injection attack", - "definition": "A physical attack that deliberately disrupts hardware operations through techniques like voltage manipulation or electromagnetic interference to induce computational errors and compromise system integrity.", - "chapter_source": "security_privacy", - "aliases": [], - "see_also": [] - }, - { - "term": "fault tolerance", - "definition": "The ability of a system to continue operating correctly even when some of its components fail or encounter errors.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "federated averaging", - "definition": "The standard algorithm for federated learning where client model updates are aggregated using weighted averaging based on local dataset sizes to produce a global model.", - "chapter_source": "ondevice_learning", - "aliases": [], - "see_also": [] - }, - { - "term": "federated learning", - "definition": "A machine learning approach that trains algorithms across decentralized data sources without requiring data to be centralized, improving privacy and reducing data transmission energy costs", - "chapter_source": "ai_good", - "aliases": [], - "see_also": [], - "appears_in": [ - "ai_good", - "emerging_challenges", - "ondevice_learning", - "security_privacy", - "responsible_ai", - "sustainable_ai" - ] - }, - { - "term": "few-shot learning", - "definition": "A machine learning paradigm that enables models to adapt to new tasks using only a small number of labeled examples, critical for data-sparse on-device scenarios.", - "chapter_source": "ondevice_learning", - "aliases": [], - "see_also": [] - }, - { - "term": "flops", - "definition": "Floating-point operations per second, a measure of computer performance indicating how many mathematical calculations involving decimal numbers a system can perform per second.", - "chapter_source": "sustainable_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "foundation models", - "definition": "Large-scale pre-trained models like GPT and BERT that can be adapted for a wide variety of downstream tasks, serving as a foundation for multiple applications.", - "chapter_source": "emerging_challenges", - "aliases": [], - "see_also": [] - }, - { - "term": "gdpr", - "definition": "The General Data Protection Regulation, a European Union law that imposes strict requirements on personal data processing and significantly influences privacy-preserving machine learning design", - "chapter_source": "ondevice_learning", - "aliases": [], - "see_also": [], - "appears_in": [ - "ondevice_learning", - "responsible_ai" - ] - }, - { - "term": "generative adversarial networks", - "definition": "A class of machine learning systems where two neural networks compete against each other, with one generating fake data and the other trying to detect it, leading to highly realistic synthetic data generation.", - "chapter_source": "emerging_challenges", - "aliases": [], - "see_also": [] - }, - { - "term": "glitches", - "definition": "Momentary deviations in voltage, current, or signal that can cause incorrect operation in digital systems and circuits.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "governance frameworks", - "definition": "Structured approaches for managing responsible AI development including policies, procedures, oversight mechanisms, and accountability structures.", - "chapter_source": "responsible_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "gpu", - "definition": "Graphics Processing Unit, a specialized electronic circuit designed to rapidly manipulate and alter memory to accelerate the creation of images and parallel processing tasks like AI training.", - "chapter_source": "sustainable_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "gradient descent", - "definition": "An optimization algorithm that iteratively updates model parameters by moving in the direction opposite to the gradient of the loss function, fundamental to neural network training.", - "chapter_source": "ondevice_learning", - "aliases": [], - "see_also": [] - }, - { - "term": "green ai metrics", - "definition": "Specialized performance indicators that measure the environmental impact of AI systems, including carbon footprint, energy efficiency, and resource utilization throughout the ML lifecycle.", - "chapter_source": "sustainable_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "green computing", - "definition": "The practice of designing, manufacturing, using, and disposing of computers and computer systems in an environmentally responsible manner.", - "chapter_source": "sustainable_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "grey-box attack", - "definition": "An adversarial attack where the attacker has partial knowledge about the model, such as knowing the architecture but not the specific parameters or training data.", - "chapter_source": "security_privacy", - "aliases": [], - "see_also": [] - }, - { - "term": "hardware constraint optimization", - "definition": "Techniques for adapting ML algorithms and models to work within the memory, compute, and power limitations of mobile and embedded devices.", - "chapter_source": "ondevice_learning", - "aliases": [], - "see_also": [] - }, - { - "term": "hardware redundancy", - "definition": "The duplication of critical hardware components to provide backup functionality and improve system reliability through voting mechanisms.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "hardware trojan", - "definition": "A malicious modification embedded in hardware components during manufacturing that can remain dormant under normal conditions but trigger harmful behavior when specific conditions are met.", - "chapter_source": "security_privacy", - "aliases": [], - "see_also": [] - }, - { - "term": "heartbeat mechanisms", - "definition": "Periodic signals sent between system components to monitor health and detect failures, enabling timely fault detection and recovery.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "hierarchical processing pattern", - "definition": "A design pattern that organizes systems into tiers (edge, regional, cloud) that share responsibilities based on available resources and capabilities, optimizing resource usage across the computing spectrum.", - "chapter_source": "ai_good", - "aliases": [], - "see_also": [] - }, - { - "term": "homomorphic encryption", - "definition": "A cryptographic technique that allows computations to be performed directly on encrypted data without decrypting it first, enabling privacy-preserving machine learning inference.", - "chapter_source": "security_privacy", - "aliases": [], - "see_also": [] - }, - { - "term": "hot spares", - "definition": "Backup components kept ready to instantaneously replace failing components without disrupting system operation, providing redundancy.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "huber loss", - "definition": "A robust loss function used in regression that is less sensitive to outliers compared to squared error loss, improving training stability.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "human oversight", - "definition": "The principle that human judgment should supervise, correct, or halt automated decisions, maintaining meaningful human control over AI systems.", - "chapter_source": "responsible_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "human-ai collaboration", - "definition": "The synergistic partnership between humans and AI systems where each contributes their unique strengths to solve complex problems more effectively than either could alone.", - "chapter_source": "emerging_challenges", - "aliases": [], - "see_also": [] - }, - { - "term": "hyperparameter optimization", - "definition": "The process of finding the optimal configuration of hyperparameters (learning rate, batch size, network architecture parameters) that control the machine learning training process.", - "chapter_source": "sustainable_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "impact assessment frameworks", - "definition": "Structured methodologies for evaluating the potential social, economic, and environmental effects of AI deployments in humanitarian and development contexts.", - "chapter_source": "ai_good", - "aliases": [], - "see_also": [] - }, - { - "term": "inference", - "definition": "The phase in machine learning where a trained model is used to make predictions or generate outputs on new, previously unseen data.", - "chapter_source": "sustainable_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "intermittent faults", - "definition": "Hardware faults that occur sporadically and unpredictably, appearing and disappearing without consistent patterns, making diagnosis challenging.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "interpretability", - "definition": "The degree to which humans can understand the reasoning behind a machine learning model's predictions, often referring to inherently transparent models.", - "chapter_source": "responsible_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "iot sensors", - "definition": "Internet of Things devices that collect and transmit environmental or behavioral data, often operating on limited power budgets and using low-bandwidth communication protocols.", - "chapter_source": "ai_good", - "aliases": [], - "see_also": [] - }, - { - "term": "knowledge distillation", - "definition": "A technique where a large, complex \"teacher\" model transfers its learned knowledge to a smaller, more efficient \"student\" model, maintaining performance while reducing computational requirements", - "chapter_source": "ondevice_learning", - "aliases": [], - "see_also": [], - "appears_in": [ - "ondevice_learning", - "sustainable_ai" - ] - }, - { - "term": "label shift", - "definition": "A type of distribution shift where the distribution of target labels changes while the conditional relationship between features and labels remains constant.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "large language models", - "definition": "Neural networks with billions or trillions of parameters trained on vast text corpora, capable of understanding and generating human-like text across diverse domains and tasks.", - "chapter_source": "emerging_challenges", - "aliases": [], - "see_also": [] - }, - { - "term": "lifecycle assessment", - "definition": "A systematic approach to evaluating the environmental impacts of a product or system throughout its entire life cycle, from raw material extraction to disposal.", - "chapter_source": "sustainable_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "load balancing", - "definition": "Techniques in mixture of experts models to ensure that computational load and training signal are distributed evenly across experts, preventing expert collapse and maintaining model efficiency.", - "chapter_source": "emerging_challenges", - "aliases": [], - "see_also": [] - }, - { - "term": "lookup table", - "definition": "A data structure that replaces runtime computation with simpler array indexing operations, commonly used for performance optimization.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "lora technology", - "definition": "Long Range wireless communication protocol that enables IoT devices to communicate over 15+ kilometers with minimal power consumption, ideal for agricultural and environmental monitoring applications.", - "chapter_source": "ai_good", - "aliases": [], - "see_also": [] - }, - { - "term": "low-rank adaptation", - "definition": "A parameter-efficient fine-tuning method that approximates weight updates using low-rank matrices, reducing trainable parameters while maintaining adaptation capability.", - "chapter_source": "ondevice_learning", - "aliases": [], - "see_also": [] - }, - { - "term": "machine consciousness", - "definition": "The hypothetical emergence of conscious awareness in artificial systems, representing a frontier research area exploring whether machines can develop subjective experiences.", - "chapter_source": "emerging_challenges", - "aliases": [], - "see_also": [] - }, - { - "term": "machine learning", - "definition": "A subset of artificial intelligence that enables computers to learn and make decisions from data without being explicitly programmed for each specific task.", - "chapter_source": "sustainable_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "machine learning lifecycle", - "definition": "The complete process of developing, deploying, and maintaining ML systems, from data collection through model retirement.", - "chapter_source": "responsible_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "machine learning operations (mlops)", - "definition": "The practice of deploying and maintaining machine learning models in production reliably and efficiently through automated pipelines.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "machine learning security", - "definition": "The protection of data, models, and infrastructure from unauthorized access, manipulation, or disruption throughout the entire machine learning lifecycle.", - "chapter_source": "security_privacy", - "aliases": [], - "see_also": [] - }, - { - "term": "machine unlearning", - "definition": "Techniques for removing the influence of specific data points from trained models without complete retraining, supporting data deletion rights.", - "chapter_source": "responsible_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "megawatt-hour", - "definition": "A unit of energy equal to one megawatt of power used for one hour, commonly used to measure electricity consumption in large facilities like data centers.", - "chapter_source": "sustainable_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "membership inference attack", - "definition": "An attack that attempts to determine whether a specific data point was included in a model's training dataset by analyzing the model's behavior and outputs.", - "chapter_source": "security_privacy", - "aliases": [], - "see_also": [] - }, - { - "term": "membership inference attacks", - "definition": "Privacy attacks that attempt to determine whether a specific data point was included in a model's training set by analyzing model behavior.", - "chapter_source": "responsible_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "meta-learning", - "definition": "The process of learning how to learn, where models are trained to quickly adapt to new tasks with minimal data, particularly useful for personalization in on-device systems", - "chapter_source": "emerging_challenges", - "aliases": [], - "see_also": [], - "appears_in": [ - "emerging_challenges", - "ondevice_learning" - ] - }, - { - "term": "microcontroller", - "definition": "A compact integrated circuit designed to govern specific operations in embedded systems, typically featuring limited processing power and memory but optimized for low power consumption and real-time applications.", - "chapter_source": "ai_good", - "aliases": [], - "see_also": [] - }, - { - "term": "minimax", - "definition": "A decision-making strategy used in game theory that attempts to minimize the maximum possible loss in adversarial scenarios.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "mixed precision training", - "definition": "A technique that uses different numerical precisions for different parts of neural network training, typically combining 16-bit and 32-bit floating-point arithmetic to reduce memory usage and increase training speed.", - "chapter_source": "sustainable_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "mixture of experts", - "definition": "An architectural approach that uses multiple specialized sub-models (experts) with a gating mechanism to route inputs to the most relevant experts, enabling efficient scaling while maintaining sparsity.", - "chapter_source": "emerging_challenges", - "aliases": [], - "see_also": [] - }, - { - "term": "mobile ml", - "definition": "Machine learning systems optimized for mobile devices like smartphones and tablets, balancing computational efficiency with inference accuracy for on-device processing.", - "chapter_source": "ai_good", - "aliases": [], - "see_also": [] - }, - { - "term": "mobile-optimized architectures", - "definition": "Neural network designs specifically created for mobile deployment, emphasizing parameter efficiency, computational speed, and energy conservation.", - "chapter_source": "ondevice_learning", - "aliases": [], - "see_also": [] - }, - { - "term": "mobilenet", - "definition": "A family of efficient neural network architectures designed for mobile devices using depthwise separable convolutions to achieve significant reductions in model size and computation.", - "chapter_source": "ondevice_learning", - "aliases": [], - "see_also": [] - }, - { - "term": "mode collapse", - "definition": "A failure mode in generative models where the model produces only a limited variety of outputs, ignoring the diversity present in the training data and failing to capture the full distribution.", - "chapter_source": "emerging_challenges", - "aliases": [], - "see_also": [] - }, - { - "term": "model cards", - "definition": "Documentation framework that provides structured information about machine learning models, including intended use, performance characteristics, and limitations.", - "chapter_source": "responsible_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "model compression", - "definition": "Techniques to reduce the size and computational requirements of machine learning models through methods like quantization, pruning, and knowledge distillation to enable deployment on resource-constrained devices", - "chapter_source": "ai_good", - "aliases": [], - "see_also": [], - "appears_in": [ - "ai_good", - "ondevice_learning", - "sustainable_ai" - ] - }, - { - "term": "model extraction", - "definition": "The process of stealing or recreating a machine learning model by observing its input-output behavior, often through systematic querying of model APIs.", - "chapter_source": "security_privacy", - "aliases": [], - "see_also": [] - }, - { - "term": "model inversion attack", - "definition": "An attack that attempts to reconstruct training data or infer sensitive information about the dataset by analyzing a model's outputs and confidence scores.", - "chapter_source": "security_privacy", - "aliases": [], - "see_also": [] - }, - { - "term": "model pruning", - "definition": "The process of removing unnecessary weights, neurons, or connections from a trained neural network to reduce its size and computational requirements.", - "chapter_source": "sustainable_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "model quantization", - "definition": "A technique that reduces the precision of model parameters (typically from 32-bit to 8-bit or lower) to decrease model size and computational requirements while maintaining acceptable accuracy.", - "chapter_source": "ai_good", - "aliases": [], - "see_also": [] - }, - { - "term": "model uncertainty", - "definition": "The inadequacy of a machine learning model to capture the full complexity of the underlying data-generating process, leading to prediction uncertainty.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "model watermarking", - "definition": "A technique for embedding verifiable ownership signatures into machine learning models that can be used to detect unauthorized use or prove intellectual property theft.", - "chapter_source": "security_privacy", - "aliases": [], - "see_also": [] - }, - { - "term": "monte carlo dropout", - "definition": "A technique that uses multiple forward passes with different dropout masks at inference time to estimate prediction uncertainty.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "moore's law", - "definition": "The observation that the number of transistors on a microchip doubles approximately every two years while the cost of computers is halved.", - "chapter_source": "sustainable_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "multi-agent approach", - "definition": "Systems architecture where multiple AI agents collaborate, negotiate, or compete to solve complex problems, enabling division of labor and specialized expertise across different components.", - "chapter_source": "emerging_challenges", - "aliases": [], - "see_also": [] - }, - { - "term": "multicalibration", - "definition": "A fairness technique ensuring that model predictions remain calibrated across intersecting subgroups, addressing complex demographic interactions.", - "chapter_source": "responsible_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "multimodal ai", - "definition": "AI systems that can process and understand multiple types of data simultaneously, such as text, images, audio, and video, enabling more comprehensive understanding and interaction.", - "chapter_source": "emerging_challenges", - "aliases": [], - "see_also": [] - }, - { - "term": "narrow ai", - "definition": "AI systems designed to excel at specific, well-defined tasks but lacking the ability to generalize across diverse problem domains, in contrast to artificial general intelligence.", - "chapter_source": "emerging_challenges", - "aliases": [], - "see_also": [] - }, - { - "term": "neural architecture search", - "definition": "Automated methods for designing optimal neural network architectures, using algorithms to explore the space of possible network designs and find the best performing structures", - "chapter_source": "emerging_challenges", - "aliases": [], - "see_also": [], - "appears_in": [ - "emerging_challenges", - "sustainable_ai" - ] - }, - { - "term": "neural engine", - "definition": "Specialized hardware accelerators designed for machine learning inference and training, such as Apple's Neural Engine or Google's Edge TPU, optimized for on-device AI workloads.", - "chapter_source": "ondevice_learning", - "aliases": [], - "see_also": [] - }, - { - "term": "neural network", - "definition": "A computational model inspired by biological neural networks, consisting of interconnected nodes (neurons) organized in layers that can learn complex patterns from data.", - "chapter_source": "sustainable_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "neuromorphic computing", - "definition": "Computing architectures inspired by the structure and function of biological neural networks, designed to process information more efficiently than traditional digital computers.", - "chapter_source": "emerging_challenges", - "aliases": [], - "see_also": [] - }, - { - "term": "non-iid data", - "definition": "Non-independent and identically distributed data where samples are not uniformly distributed across devices or time, creating challenges for federated learning convergence and generalization.", - "chapter_source": "ondevice_learning", - "aliases": [], - "see_also": [] - }, - { - "term": "on-device learning", - "definition": "The local adaptation or training of machine learning models directly on deployed hardware devices without reliance on continuous connectivity to centralized servers.", - "chapter_source": "ondevice_learning", - "aliases": [], - "see_also": [] - }, - { - "term": "orchestration", - "definition": "The coordination and management of multiple AI systems or agents working together, ensuring proper sequencing, communication, and resource allocation across distributed intelligence systems.", - "chapter_source": "emerging_challenges", - "aliases": [], - "see_also": [] - }, - { - "term": "oxide breakdown", - "definition": "The failure of an oxide layer in transistors due to excessive electric field stress, causing permanent hardware faults.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "parameter", - "definition": "A learnable variable in a machine learning model, such as weights and biases in neural networks, that are adjusted during training to optimize performance.", - "chapter_source": "sustainable_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "permanent faults", - "definition": "Hardware defects that persist irreversibly until repair or component replacement, consistently affecting system behavior.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "personalization layers", - "definition": "Model components, typically the final classification layers, that are adapted locally to user-specific data while keeping shared backbone layers frozen.", - "chapter_source": "ondevice_learning", - "aliases": [], - "see_also": [] - }, - { - "term": "physical attack", - "definition": "Direct manipulation or tampering with computing hardware to compromise the security and integrity of machine learning systems, bypassing traditional software defenses.", - "chapter_source": "security_privacy", - "aliases": [], - "see_also": [] - }, - { - "term": "post-hoc explanations", - "definition": "Explanation methods applied after model training that treat the model as a black box and infer reasoning patterns from input-output behavior.", - "chapter_source": "responsible_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "power usage effectiveness", - "definition": "A metric used to determine the energy efficiency of a data center, calculated as the ratio of total facility energy consumption to IT equipment energy consumption.", - "chapter_source": "sustainable_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "precision agriculture", - "definition": "The use of technology including GPS, sensors, and machine learning to optimize farming practices by precisely monitoring and managing crop inputs like water, fertilizer, and pesticides.", - "chapter_source": "ai_good", - "aliases": [], - "see_also": [] - }, - { - "term": "principle of least privilege", - "definition": "A security concept where users are given the minimum access levels necessary to complete their job functions, reducing security risks.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "privacy budget", - "definition": "A concept in differential privacy that represents the total amount of privacy loss allowed across all queries or computations, with each operation consuming part of this finite budget.", - "chapter_source": "security_privacy", - "aliases": [], - "see_also": [] - }, - { - "term": "privacy-preserving machine learning", - "definition": "Techniques and approaches that enable machine learning while protecting the privacy of individuals whose data is used for training or inference.", - "chapter_source": "security_privacy", - "aliases": [], - "see_also": [] - }, - { - "term": "privacy-preserving techniques", - "definition": "Methods designed to protect individual privacy in machine learning, including differential privacy, federated learning, and local processing.", - "chapter_source": "responsible_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "privacy-utility tradeoff", - "definition": "The fundamental tension between preserving individual privacy and maintaining the utility of data for machine learning, requiring careful balance through techniques like differential privacy.", - "chapter_source": "security_privacy", - "aliases": [], - "see_also": [] - }, - { - "term": "progressive enhancement pattern", - "definition": "A design pattern that establishes baseline functionality under minimal resource conditions and incrementally incorporates advanced features as additional resources become available.", - "chapter_source": "ai_good", - "aliases": [], - "see_also": [] - }, - { - "term": "prompt engineering", - "definition": "The practice of designing and optimizing text prompts to effectively communicate with large language models and achieve desired outputs from AI systems.", - "chapter_source": "emerging_challenges", - "aliases": [], - "see_also": [] - }, - { - "term": "pruning", - "definition": "A model compression technique that removes unnecessary connections or neurons from neural networks to reduce model size and computational requirements without significantly impacting performance.", - "chapter_source": "ondevice_learning", - "aliases": [], - "see_also": [] - }, - { - "term": "quantization", - "definition": "The process of reducing the precision of model weights and activations from floating-point to lower-bit representations to decrease memory usage and accelerate computation on edge devices", - "chapter_source": "ondevice_learning", - "aliases": [], - "see_also": [], - "appears_in": [ - "ondevice_learning", - "sustainable_ai" - ] - }, - { - "term": "quantum machine learning", - "definition": "The intersection of quantum computing and machine learning, exploring how quantum algorithms and quantum computers can enhance or transform machine learning tasks.", - "chapter_source": "emerging_challenges", - "aliases": [], - "see_also": [] - }, - { - "term": "regularization", - "definition": "Methods used in machine learning to prevent overfitting by adding penalty terms to the loss function, constraining model complexity.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "renewable energy", - "definition": "Energy collected from renewable resources that are naturally replenished, including solar, wind, hydroelectric, geothermal, and biomass sources.", - "chapter_source": "sustainable_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "resource paradox", - "definition": "The challenge in social impact applications where areas with the greatest needs often lack the basic infrastructure required for traditional technology deployments, requiring innovative engineering solutions.", - "chapter_source": "ai_good", - "aliases": [], - "see_also": [] - }, - { - "term": "resource-constrained environments", - "definition": "Deployment contexts with limited computational power, network bandwidth, or power availability, typically requiring specialized system design and optimization techniques.", - "chapter_source": "ai_good", - "aliases": [], - "see_also": [] - }, - { - "term": "responsible ai", - "definition": "The practice of developing and deploying AI systems in ways that are ethical, fair, transparent, and beneficial to society while minimizing potential harms and biases", - "chapter_source": "emerging_challenges", - "aliases": [], - "see_also": [], - "appears_in": [ - "emerging_challenges", - "responsible_ai" - ] - }, - { - "term": "reward hacking", - "definition": "The phenomenon where AI systems exploit unintended aspects of reward functions to maximize scores while violating the intended objectives.", - "chapter_source": "responsible_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "rlhf", - "definition": "Reinforcement Learning from Human Feedback - a training method that uses human preferences to guide model behavior, enabling AI systems to better align with human values and intentions.", - "chapter_source": "emerging_challenges", - "aliases": [], - "see_also": [] - }, - { - "term": "robust ai", - "definition": "The ability of artificial intelligence systems to maintain performance and reliability despite internal errors, external perturbations, and environmental changes.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "robustness", - "definition": "A model's ability to maintain stable and consistent performance under input variations, environmental changes, or adversarial conditions.", - "chapter_source": "responsible_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "robustness metrics", - "definition": "Quantitative measures for evaluating model stability under various perturbations, including adversarial accuracy, certified robustness bounds, and performance under distribution shift.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "scaling laws", - "definition": "Mathematical relationships demonstrating power-law scaling between model size, dataset size, compute budget, and performance, suggesting predictable improvements with increased resources.", - "chapter_source": "emerging_challenges", - "aliases": [], - "see_also": [] - }, - { - "term": "scan chains", - "definition": "Dedicated test paths in processors that provide access to internal registers and logic for comprehensive hardware testing and fault detection.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "scope 1 emissions", - "definition": "Direct greenhouse gas emissions from sources owned or controlled by an organization, such as on-site fuel combustion and company vehicles.", - "chapter_source": "sustainable_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "scope 2 emissions", - "definition": "Indirect greenhouse gas emissions from the generation of purchased electricity, steam, heating, or cooling consumed by an organization.", - "chapter_source": "sustainable_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "scope 3 emissions", - "definition": "All other indirect greenhouse gas emissions that occur in an organization's value chain, including manufacturing, transportation, and end-of-life disposal.", - "chapter_source": "sustainable_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "secure aggregation", - "definition": "A cryptographic protocol that enables federated learning servers to compute aggregate model updates without accessing individual client contributions, enhancing privacy protection", - "chapter_source": "ondevice_learning", - "aliases": [], - "see_also": [], - "appears_in": [ - "ondevice_learning", - "security_privacy" - ] - }, - { - "term": "secure computation", - "definition": "Cryptographic protocols that enable multiple parties to jointly compute functions over private inputs without revealing those inputs to each other.", - "chapter_source": "security_privacy", - "aliases": [], - "see_also": [] - }, - { - "term": "secure multi-party computation", - "definition": "A cryptographic method that allows multiple parties to jointly compute a function over their private inputs without revealing those inputs to each other.", - "chapter_source": "security_privacy", - "aliases": [], - "see_also": [] - }, - { - "term": "selective computation", - "definition": "Computational strategies that dynamically allocate processing resources based on input complexity or current needs, improving efficiency by avoiding unnecessary computation.", - "chapter_source": "emerging_challenges", - "aliases": [], - "see_also": [] - }, - { - "term": "self-refinement", - "definition": "A training approach where models iteratively improve their own outputs by critiquing and refining their initial responses, enabling continuous improvement and better alignment with desired behaviors.", - "chapter_source": "emerging_challenges", - "aliases": [], - "see_also": [] - }, - { - "term": "self-supervised learning", - "definition": "A machine learning paradigm where models learn representations from unlabeled data by predicting parts of the input from other parts, reducing dependence on manually labeled datasets.", - "chapter_source": "emerging_challenges", - "aliases": [], - "see_also": [] - }, - { - "term": "side-channel attack", - "definition": "An attack that exploits information leaked through the physical implementation of computing systems, such as power consumption, electromagnetic emissions, or timing variations.", - "chapter_source": "security_privacy", - "aliases": [], - "see_also": [] - }, - { - "term": "silent data corruption (sdc)", - "definition": "Undetected errors during computation or data transfer that propagate through system layers without triggering alerts, potentially compromising results.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "smallholder farmers", - "definition": "Farmers operating on plots smaller than 2 hectares who produce a significant portion of global food supply but often lack access to modern agricultural technology and credit.", - "chapter_source": "ai_good", - "aliases": [], - "see_also": [] - }, - { - "term": "social impact measurement", - "definition": "Systematic evaluation of how AI applications affect communities and individuals, including metrics for accessibility, equity, effectiveness, and unintended consequences.", - "chapter_source": "ai_good", - "aliases": [], - "see_also": [] - }, - { - "term": "software fault", - "definition": "Unintended behavior in software systems resulting from defects, bugs, or design oversights that can impair performance or compromise security.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "sparse training", - "definition": "A training approach that maintains sparsity in neural network weights throughout the training process, reducing computational requirements and memory usage.", - "chapter_source": "sustainable_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "sparse updates", - "definition": "A training strategy that selectively updates only a subset of model parameters based on their importance or contribution to performance, reducing computational and memory overhead.", - "chapter_source": "ondevice_learning", - "aliases": [], - "see_also": [] - }, - { - "term": "specification gaming", - "definition": "When AI systems find unexpected ways to achieve high rewards that technically satisfy the objective function but violate the intended purpose.", - "chapter_source": "responsible_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "speculative execution", - "definition": "A performance optimization in processors that executes instructions before confirming they are needed, which can inadvertently expose sensitive data through microarchitectural side channels.", - "chapter_source": "security_privacy", - "aliases": [], - "see_also": [] - }, - { - "term": "state space models", - "definition": "Neural architectures that process sequences by maintaining compressed memory representations that update incrementally, offering linear scaling advantages over transformer attention mechanisms.", - "chapter_source": "emerging_challenges", - "aliases": [], - "see_also": [] - }, - { - "term": "stochastic computing", - "definition": "Computing techniques that use random bits and probabilistic operations to perform arithmetic, potentially offering better fault tolerance than traditional methods.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "stuck-at fault", - "definition": "A permanent hardware fault where a signal line becomes fixed at a logical 0 or 1 regardless of input, causing incorrect computations.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "supply chain attack", - "definition": "An attack that compromises hardware or software components during the manufacturing, distribution, or integration process, potentially affecting multiple downstream systems.", - "chapter_source": "security_privacy", - "aliases": [], - "see_also": [] - }, - { - "term": "sustainable ai", - "definition": "The practice of developing and deploying artificial intelligence systems that minimize environmental impact while maintaining effectiveness and accessibility.", - "chapter_source": "sustainable_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "sustainable development goals", - "definition": "A collection of 17 global goals adopted by the United Nations to address pressing social, economic, and environmental challenges by 2030, providing a framework for AI applications in social good.", - "chapter_source": "ai_good", - "aliases": [], - "see_also": [] - }, - { - "term": "swarm intelligence", - "definition": "Collective intelligence emerging from decentralized, self-organized systems, often inspired by biological swarms and applied to distributed ML systems and robotics.", - "chapter_source": "emerging_challenges", - "aliases": [], - "see_also": [] - }, - { - "term": "synthetic data generation", - "definition": "The creation of artificial datasets that approximate the statistical properties of real data while reducing privacy risks and avoiding direct exposure of sensitive information.", - "chapter_source": "security_privacy", - "aliases": [], - "see_also": [] - }, - { - "term": "system-wide sustainability", - "definition": "Holistic approach to environmental responsibility that considers the entire AI infrastructure ecosystem, from data centers to edge devices, rather than optimizing individual components in isolation.", - "chapter_source": "sustainable_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "targeted attack", - "definition": "A type of data poisoning attack that aims to cause misclassification of specific inputs or classes while leaving the model's general performance largely intact.", - "chapter_source": "security_privacy", - "aliases": [], - "see_also": [] - }, - { - "term": "thermal stress", - "definition": "Hardware degradation caused by repeated cycling through high and low temperatures, leading to material fatigue and potential failures.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "tiny ml", - "definition": "Machine learning systems designed to run on extremely resource-constrained devices like microcontrollers, typically with models under 1 MB and power consumption under 150 mW.", - "chapter_source": "ai_good", - "aliases": [], - "see_also": [] - }, - { - "term": "tinyml", - "definition": "A field focused on deploying machine learning models on microcontrollers and extremely resource-constrained devices with kilobytes of memory and milliwatts of power consumption.", - "chapter_source": "ondevice_learning", - "aliases": [], - "see_also": [] - }, - { - "term": "tpu", - "definition": "Tensor Processing Unit, a specialized AI accelerator chip developed by Google specifically designed for machine learning workloads, particularly neural network computations.", - "chapter_source": "sustainable_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "training", - "definition": "The process of teaching a machine learning model to make predictions by showing it examples and adjusting its parameters based on performance feedback.", - "chapter_source": "sustainable_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "transfer learning", - "definition": "A machine learning technique that uses knowledge from a pretrained model on one task to improve learning on a related task, enabling efficient adaptation with limited data", - "chapter_source": "emerging_challenges", - "aliases": [], - "see_also": [], - "appears_in": [ - "emerging_challenges", - "ondevice_learning", - "robust_ai", - "sustainable_ai" - ] - }, - { - "term": "transformer", - "definition": "A neural network architecture that uses self-attention mechanisms to process sequential data, forming the foundation for many modern language models.", - "chapter_source": "sustainable_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "transformer architecture", - "definition": "A neural network architecture based on attention mechanisms that has revolutionized natural language processing and is increasingly applied to other domains like computer vision.", - "chapter_source": "emerging_challenges", - "aliases": [], - "see_also": [] - }, - { - "term": "transient faults", - "definition": "Temporary hardware faults that do not persist or cause permanent damage but can lead to incorrect computations if not handled properly.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "transparency", - "definition": "Openness about how AI systems are built, trained, validated, and deployed, including disclosure of data sources, design assumptions, and limitations.", - "chapter_source": "responsible_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "triple modular redundancy (tmr)", - "definition": "A fault-tolerance technique where three instances of a computation are performed, with majority voting determining the correct result.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "trusted execution environment", - "definition": "A secure area within a processor that provides hardware-based protection for code and data, ensuring confidentiality and integrity even from privileged system software.", - "chapter_source": "security_privacy", - "aliases": [], - "see_also": [] - }, - { - "term": "value alignment", - "definition": "The principle that AI systems should pursue goals consistent with human intent and ethical norms, addressing the challenge of encoding human values in machine objectives.", - "chapter_source": "responsible_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "value-sensitive design", - "definition": "A methodology for incorporating human values into technology design through systematic stakeholder engagement and ethical consideration of system impacts.", - "chapter_source": "responsible_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "vector-borne diseases", - "definition": "Diseases transmitted by insects or other vectors, such as malaria carried by mosquitoes, which can be monitored and controlled using machine learning-powered detection systems.", - "chapter_source": "ai_good", - "aliases": [], - "see_also": [] - }, - { - "term": "vision-language models", - "definition": "AI systems that can understand and reason about both visual and textual information simultaneously, enabling tasks like image captioning, visual question answering, and multimodal understanding.", - "chapter_source": "emerging_challenges", - "aliases": [], - "see_also": [] - }, - { - "term": "watchdog timer", - "definition": "A hardware component that monitors system execution and triggers recovery actions if the system becomes unresponsive or stuck.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "water usage effectiveness", - "definition": "A metric that measures the efficiency of water use in data centers, calculated as the ratio of total water consumed to IT equipment energy consumption.", - "chapter_source": "sustainable_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "weight freezing", - "definition": "A technique that fixes most model parameters during training while allowing only specific layers or components to be updated, reducing computational requirements for on-device adaptation.", - "chapter_source": "ondevice_learning", - "aliases": [], - "see_also": [] - }, - { - "term": "white-box attack", - "definition": "An adversarial attack where the attacker has complete knowledge of the model's architecture, parameters, training data, and internal workings, enabling highly effective attack strategies.", - "chapter_source": "security_privacy", - "aliases": [], - "see_also": [] - }, - { - "term": "zero-day vulnerability", - "definition": "A previously unknown security flaw in software or hardware that can be exploited by attackers before developers have had a chance to create and distribute a patch.", - "chapter_source": "security_privacy", - "aliases": [], - "see_also": [] - }, - { - "term": "zero-shot learning", - "definition": "The ability of machine learning models to perform tasks or classify objects they have never seen during training, often achieved through sophisticated representation learning or large-scale pre-training.", - "chapter_source": "emerging_challenges", - "aliases": [], - "see_also": [] - } - ] -} \ No newline at end of file diff --git a/book/quarto/contents/vol2/edge_intelligence/edge_intelligence.qmd b/book/quarto/contents/vol2/edge_intelligence/edge_intelligence.qmd index 2efeae91e7..5db05b55d8 100644 --- a/book/quarto/contents/vol2/edge_intelligence/edge_intelligence.qmd +++ b/book/quarto/contents/vol2/edge_intelligence/edge_intelligence.qmd @@ -1,7 +1,6 @@ --- quiz: edge_intelligence_quizzes.json concepts: edge_intelligence_concepts.yml -glossary: edge_intelligence_glossary.json engine: jupyter --- diff --git a/book/quarto/contents/vol2/edge_intelligence/edge_intelligence_glossary.json b/book/quarto/contents/vol2/edge_intelligence/edge_intelligence_glossary.json deleted file mode 100644 index 1dc6f6d3ed..0000000000 --- a/book/quarto/contents/vol2/edge_intelligence/edge_intelligence_glossary.json +++ /dev/null @@ -1,257 +0,0 @@ -{ - "metadata": { - "chapter": "ondevice_learning", - "version": "1.0.0", - "generated": "2025-09-15T14:08:03.499787", - "total_terms": 35, - "standardized": true, - "last_updated": "2025-09-15T15:01:37.288695" - }, - "terms": [ - { - "term": "adapter modules", - "definition": "Small trainable neural network components inserted between frozen layers of a pretrained model to enable lightweight adaptation without modifying the base architecture.", - "chapter_source": "ondevice_learning", - "aliases": [], - "see_also": [] - }, - { - "term": "backpropagation", - "definition": "The algorithm for computing gradients in neural networks by propagating error signals backward through layers, essential for training but computationally expensive on resource-constrained devices.", - "chapter_source": "ondevice_learning", - "aliases": [], - "see_also": [] - }, - { - "term": "bias-only adaptation", - "definition": "A lightweight training strategy that freezes all model weights and updates only scalar bias terms, drastically reducing memory requirements and computational overhead for on-device learning.", - "chapter_source": "ondevice_learning", - "aliases": [], - "see_also": [] - }, - { - "term": "catastrophic forgetting", - "definition": "The phenomenon where neural networks lose previously learned knowledge when adapting to new tasks, a critical challenge in continual on-device learning scenarios.", - "chapter_source": "ondevice_learning", - "aliases": [], - "see_also": [] - }, - { - "term": "client scheduling", - "definition": "The process of selecting which devices participate in federated learning rounds based on availability, data quality, and resource constraints to ensure representative model updates.", - "chapter_source": "ondevice_learning", - "aliases": [], - "see_also": [] - }, - { - "term": "continual learning", - "definition": "The ability of machine learning models to learn new tasks sequentially without forgetting previously acquired knowledge, essential for adaptive on-device systems.", - "chapter_source": "ondevice_learning", - "aliases": [], - "see_also": [] - }, - { - "term": "data compression", - "definition": "Techniques for reducing the size and complexity of training data through encoding, quantization, or feature extraction to enable efficient storage and processing on memory-constrained devices.", - "chapter_source": "ondevice_learning", - "aliases": [], - "see_also": [] - }, - { - "term": "depthwise separable convolutions", - "definition": "A computational technique that decomposes standard convolutions into depthwise and pointwise operations, reducing parameters and computation by 8-9x for mobile-optimized architectures.", - "chapter_source": "ondevice_learning", - "aliases": [], - "see_also": [] - }, - { - "term": "differential privacy", - "definition": "A mathematical framework for quantifying and limiting privacy leakage by adding calibrated noise to data or model updates, commonly used in federated learning.", - "chapter_source": "ondevice_learning", - "aliases": [], - "see_also": [] - }, - { - "term": "edge computing", - "definition": "A distributed computing paradigm that brings computation and data storage closer to data sources, enabling real-time processing with reduced latency and bandwidth requirements.", - "chapter_source": "ondevice_learning", - "aliases": [], - "see_also": [] - }, - { - "term": "experience replay", - "definition": "A memory-based technique that stores past training examples in a buffer to prevent catastrophic forgetting and stabilize learning in streaming or continual adaptation scenarios.", - "chapter_source": "ondevice_learning", - "aliases": [], - "see_also": [] - }, - { - "term": "federated averaging", - "definition": "The standard algorithm for federated learning where client model updates are aggregated using weighted averaging based on local dataset sizes to produce a global model.", - "chapter_source": "ondevice_learning", - "aliases": [], - "see_also": [] - }, - { - "term": "federated learning", - "definition": "A distributed machine learning approach where models are trained across multiple devices using local data, with model updates shared rather than raw data to reduce raw-data movement and support privacy-preserving workflows.", - "chapter_source": "ondevice_learning", - "aliases": [], - "see_also": [] - }, - { - "term": "few-shot learning", - "definition": "A machine learning paradigm that enables models to adapt to new tasks using only a small number of labeled examples, critical for data-sparse on-device scenarios.", - "chapter_source": "ondevice_learning", - "aliases": [], - "see_also": [] - }, - { - "term": "gdpr", - "definition": "The General Data Protection Regulation, a European Union law that imposes strict requirements on personal data processing and significantly influences privacy-preserving machine learning design.", - "chapter_source": "ondevice_learning", - "aliases": [], - "see_also": [] - }, - { - "term": "gradient descent", - "definition": "An optimization algorithm that iteratively updates model parameters by moving in the direction opposite to the gradient of the loss function, fundamental to neural network training.", - "chapter_source": "ondevice_learning", - "aliases": [], - "see_also": [] - }, - { - "term": "knowledge distillation", - "definition": "A technique for transferring knowledge from a larger teacher model to a smaller student model, enabling deployment of compact models on resource-constrained devices.", - "chapter_source": "ondevice_learning", - "aliases": [], - "see_also": [] - }, - { - "term": "low-rank adaptation", - "definition": "A parameter-efficient fine-tuning method that approximates weight updates using low-rank matrices, reducing trainable parameters while maintaining adaptation capability.", - "chapter_source": "ondevice_learning", - "aliases": [], - "see_also": [] - }, - { - "term": "meta-learning", - "definition": "The process of learning how to learn, where models are trained to quickly adapt to new tasks with minimal data, particularly useful for personalization in on-device systems.", - "chapter_source": "ondevice_learning", - "aliases": [], - "see_also": [] - }, - { - "term": "mobilenet", - "definition": "A family of efficient neural network architectures designed for mobile devices using depthwise separable convolutions to achieve significant reductions in model size and computation.", - "chapter_source": "ondevice_learning", - "aliases": [], - "see_also": [] - }, - { - "term": "model compression", - "definition": "Techniques for reducing model size and computational requirements through methods like quantization, pruning, and knowledge distillation to enable deployment on edge devices.", - "chapter_source": "ondevice_learning", - "aliases": [], - "see_also": [] - }, - { - "term": "neural engine", - "definition": "Specialized hardware accelerators designed primarily for efficient machine learning inference, with limited adaptation or training support depending on the platform and software stack.", - "chapter_source": "ondevice_learning", - "aliases": [], - "see_also": [] - }, - { - "term": "non-iid data", - "definition": "Non-independent and identically distributed data where samples are not uniformly distributed across devices or time, creating challenges for federated learning convergence and generalization.", - "chapter_source": "ondevice_learning", - "aliases": [], - "see_also": [] - }, - { - "term": "on-device learning", - "definition": "The local adaptation or training of machine learning models directly on deployed hardware devices without reliance on continuous connectivity to centralized servers.", - "chapter_source": "ondevice_learning", - "aliases": [], - "see_also": [] - }, - { - "term": "personalization layers", - "definition": "Model components, typically the final classification layers, that are adapted locally to user-specific data while keeping shared backbone layers frozen.", - "chapter_source": "ondevice_learning", - "aliases": [], - "see_also": [] - }, - { - "term": "pruning", - "definition": "A model compression technique that removes unnecessary connections or neurons from neural networks to reduce model size and computational requirements without significantly impacting performance.", - "chapter_source": "ondevice_learning", - "aliases": [], - "see_also": [] - }, - { - "term": "quantization", - "definition": "The process of reducing the precision of model weights and activations from floating-point to lower-bit representations to decrease memory usage and accelerate computation on edge devices.", - "chapter_source": "ondevice_learning", - "aliases": [], - "see_also": [] - }, - { - "term": "secure aggregation", - "definition": "A cryptographic protocol that enables federated learning servers to compute aggregate model updates without accessing individual client contributions, enhancing privacy protection.", - "chapter_source": "ondevice_learning", - "aliases": [], - "see_also": [] - }, - { - "term": "sparse updates", - "definition": "A training strategy that selectively updates only a subset of model parameters based on their importance or contribution to performance, reducing computational and memory overhead.", - "chapter_source": "ondevice_learning", - "aliases": [], - "see_also": [] - }, - { - "term": "tinyml", - "definition": "A field focused on deploying machine learning models on microcontrollers and extremely resource-constrained devices with kilobytes of memory and milliwatts of power consumption.", - "chapter_source": "ondevice_learning", - "aliases": [], - "see_also": [] - }, - { - "term": "transfer learning", - "definition": "A machine learning technique that uses knowledge from a pretrained model on one task to improve learning on a related task, enabling efficient adaptation with limited data.", - "chapter_source": "ondevice_learning", - "aliases": [], - "see_also": [] - }, - { - "term": "weight freezing", - "definition": "A technique that fixes most model parameters during training while allowing only specific layers or components to be updated, reducing computational requirements for on-device adaptation.", - "chapter_source": "ondevice_learning", - "aliases": [], - "see_also": [] - }, - { - "term": "edge training", - "definition": "The process of training or fine-tuning machine learning models directly on edge devices, enabling personalization and adaptation without requiring data transmission to cloud servers.", - "chapter_source": "ondevice_learning", - "aliases": [], - "see_also": [] - }, - { - "term": "hardware constraint optimization", - "definition": "Techniques for adapting ML algorithms and models to work within the memory, compute, and power limitations of mobile and embedded devices.", - "chapter_source": "ondevice_learning", - "aliases": [], - "see_also": [] - }, - { - "term": "mobile-optimized architectures", - "definition": "Neural network designs specifically created for mobile deployment, emphasizing parameter efficiency, computational speed, and energy conservation.", - "chapter_source": "ondevice_learning", - "aliases": [], - "see_also": [] - } - ] -} diff --git a/book/quarto/contents/vol2/responsible_ai/responsible_ai.qmd b/book/quarto/contents/vol2/responsible_ai/responsible_ai.qmd index 461ddf21b4..53b999e77d 100644 --- a/book/quarto/contents/vol2/responsible_ai/responsible_ai.qmd +++ b/book/quarto/contents/vol2/responsible_ai/responsible_ai.qmd @@ -2,7 +2,6 @@ engine: jupyter quiz: responsible_ai_quizzes.json concepts: responsible_ai_concepts.yml -glossary: responsible_ai_glossary.json --- # Responsible Engineering {#sec-responsible-ai} diff --git a/book/quarto/contents/vol2/responsible_ai/responsible_ai_glossary.json b/book/quarto/contents/vol2/responsible_ai/responsible_ai_glossary.json deleted file mode 100644 index 7b79805a31..0000000000 --- a/book/quarto/contents/vol2/responsible_ai/responsible_ai_glossary.json +++ /dev/null @@ -1,264 +0,0 @@ -{ - "metadata": { - "chapter": "responsible_ai", - "version": "1.0.0", - "generated": "2025-09-15T14:08:03.501964", - "total_terms": 36, - "standardized": true, - "last_updated": "2025-09-15T15:01:37.290168" - }, - "terms": [ - { - "term": "accountability", - "definition": "The mechanisms by which individuals or organizations are held responsible for the outcomes of AI systems, involving traceability, documentation, auditing, and the ability to remedy harms.", - "chapter_source": "responsible_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "adversarial example", - "definition": "Carefully crafted inputs that are nearly identical to legitimate inputs but cause machine learning models to make incorrect predictions with high confidence.", - "chapter_source": "responsible_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "adversarial training", - "definition": "A technique for improving model robustness by training on adversarial examples, helping models learn more stable decision boundaries.", - "chapter_source": "responsible_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "algorithmic fairness", - "definition": "The principle that automated systems should not disproportionately disadvantage individuals or groups based on protected attributes such as race, gender, or age.", - "chapter_source": "responsible_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "artificial intelligence", - "definition": "Computer systems designed to perform tasks that typically require human intelligence, including learning, reasoning, perception, and decision-making.", - "chapter_source": "responsible_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "automation bias", - "definition": "The tendency for humans to over-rely on automated system outputs even when clear errors are present, potentially compromising human oversight.", - "chapter_source": "responsible_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "concept bottleneck models", - "definition": "Neural network architectures that first predict interpretable intermediate concepts before making final predictions, combining deep learning power with transparency.", - "chapter_source": "responsible_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "counterfactual explanations", - "definition": "Explanations that describe how a model's output would change if specific input features were modified, particularly useful for understanding decision boundaries.", - "chapter_source": "responsible_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "demographic parity", - "definition": "A fairness criterion requiring that the probability of receiving a positive prediction is independent of group membership across protected attributes.", - "chapter_source": "responsible_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "differential privacy", - "definition": "A mathematical framework that provides formal guarantees about individual privacy by adding calibrated noise to computations or outputs.", - "chapter_source": "responsible_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "distribution shift", - "definition": "The mismatch between training data and real-world deployment conditions that can degrade model performance and reliability over time.", - "chapter_source": "responsible_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "equality of opportunity", - "definition": "A fairness criterion focused on ensuring equal true positive rates across groups, guaranteeing that qualified individuals are treated equally regardless of group membership.", - "chapter_source": "responsible_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "equalized odds", - "definition": "A fairness definition requiring that true positive and false positive rates are equal across different demographic groups.", - "chapter_source": "responsible_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "explainability", - "definition": "The ability of stakeholders to understand how a machine learning model produces its outputs through post-hoc explanation techniques.", - "chapter_source": "responsible_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "fairness constraints", - "definition": "Technical and policy restrictions designed to ensure equitable treatment across demographic groups in machine learning systems.", - "chapter_source": "responsible_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "federated learning", - "definition": "A distributed machine learning approach where models are trained across decentralized data sources without centralizing raw data.", - "chapter_source": "responsible_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "gdpr", - "definition": "The General Data Protection Regulation, European Union legislation that requires meaningful information about automated decision-making logic and grants individuals rights over their data.", - "chapter_source": "responsible_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "human oversight", - "definition": "The principle that human judgment should supervise, correct, or halt automated decisions, maintaining meaningful human control over AI systems.", - "chapter_source": "responsible_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "interpretability", - "definition": "The degree to which humans can understand the reasoning behind a machine learning model's predictions, often referring to inherently transparent models.", - "chapter_source": "responsible_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "machine learning lifecycle", - "definition": "The complete process of developing, deploying, and maintaining ML systems, from data collection through model retirement.", - "chapter_source": "responsible_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "machine unlearning", - "definition": "Techniques for removing the influence of specific data points from trained models without complete retraining, supporting data deletion rights.", - "chapter_source": "responsible_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "membership inference attacks", - "definition": "Privacy attacks that attempt to determine whether a specific data point was included in a model's training set by analyzing model behavior.", - "chapter_source": "responsible_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "model cards", - "definition": "Documentation framework that provides structured information about machine learning models, including intended use, performance characteristics, and limitations.", - "chapter_source": "responsible_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "multicalibration", - "definition": "A fairness technique ensuring that model predictions remain calibrated across intersecting subgroups, addressing complex demographic interactions.", - "chapter_source": "responsible_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "post-hoc explanations", - "definition": "Explanation methods applied after model training that treat the model as a black box and infer reasoning patterns from input-output behavior.", - "chapter_source": "responsible_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "privacy-preserving techniques", - "definition": "Methods designed to protect individual privacy in machine learning, including differential privacy, federated learning, and local processing.", - "chapter_source": "responsible_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "responsible ai", - "definition": "The development and deployment of machine learning systems that explicitly uphold ethical principles, minimize harm, and promote socially beneficial outcomes.", - "chapter_source": "responsible_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "reward hacking", - "definition": "The phenomenon where AI systems exploit unintended aspects of reward functions to maximize scores while violating the intended objectives.", - "chapter_source": "responsible_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "robustness", - "definition": "A model's ability to maintain stable and consistent performance under input variations, environmental changes, or adversarial conditions.", - "chapter_source": "responsible_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "specification gaming", - "definition": "When AI systems find unexpected ways to achieve high rewards that technically satisfy the objective function but violate the intended purpose.", - "chapter_source": "responsible_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "transparency", - "definition": "Openness about how AI systems are built, trained, validated, and deployed, including disclosure of data sources, design assumptions, and limitations.", - "chapter_source": "responsible_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "value alignment", - "definition": "The principle that AI systems should pursue goals consistent with human intent and ethical norms, addressing the challenge of encoding human values in machine objectives.", - "chapter_source": "responsible_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "value-sensitive design", - "definition": "A methodology for incorporating human values into technology design through systematic stakeholder engagement and ethical consideration of system impacts.", - "chapter_source": "responsible_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "bias detection", - "definition": "Systematic methods for identifying unfair discrimination or disparate treatment across different demographic groups in machine learning system outputs.", - "chapter_source": "responsible_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "bias mitigation", - "definition": "Techniques and interventions designed to reduce unfair discrimination in machine learning systems, applied during data collection, model training, or post-processing stages.", - "chapter_source": "responsible_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "governance frameworks", - "definition": "Structured approaches for managing responsible AI development including policies, procedures, oversight mechanisms, and accountability structures.", - "chapter_source": "responsible_ai", - "aliases": [], - "see_also": [] - } - ] -} diff --git a/book/quarto/contents/vol2/robust_ai/robust_ai.qmd b/book/quarto/contents/vol2/robust_ai/robust_ai.qmd index 9e1304c5b3..c48f1c1c0e 100644 --- a/book/quarto/contents/vol2/robust_ai/robust_ai.qmd +++ b/book/quarto/contents/vol2/robust_ai/robust_ai.qmd @@ -1,7 +1,6 @@ --- quiz: robust_ai_quizzes.json concepts: robust_ai_concepts.yml -glossary: robust_ai_glossary.json engine: jupyter --- diff --git a/book/quarto/contents/vol2/robust_ai/robust_ai_glossary.json b/book/quarto/contents/vol2/robust_ai/robust_ai_glossary.json deleted file mode 100644 index f7dc110476..0000000000 --- a/book/quarto/contents/vol2/robust_ai/robust_ai_glossary.json +++ /dev/null @@ -1,411 +0,0 @@ -{ - "metadata": { - "chapter": "robust_ai", - "version": "1.0.0", - "generated": "2025-09-15T14:08:03.502396", - "total_terms": 57, - "standardized": true, - "last_updated": "2025-09-15T15:01:37.290520" - }, - "terms": [ - { - "term": "adversarial attack", - "definition": "A deliberate attempt to deceive machine learning models by crafting carefully designed inputs that cause incorrect predictions or behaviors while appearing benign to humans.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "adversarial example", - "definition": "Maliciously crafted inputs designed to fool machine learning models into making incorrect predictions, often by adding imperceptible perturbations to legitimate data.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "adversarial training", - "definition": "A defense technique that involves training models on adversarial examples to improve their robustness and ability to correctly classify adversarial inputs.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "anomaly detection", - "definition": "The identification of patterns in data that do not conform to expected behavior, often used to detect outliers, faults, or malicious activities in systems.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "autoencoder", - "definition": "A neural network architecture that learns compressed data representations by minimizing reconstruction error, commonly used for anomaly detection and dimensionality reduction.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "backdoor attack", - "definition": "A type of data poisoning where hidden triggers are embedded in training data, causing models to behave maliciously when specific patterns are encountered during inference.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "bayesian neural networks", - "definition": "Neural networks that incorporate probability distributions over their weights, enabling uncertainty quantification in predictions and more robust decision making.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "bit flip", - "definition": "A hardware fault where a single bit in memory or a register unexpectedly changes its value from 0 to 1 or vice versa, potentially corrupting data or computations.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "built-in self-test (bist)", - "definition": "Hardware testing mechanisms that allow components to test themselves for faults using dedicated circuitry and predefined test patterns.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "checkpoint and restart mechanisms", - "definition": "Techniques that periodically save a program's state so it can resume from the last saved state after a failure, improving system resilience.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "combinational logic", - "definition": "Digital logic circuits where the output depends only on the current input states, not any past states or memory elements.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "concept drift", - "definition": "A change in the relationship between input features and target outputs over time, requiring model adaptation to maintain performance.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "continual learning", - "definition": "The ability of machine learning models to learn continuously from new data distributions while retaining knowledge from previous distributions without catastrophic forgetting.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "covariate shift", - "definition": "A type of distribution shift where the input distribution changes while the conditional relationship between inputs and outputs remains stable.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "data poisoning", - "definition": "An attack where training data is deliberately manipulated or corrupted to compromise model performance, behavior, or security during deployment.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "data sanitization", - "definition": "The process of deliberately and permanently removing or destroying data stored on memory devices to make it unrecoverable, ensuring data security.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "defensive distillation", - "definition": "A technique that trains a student model to mimic a teacher model's behavior using soft labels, reducing sensitivity to adversarial perturbations.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "distribution shift", - "definition": "The phenomenon where data encountered during model deployment differs from the training distribution, potentially degrading model performance.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "double modular redundancy (dmr)", - "definition": "A fault-tolerance technique where computations are duplicated across two independent systems to identify and correct errors through comparison.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "dual-use dilemma", - "definition": "The challenge of mitigating misuse of technology that has both positive and negative potential applications, particularly relevant in AI security.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "electromigration", - "definition": "The movement of metal atoms in a conductor under the influence of an electric field, potentially causing permanent hardware faults over time.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "ensemble methods", - "definition": "Machine learning approaches that combine predictions from multiple models to improve accuracy, robustness, and reliability compared to individual models.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "error-correcting codes", - "definition": "Methods used in data storage and transmission to detect and correct errors, improving system reliability and data integrity.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "f1 score", - "definition": "A measure of model accuracy that combines precision and recall into a single metric, calculated as their harmonic mean.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "fast gradient sign method (fgsm)", - "definition": "A gradient-based adversarial attack that generates adversarial examples by adding small perturbations in the direction of the gradient.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "fault tolerance", - "definition": "The ability of a system to continue operating correctly even when some of its components fail or encounter errors.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "glitches", - "definition": "Momentary deviations in voltage, current, or signal that can cause incorrect operation in digital systems and circuits.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "hardware redundancy", - "definition": "The duplication of critical hardware components to provide backup functionality and improve system reliability through voting mechanisms.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "heartbeat mechanisms", - "definition": "Periodic signals sent between system components to monitor health and detect failures, enabling timely fault detection and recovery.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "hot spares", - "definition": "Backup components kept ready to instantaneously replace failing components without disrupting system operation, providing redundancy.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "huber loss", - "definition": "A robust loss function used in regression that is less sensitive to outliers compared to squared error loss, improving training stability.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "intermittent faults", - "definition": "Hardware faults that occur sporadically and unpredictably, appearing and disappearing without consistent patterns, making diagnosis challenging.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "label shift", - "definition": "A type of distribution shift where the distribution of target labels changes while the conditional relationship between features and labels remains constant.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "lookup table", - "definition": "A data structure that replaces runtime computation with simpler array indexing operations, commonly used for performance optimization.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "machine learning operations (mlops)", - "definition": "The practice of deploying and maintaining machine learning models in production reliably and efficiently through automated pipelines.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "minimax", - "definition": "A decision-making strategy used in game theory that attempts to minimize the maximum possible loss in adversarial scenarios.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "model uncertainty", - "definition": "The inadequacy of a machine learning model to capture the full complexity of the underlying data-generating process, leading to prediction uncertainty.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "monte carlo dropout", - "definition": "A technique that uses multiple forward passes with different dropout masks at inference time to estimate prediction uncertainty.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "oxide breakdown", - "definition": "The failure of an oxide layer in transistors due to excessive electric field stress, causing permanent hardware faults.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "permanent faults", - "definition": "Hardware defects that persist irreversibly until repair or component replacement, consistently affecting system behavior.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "principle of least privilege", - "definition": "A security concept where users are given the minimum access levels necessary to complete their job functions, reducing security risks.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "regularization", - "definition": "Methods used in machine learning to prevent overfitting by adding penalty terms to the loss function, constraining model complexity.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "robust ai", - "definition": "The ability of artificial intelligence systems to maintain performance and reliability despite internal errors, external perturbations, and environmental changes.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "scan chains", - "definition": "Dedicated test paths in processors that provide access to internal registers and logic for comprehensive hardware testing and fault detection.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "silent data corruption (sdc)", - "definition": "Undetected errors during computation or data transfer that propagate through system layers without triggering alerts, potentially compromising results.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "software fault", - "definition": "Unintended behavior in software systems resulting from defects, bugs, or design oversights that can impair performance or compromise security.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "stochastic computing", - "definition": "Computing techniques that use random bits and probabilistic operations to perform arithmetic, potentially offering better fault tolerance than traditional methods.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "stuck-at fault", - "definition": "A permanent hardware fault where a signal line becomes fixed at a logical 0 or 1 regardless of input, causing incorrect computations.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "thermal stress", - "definition": "Hardware degradation caused by repeated cycling through high and low temperatures, leading to material fatigue and potential failures.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "transfer learning", - "definition": "A technique that uses knowledge gained from one domain to improve performance in another, helping models adapt to new distributions.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "transient faults", - "definition": "Temporary hardware faults that do not persist or cause permanent damage but can lead to incorrect computations if not handled properly.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "triple modular redundancy (tmr)", - "definition": "A fault-tolerance technique where three instances of a computation are performed, with majority voting determining the correct result.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "watchdog timer", - "definition": "A hardware component that monitors system execution and triggers recovery actions if the system becomes unresponsive or stuck.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "attack taxonomy", - "definition": "Systematic classification of cybersecurity threats and adversarial attacks against ML systems, organizing threats by method, target, and impact to guide defense strategies.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "distribution shift types", - "definition": "Formal categorization of changes in data distributions including covariate shift, label shift, concept drift, and domain shift, each requiring specific adaptation techniques.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "robustness metrics", - "definition": "Quantitative measures for evaluating model stability under various perturbations, including adversarial accuracy, certified robustness bounds, and performance under distribution shift.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "domain adaptation", - "definition": "Machine learning techniques that enable models trained on one domain to perform well on a different but related domain, addressing distribution mismatch challenges.", - "chapter_source": "robust_ai", - "aliases": [], - "see_also": [] - } - ] -} diff --git a/book/quarto/contents/vol2/security_privacy/security_privacy.qmd b/book/quarto/contents/vol2/security_privacy/security_privacy.qmd index f37a3880ea..ff2d87f86a 100644 --- a/book/quarto/contents/vol2/security_privacy/security_privacy.qmd +++ b/book/quarto/contents/vol2/security_privacy/security_privacy.qmd @@ -2,7 +2,6 @@ engine: jupyter quiz: security_privacy_quizzes.json concepts: security_privacy_concepts.yml -glossary: security_privacy_glossary.json --- # Security & Privacy {#sec-security-privacy} diff --git a/book/quarto/contents/vol2/security_privacy/security_privacy_glossary.json b/book/quarto/contents/vol2/security_privacy/security_privacy_glossary.json deleted file mode 100644 index 008c05b228..0000000000 --- a/book/quarto/contents/vol2/security_privacy/security_privacy_glossary.json +++ /dev/null @@ -1,264 +0,0 @@ -{ - "metadata": { - "chapter": "security_privacy", - "version": "1.0.0", - "generated": "2025-09-15T14:08:03.501518", - "total_terms": 37, - "standardized": true, - "last_updated": "2025-09-15T15:01:37.289819" - }, - "terms": [ - { - "term": "adversarial attack", - "definition": "A type of attack where carefully crafted inputs are designed to cause machine learning models to make incorrect predictions while remaining nearly indistinguishable from legitimate data to humans.", - "chapter_source": "security_privacy", - "aliases": [], - "see_also": [] - }, - { - "term": "adversarial example", - "definition": "A maliciously modified input that is designed to fool a machine learning model into making an incorrect prediction, often created by adding small, imperceptible perturbations to legitimate data.", - "chapter_source": "security_privacy", - "aliases": [], - "see_also": [] - }, - { - "term": "adversarial training", - "definition": "A defense technique that involves training machine learning models on adversarial examples to improve their robustness against adversarial attacks.", - "chapter_source": "security_privacy", - "aliases": [], - "see_also": [] - }, - { - "term": "anonymization", - "definition": "The process of removing or modifying personally identifiable information from datasets to protect individual privacy, though often insufficient against sophisticated re-identification attacks.", - "chapter_source": "security_privacy", - "aliases": [], - "see_also": [] - }, - { - "term": "availability attack", - "definition": "A type of data poisoning attack that aims to degrade the overall performance of a machine learning model by introducing noise or corrupting training data across multiple classes.", - "chapter_source": "security_privacy", - "aliases": [], - "see_also": [] - }, - { - "term": "backdoor attack", - "definition": "A type of attack where hidden triggers are embedded in a model during training, causing malicious behavior only when specific trigger patterns are present in the input.", - "chapter_source": "security_privacy", - "aliases": [], - "see_also": [] - }, - { - "term": "black-box attack", - "definition": "An adversarial attack where the attacker has no knowledge of the model's internal architecture, parameters, or training data, and must rely solely on querying the model and observing outputs.", - "chapter_source": "security_privacy", - "aliases": [], - "see_also": [] - }, - { - "term": "cache timing attack", - "definition": "A type of side-channel attack that exploits variations in memory cache access patterns to infer sensitive information about program execution or data.", - "chapter_source": "security_privacy", - "aliases": [], - "see_also": [] - }, - { - "term": "data poisoning", - "definition": "An attack method where adversaries inject carefully crafted malicious data points into the training dataset to manipulate model behavior in targeted or systematic ways.", - "chapter_source": "security_privacy", - "aliases": [], - "see_also": [] - }, - { - "term": "differential privacy", - "definition": "A mathematical framework that provides formal privacy guarantees by adding calibrated noise to computations, ensuring that the inclusion or exclusion of any individual's data has a provably limited effect on the output.", - "chapter_source": "security_privacy", - "aliases": [], - "see_also": [] - }, - { - "term": "exact model theft", - "definition": "An attack that aims to extract the precise internal structure, parameters, and architecture of a machine learning model, allowing complete reproduction of the original model.", - "chapter_source": "security_privacy", - "aliases": [], - "see_also": [] - }, - { - "term": "fault injection attack", - "definition": "A physical attack that deliberately disrupts hardware operations through techniques like voltage manipulation or electromagnetic interference to induce computational errors and compromise system integrity.", - "chapter_source": "security_privacy", - "aliases": [], - "see_also": [] - }, - { - "term": "federated learning", - "definition": "A distributed machine learning approach where models are trained across multiple devices or organizations without centralizing the raw data, helping preserve privacy by keeping data local.", - "chapter_source": "security_privacy", - "aliases": [], - "see_also": [] - }, - { - "term": "grey-box attack", - "definition": "An adversarial attack where the attacker has partial knowledge about the model, such as knowing the architecture but not the specific parameters or training data.", - "chapter_source": "security_privacy", - "aliases": [], - "see_also": [] - }, - { - "term": "hardware trojan", - "definition": "A malicious modification embedded in hardware components during manufacturing that can remain dormant under normal conditions but trigger harmful behavior when specific conditions are met.", - "chapter_source": "security_privacy", - "aliases": [], - "see_also": [] - }, - { - "term": "homomorphic encryption", - "definition": "A cryptographic technique that allows computations to be performed directly on encrypted data without decrypting it first, enabling privacy-preserving machine learning inference.", - "chapter_source": "security_privacy", - "aliases": [], - "see_also": [] - }, - { - "term": "machine learning security", - "definition": "The protection of data, models, and infrastructure from unauthorized access, manipulation, or disruption throughout the entire machine learning lifecycle.", - "chapter_source": "security_privacy", - "aliases": [], - "see_also": [] - }, - { - "term": "membership inference attack", - "definition": "An attack that attempts to determine whether a specific data point was included in a model's training dataset by analyzing the model's behavior and outputs.", - "chapter_source": "security_privacy", - "aliases": [], - "see_also": [] - }, - { - "term": "model extraction", - "definition": "The process of stealing or recreating a machine learning model by observing its input-output behavior, often through systematic querying of model APIs.", - "chapter_source": "security_privacy", - "aliases": [], - "see_also": [] - }, - { - "term": "model inversion attack", - "definition": "An attack that attempts to reconstruct training data or infer sensitive information about the dataset by analyzing a model's outputs and confidence scores.", - "chapter_source": "security_privacy", - "aliases": [], - "see_also": [] - }, - { - "term": "model watermarking", - "definition": "A technique for embedding verifiable ownership signatures into machine learning models that can be used to detect unauthorized use or prove intellectual property theft.", - "chapter_source": "security_privacy", - "aliases": [], - "see_also": [] - }, - { - "term": "physical attack", - "definition": "Direct manipulation or tampering with computing hardware to compromise the security and integrity of machine learning systems, bypassing traditional software defenses.", - "chapter_source": "security_privacy", - "aliases": [], - "see_also": [] - }, - { - "term": "privacy budget", - "definition": "A concept in differential privacy that represents the total amount of privacy loss allowed across all queries or computations, with each operation consuming part of this finite budget.", - "chapter_source": "security_privacy", - "aliases": [], - "see_also": [] - }, - { - "term": "privacy-preserving machine learning", - "definition": "Techniques and approaches that enable machine learning while protecting the privacy of individuals whose data is used for training or inference.", - "chapter_source": "security_privacy", - "aliases": [], - "see_also": [] - }, - { - "term": "secure aggregation", - "definition": "A cryptographic protocol used in federated learning to combine model updates from multiple parties without revealing individual contributions to the central server.", - "chapter_source": "security_privacy", - "aliases": [], - "see_also": [] - }, - { - "term": "secure multi-party computation", - "definition": "A cryptographic method that allows multiple parties to jointly compute a function over their private inputs without revealing those inputs to each other.", - "chapter_source": "security_privacy", - "aliases": [], - "see_also": [] - }, - { - "term": "side-channel attack", - "definition": "An attack that exploits information leaked through the physical implementation of computing systems, such as power consumption, electromagnetic emissions, or timing variations.", - "chapter_source": "security_privacy", - "aliases": [], - "see_also": [] - }, - { - "term": "speculative execution", - "definition": "A performance optimization in processors that executes instructions before confirming they are needed, which can inadvertently expose sensitive data through microarchitectural side channels.", - "chapter_source": "security_privacy", - "aliases": [], - "see_also": [] - }, - { - "term": "supply chain attack", - "definition": "An attack that compromises hardware or software components during the manufacturing, distribution, or integration process, potentially affecting multiple downstream systems.", - "chapter_source": "security_privacy", - "aliases": [], - "see_also": [] - }, - { - "term": "synthetic data generation", - "definition": "The creation of artificial datasets that approximate the statistical properties of real data while reducing privacy risks and avoiding direct exposure of sensitive information.", - "chapter_source": "security_privacy", - "aliases": [], - "see_also": [] - }, - { - "term": "targeted attack", - "definition": "A type of data poisoning attack that aims to cause misclassification of specific inputs or classes while leaving the model's general performance largely intact.", - "chapter_source": "security_privacy", - "aliases": [], - "see_also": [] - }, - { - "term": "trusted execution environment", - "definition": "A secure area within a processor that provides hardware-based protection for code and data, ensuring confidentiality and integrity even from privileged system software.", - "chapter_source": "security_privacy", - "aliases": [], - "see_also": [] - }, - { - "term": "white-box attack", - "definition": "An adversarial attack where the attacker has complete knowledge of the model's architecture, parameters, training data, and internal workings, enabling highly effective attack strategies.", - "chapter_source": "security_privacy", - "aliases": [], - "see_also": [] - }, - { - "term": "zero-day vulnerability", - "definition": "A previously unknown security flaw in software or hardware that can be exploited by attackers before developers have had a chance to create and distribute a patch.", - "chapter_source": "security_privacy", - "aliases": [], - "see_also": [] - }, - { - "term": "privacy-utility tradeoff", - "definition": "The fundamental tension between preserving individual privacy and maintaining the utility of data for machine learning, requiring careful balance through techniques like differential privacy.", - "chapter_source": "security_privacy", - "aliases": [], - "see_also": [] - }, - { - "term": "secure computation", - "definition": "Cryptographic protocols that enable multiple parties to jointly compute functions over private inputs without revealing those inputs to each other.", - "chapter_source": "security_privacy", - "aliases": [], - "see_also": [] - } - ] -} diff --git a/book/quarto/contents/vol2/sustainable_ai/sustainable_ai.qmd b/book/quarto/contents/vol2/sustainable_ai/sustainable_ai.qmd index 76241a0e6e..b9259f179d 100644 --- a/book/quarto/contents/vol2/sustainable_ai/sustainable_ai.qmd +++ b/book/quarto/contents/vol2/sustainable_ai/sustainable_ai.qmd @@ -1,7 +1,6 @@ --- quiz: sustainable_ai_quizzes.json concepts: sustainable_ai_concepts.yml -glossary: sustainable_ai_glossary.json engine: jupyter --- diff --git a/book/quarto/contents/vol2/sustainable_ai/sustainable_ai_glossary.json b/book/quarto/contents/vol2/sustainable_ai/sustainable_ai_glossary.json deleted file mode 100644 index 0be8e0a7f8..0000000000 --- a/book/quarto/contents/vol2/sustainable_ai/sustainable_ai_glossary.json +++ /dev/null @@ -1,327 +0,0 @@ -{ - "metadata": { - "chapter": "sustainable_ai", - "version": "1.0.0", - "generated": "2025-09-15T14:08:03.502943", - "total_terms": 45, - "standardized": true, - "last_updated": "2025-09-15T15:01:37.290986" - }, - "terms": [ - { - "term": "artificial intelligence", - "definition": "A broad field of computer science focused on creating systems that can perform tasks typically requiring human intelligence, including learning, reasoning, and decision-making.", - "chapter_source": "sustainable_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "backpropagation", - "definition": "The algorithm used to train neural networks by calculating gradients and propagating error signals backward through network layers to update weights.", - "chapter_source": "sustainable_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "carbon footprint", - "definition": "The total amount of greenhouse gas emissions produced directly and indirectly by an individual, organization, event, or product, typically measured in CO2 equivalent.", - "chapter_source": "sustainable_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "carbon-aware scheduling", - "definition": "A computational approach that schedules AI workloads based on the carbon intensity of the electricity grid, prioritizing execution when renewable energy sources are most available.", - "chapter_source": "sustainable_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "cooling effectiveness", - "definition": "The efficiency with which a data center cooling system removes heat from computing equipment, typically measured as the ratio of heat removed to energy consumed for cooling.", - "chapter_source": "sustainable_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "data center", - "definition": "A facility housing computer systems and associated components such as telecommunications and storage systems, typically including redundant power supplies, cooling systems, and network connections.", - "chapter_source": "sustainable_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "deep learning", - "definition": "A subset of machine learning using neural networks with multiple hidden layers to automatically learn hierarchical representations from data.", - "chapter_source": "sustainable_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "dennard scaling", - "definition": "The historical observation that as transistors become smaller, their power density remains approximately constant, allowing for more transistors without proportional increases in power consumption.", - "chapter_source": "sustainable_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "distributed training", - "definition": "The practice of training machine learning models across multiple computing nodes or devices to reduce training time and enable larger model architectures.", - "chapter_source": "sustainable_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "edge computing", - "definition": "A distributed computing paradigm that brings computation and data storage closer to data sources and end users, reducing latency and bandwidth usage.", - "chapter_source": "sustainable_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "embodied carbon", - "definition": "The total greenhouse gas emissions generated during the manufacturing, transportation, and installation of a product before it begins operation.", - "chapter_source": "sustainable_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "energy efficiency", - "definition": "The ratio of useful output to energy input, measuring how effectively a system converts energy into desired computational work.", - "chapter_source": "sustainable_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "federated learning", - "definition": "A machine learning approach that trains algorithms across decentralized data sources without requiring data to be centralized, improving privacy and reducing data transmission energy costs.", - "chapter_source": "sustainable_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "flops", - "definition": "Floating-point operations per second, a measure of computer performance indicating how many mathematical calculations involving decimal numbers a system can perform per second.", - "chapter_source": "sustainable_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "gpu", - "definition": "Graphics Processing Unit, a specialized electronic circuit designed to rapidly manipulate and alter memory to accelerate the creation of images and parallel processing tasks like AI training.", - "chapter_source": "sustainable_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "green computing", - "definition": "The practice of designing, manufacturing, using, and disposing of computers and computer systems in an environmentally responsible manner.", - "chapter_source": "sustainable_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "hyperparameter optimization", - "definition": "The process of finding the optimal configuration of hyperparameters (learning rate, batch size, network architecture parameters) that control the machine learning training process.", - "chapter_source": "sustainable_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "inference", - "definition": "The phase in machine learning where a trained model is used to make predictions or generate outputs on new, previously unseen data.", - "chapter_source": "sustainable_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "knowledge distillation", - "definition": "A technique where a large, complex \"teacher\" model transfers its learned knowledge to a smaller, more efficient \"student\" model, maintaining performance while reducing computational requirements.", - "chapter_source": "sustainable_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "lifecycle assessment", - "definition": "A systematic approach to evaluating the environmental impacts of a product or system throughout its entire life cycle, from raw material extraction to disposal.", - "chapter_source": "sustainable_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "machine learning", - "definition": "A subset of artificial intelligence that enables computers to learn and make decisions from data without being explicitly programmed for each specific task.", - "chapter_source": "sustainable_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "megawatt-hour", - "definition": "A unit of energy equal to one megawatt of power used for one hour, commonly used to measure electricity consumption in large facilities like data centers.", - "chapter_source": "sustainable_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "mixed precision training", - "definition": "A technique that uses different numerical precisions for different parts of neural network training, typically combining 16-bit and 32-bit floating-point arithmetic to reduce memory usage and increase training speed.", - "chapter_source": "sustainable_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "model compression", - "definition": "A set of techniques designed to reduce the size and computational requirements of machine learning models while preserving their accuracy and functionality.", - "chapter_source": "sustainable_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "model pruning", - "definition": "The process of removing unnecessary weights, neurons, or connections from a trained neural network to reduce its size and computational requirements.", - "chapter_source": "sustainable_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "moore's law", - "definition": "The observation that the number of transistors on a microchip doubles approximately every two years while the cost of computers is halved.", - "chapter_source": "sustainable_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "neural architecture search", - "definition": "An automated method for designing neural network architectures by systematically exploring different architectural configurations to find optimal designs.", - "chapter_source": "sustainable_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "neural network", - "definition": "A computational model inspired by biological neural networks, consisting of interconnected nodes (neurons) organized in layers that can learn complex patterns from data.", - "chapter_source": "sustainable_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "parameter", - "definition": "A learnable variable in a machine learning model, such as weights and biases in neural networks, that are adjusted during training to optimize performance.", - "chapter_source": "sustainable_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "power usage effectiveness", - "definition": "A metric used to determine the energy efficiency of a data center, calculated as the ratio of total facility energy consumption to IT equipment energy consumption.", - "chapter_source": "sustainable_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "quantization", - "definition": "A technique that reduces the precision of numerical representations in neural networks, typically converting from 32-bit floating-point to lower-precision formats like 8-bit integers.", - "chapter_source": "sustainable_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "renewable energy", - "definition": "Energy collected from renewable resources that are naturally replenished, including solar, wind, hydroelectric, geothermal, and biomass sources.", - "chapter_source": "sustainable_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "scope 1 emissions", - "definition": "Direct greenhouse gas emissions from sources owned or controlled by an organization, such as on-site fuel combustion and company vehicles.", - "chapter_source": "sustainable_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "scope 2 emissions", - "definition": "Indirect greenhouse gas emissions from the generation of purchased electricity, steam, heating, or cooling consumed by an organization.", - "chapter_source": "sustainable_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "scope 3 emissions", - "definition": "All other indirect greenhouse gas emissions that occur in an organization's value chain, including manufacturing, transportation, and end-of-life disposal.", - "chapter_source": "sustainable_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "sparse training", - "definition": "A training approach that maintains sparsity in neural network weights throughout the training process, reducing computational requirements and memory usage.", - "chapter_source": "sustainable_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "sustainable ai", - "definition": "The practice of developing and deploying artificial intelligence systems that minimize environmental impact while maintaining effectiveness and accessibility.", - "chapter_source": "sustainable_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "tpu", - "definition": "Tensor Processing Unit, a specialized AI accelerator chip developed by Google specifically designed for machine learning workloads, particularly neural network computations.", - "chapter_source": "sustainable_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "training", - "definition": "The process of teaching a machine learning model to make predictions by showing it examples and adjusting its parameters based on performance feedback.", - "chapter_source": "sustainable_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "transfer learning", - "definition": "A machine learning technique where a model trained on one task is adapted for a related task, reducing the computational resources needed for training.", - "chapter_source": "sustainable_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "transformer", - "definition": "A neural network architecture that uses self-attention mechanisms to process sequential data, forming the foundation for many modern language models.", - "chapter_source": "sustainable_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "water usage effectiveness", - "definition": "A metric that measures the efficiency of water use in data centers, calculated as the ratio of total water consumed to IT equipment energy consumption.", - "chapter_source": "sustainable_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "green ai metrics", - "definition": "Specialized performance indicators that measure the environmental impact of AI systems, including carbon footprint, energy efficiency, and resource utilization throughout the ML lifecycle.", - "chapter_source": "sustainable_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "system-wide sustainability", - "definition": "Holistic approach to environmental responsibility that considers the entire AI infrastructure ecosystem, from data centers to edge devices, rather than optimizing individual components in isolation.", - "chapter_source": "sustainable_ai", - "aliases": [], - "see_also": [] - }, - { - "term": "environmental impact measurement", - "definition": "Systematic tracking and quantification of the ecological effects of AI systems, including energy consumption, carbon emissions, and resource depletion across the complete system lifecycle.", - "chapter_source": "sustainable_ai", - "aliases": [], - "see_also": [] - } - ] -} diff --git a/book/tools/scripts/glossary/ORGANIZATION.md b/book/tools/scripts/glossary/ORGANIZATION.md deleted file mode 100644 index 2e59ed8b91..0000000000 --- a/book/tools/scripts/glossary/ORGANIZATION.md +++ /dev/null @@ -1,91 +0,0 @@ -# Glossary System File Organization - -This document outlines the complete file organization for the glossary system. - -## Directory Structure - -``` -MLSysBook/book/ -├── quarto/contents/ -│ ├── vol1/ # Volume 1 chapters -│ │ ├── introduction/ -│ │ │ └── introduction_glossary.json # Chapter-specific glossary -│ │ ├── ml_systems/ -│ │ │ └── ml_systems_glossary.json # Chapter-specific glossary -│ │ ├── [... more vol1 chapters ...] -│ │ ├── frontmatter/ # Vol1 frontmatter -│ │ │ ├── foreword.qmd -│ │ │ └── acknowledgements/ -│ │ └── backmatter/glossary/ # Vol1 glossary -│ │ ├── vol1_glossary.json # Aggregated Vol1 terms -│ │ └── glossary.qmd # Vol1 glossary page -│ │ -│ ├── vol2/ # Volume 2 chapters -│ │ ├── infrastructure/ -│ │ │ └── infrastructure_glossary.json -│ │ ├── [... more vol2 chapters ...] -│ │ ├── frontmatter/ # Vol2 frontmatter (if needed) -│ │ └── backmatter/glossary/ # Vol2 glossary -│ │ ├── vol2_glossary.json # Aggregated Vol2 terms -│ │ └── glossary.qmd # Vol2 glossary page -│ │ -│ └── frontmatter/ # Shared frontmatter -│ ├── about/ -│ └── socratiq/ -│ -└── tools/scripts/glossary/ # Processing scripts - ├── build_global_glossary.py # Aggregates chapters → volume JSONs - ├── generate_glossary.py # Generates JSONs → QMD pages - ├── consolidate_similar_terms.py # Manual consolidation rules - ├── smart_consolidation.py # LLM-based similarity detection - ├── rule_based_consolidation.py # Academic best practices - ├── clean_master_glossary.py # Utility for cleanup - ├── README.md # Quick start documentation - └── ORGANIZATION.md # This file -``` - -## Data Flow - -``` -Chapter Glossaries → Volume Glossaries → Published Glossary Pages - (vol1: 16 files) (vol1_glossary.json) (vol1/glossary.qmd) - (vol2: 7 files) (vol2_glossary.json) (vol2/glossary.qmd) - ↓ ↓ ↓ - Source of Aggregated Volume-specific - truth & deduplicated user-facing pages -``` - -Each volume has its own self-contained glossary with no cross-volume dependencies. - -## File Status Summary - -### Volume-Specific Glossaries - -**Volume 1 Glossary:** -- Source: `quarto/contents/vol1/*/_glossary.json` (16 files) -- Aggregated: `quarto/contents/vol1/backmatter/glossary/vol1_glossary.json` -- Published: `quarto/contents/vol1/backmatter/glossary/glossary.qmd` - -**Volume 2 Glossary:** -- Source: `quarto/contents/vol2/*/_glossary.json` (7 files) -- Aggregated: `quarto/contents/vol2/backmatter/glossary/vol2_glossary.json` -- Published: `quarto/contents/vol2/backmatter/glossary/glossary.qmd` - -## Current Statistics - -- **Vol1 chapter glossaries**: 16 files (~593 raw terms, ~462 unique) -- **Vol2 chapter glossaries**: 7 files (~287 raw terms, ~250 unique) -- **Processing scripts**: 7 Python files -- **Published glossaries**: 2 QMD files (Vol1, Vol2) - -## Usage Workflow - -1. **Edit terms**: Modify individual chapter glossary JSON files -2. **Rebuild all**: Run `python3 book/tools/scripts/glossary/build_global_glossary.py` -3. **Generate pages**: Run `python3 book/tools/scripts/glossary/generate_glossary.py` -4. **Optional**: Generate specific volume only: - ```bash - python3 book/tools/scripts/glossary/generate_glossary.py --volume vol1 - ``` - -All files are now properly organized with volume-specific glossaries. diff --git a/book/tools/scripts/glossary/README.md b/book/tools/scripts/glossary/README.md deleted file mode 100644 index 5e14149681..0000000000 --- a/book/tools/scripts/glossary/README.md +++ /dev/null @@ -1,48 +0,0 @@ -# Glossary Management Scripts - -Scripts for managing the ML Systems textbook glossary system. - -## Quick Commands - -### Full Rebuild (when chapters change) -```bash -cd /Users/VJ/GitHub/MLSysBook -python3 book/tools/scripts/glossary/build_global_glossary.py -python3 book/tools/scripts/glossary/generate_glossary.py -``` - -### Generate Specific Volume -```bash -python3 book/tools/scripts/glossary/generate_glossary.py --volume vol1 -python3 book/tools/scripts/glossary/generate_glossary.py --volume vol2 -``` - -## Data Flow - -``` -Chapter QMDs → Agent → Individual JSONs → build_global_glossary.py → Volume JSONs → generate_glossary.py → glossary.qmd -``` - -## Scripts - -- **`build_global_glossary.py`** - Main aggregation script (chapter JSONs → volume JSONs) -- **`generate_glossary.py`** - Page generator (volume JSONs → volume glossary.qmd files) -- **`clean_master_glossary.py`** - Legacy cleanup script -- **`smart_consolidation.py`** - Advanced term consolidation -- **`rule_based_consolidation.py`** - Rule-based term consolidation - -## Source Files - -- **Vol1 chapter glossaries**: `quarto/contents/vol1/*/_glossary.json` -- **Vol2 chapter glossaries**: `quarto/contents/vol2/*/_glossary.json` - -Individual chapter glossaries are the source of truth. Edit those, then rebuild. - -## Output Files - -- **Volume 1 JSON**: `quarto/contents/vol1/backmatter/glossary/vol1_glossary.json` -- **Volume 1 page**: `quarto/contents/vol1/backmatter/glossary/glossary.qmd` -- **Volume 2 JSON**: `quarto/contents/vol2/backmatter/glossary/vol2_glossary.json` -- **Volume 2 page**: `quarto/contents/vol2/backmatter/glossary/glossary.qmd` - -Each volume has its own self-contained glossary. diff --git a/book/tools/scripts/glossary/build_global_glossary.py b/book/tools/scripts/glossary/build_global_glossary.py deleted file mode 100644 index 5c11144f73..0000000000 --- a/book/tools/scripts/glossary/build_global_glossary.py +++ /dev/null @@ -1,242 +0,0 @@ -#!/usr/bin/env python3 -""" -Build volume-specific glossaries from individual chapter glossaries. - -This script: -1. Reads all individual chapter glossary JSON files (source of truth) -2. Standardizes and deduplicates terms during aggregation -3. Identifies cross-chapter terms and consolidates definitions -4. Outputs separate glossaries for vol1 and vol2 - -Data flow: -chapter glossaries (clean) → aggregation (smart) → volume glossaries (clean) -""" - -import json -import re -from pathlib import Path -from datetime import datetime -from collections import defaultdict - -def load_chapter_glossaries(volume=None): - """Load chapter glossary files, optionally filtered by volume.""" - # Get project root (4 levels up from this script) - project_root = Path(__file__).parent.parent.parent.parent - - # Determine which volumes to scan - volumes = [volume] if volume else ["vol1", "vol2"] - - json_files = [] - for vol in volumes: - base_dir = project_root / f"quarto/contents/{vol}" - if base_dir.exists(): - json_files.extend(list(base_dir.glob("**/*_glossary.json"))) - - print(f"📚 Found {len(json_files)} chapter glossary files" + (f" for {volume}" if volume else "")) - - chapter_data = {} - total_raw_terms = 0 - - for json_path in sorted(json_files): - try: - with open(json_path) as f: - data = json.load(f) - - chapter = data['metadata']['chapter'] - terms = data['terms'] - chapter_data[chapter] = terms - total_raw_terms += len(terms) - - print(f" → {chapter}: {len(terms)} terms") - - except Exception as e: - print(f" ❌ Error loading {json_path}: {e}") - - print(f"📊 Total raw terms: {total_raw_terms}") - return chapter_data - -def standardize_term_name(term): - """Standardize term name consistently.""" - # Remove underscores, normalize spacing, lowercase - normalized = re.sub(r'[_\s]+', ' ', term.strip().lower()) - return normalized - -def find_best_definition(definitions_with_chapters): - """Find the best definition from multiple chapters.""" - if len(definitions_with_chapters) == 1: - return definitions_with_chapters[0]['definition'] - - # Prefer definitions that are: - # 1. From primary/core chapters (training, nn_computation, etc.) - # 2. Longer and more comprehensive - # 3. Don't have "Alternative definition:" artifacts - - priority_chapters = ['nn_computation', 'training', 'ml_systems', 'nn_architectures'] - - # First try priority chapters - for chapter in priority_chapters: - for item in definitions_with_chapters: - if item['chapter'] == chapter: - definition = item['definition'] - if not definition.startswith('Alternative definition:'): - return definition - - # Otherwise, pick the longest clean definition - clean_definitions = [] - for item in definitions_with_chapters: - def_text = item['definition'] - # Take the first part before "Alternative definition:" if it exists - if 'Alternative definition:' in def_text: - def_text = def_text.split('Alternative definition:')[0].strip() - clean_definitions.append((def_text, item['chapter'])) - - # Return the longest definition - best_def = max(clean_definitions, key=lambda x: len(x[0])) - return best_def[0].rstrip('.') - -def aggregate_terms(chapter_data): - """Aggregate terms from all chapters with smart deduplication.""" - print("\n🔄 Aggregating and deduplicating terms...") - - # Group terms by standardized name - term_groups = defaultdict(list) - - for chapter, terms in chapter_data.items(): - for term_entry in terms: - std_name = standardize_term_name(term_entry['term']) - term_groups[std_name].append({ - 'original_term': term_entry['term'], - 'definition': term_entry['definition'], - 'chapter': chapter - }) - - print(f"📊 Found {len(term_groups)} unique standardized terms") - - # Process each group - clean_terms = [] - duplicates_merged = 0 - - for std_name, group in term_groups.items(): - if len(group) > 1: - duplicates_merged += len(group) - 1 - chapters = [item['chapter'] for item in group] - print(f"🔄 Merging {len(group)} occurrences of '{std_name}' from: {', '.join(chapters)}") - - # Determine best term name (prefer clean versions) - term_names = [item['original_term'] for item in group] - best_term_name = min(term_names, key=lambda x: (len(x), '_' in x, x.lower())) - - # Get best definition - best_definition = find_best_definition(group) - - # Determine chapter attribution - chapters = [item['chapter'] for item in group] - unique_chapters = sorted(set(chapters)) - - if len(unique_chapters) == 1: - chapter_source = unique_chapters[0] - appears_in = [] - else: - # Use first chapter as primary source - chapter_source = unique_chapters[0] - appears_in = unique_chapters - - # Create clean term entry - clean_term = { - "term": best_term_name.lower(), - "definition": best_definition, - "chapter_source": chapter_source, - "aliases": [], - "see_also": [] - } - - if appears_in: - clean_term["appears_in"] = appears_in - - clean_terms.append(clean_term) - - # Sort alphabetically - clean_terms.sort(key=lambda x: x["term"]) - - print(f"✅ Aggregation complete:") - print(f" → Unique terms: {len(clean_terms)}") - print(f" → Duplicates merged: {duplicates_merged}") - - return clean_terms - -def build_volume_glossary(volume): - """Build a glossary for a specific volume.""" - print(f"\n{'='*60}") - print(f"🔧 Building Glossary for {volume.upper()}") - print(f"{'='*60}") - - # Load chapter glossaries for this volume only - chapter_data = load_chapter_glossaries(volume) - - if not chapter_data: - print(f"⚠️ No chapter glossaries found for {volume}") - return None - - # Aggregate and deduplicate - clean_terms = aggregate_terms(chapter_data) - - # Build glossary structure - glossary = { - "metadata": { - "type": "volume_glossary", - "volume": volume, - "version": "1.0.0", - "generated": datetime.now().isoformat(), - "total_terms": len(clean_terms), - "source": f"aggregated_from_{volume}_chapter_glossaries", - "standardized": True, - "description": f"Glossary for {volume.upper()} built from chapter glossaries" - }, - "terms": clean_terms - } - - # Save volume glossary - project_root = Path(__file__).parent.parent.parent.parent - output_path = project_root / f"quarto/contents/{volume}/backmatter/glossary/{volume}_glossary.json" - - # Ensure directory exists - output_path.parent.mkdir(parents=True, exist_ok=True) - - print(f"💾 Saving glossary: {output_path}") - with open(output_path, 'w', encoding='utf-8') as f: - json.dump(glossary, f, indent=2, ensure_ascii=False) - - # Report statistics - multi_chapter_terms = [t for t in clean_terms if "appears_in" in t] - - print(f"\n📈 {volume.upper()} Glossary Statistics:") - print(f" → Total terms: {len(clean_terms)}") - print(f" → Multi-chapter terms: {len(multi_chapter_terms)}") - print(f" → Single-chapter terms: {len(clean_terms) - len(multi_chapter_terms)}") - - return glossary - -def main(): - """Main function to build all glossaries.""" - print("🔧 Building Volume-Specific Glossaries") - print("=" * 60) - - # Build volume-specific glossaries - vol1_glossary = build_volume_glossary("vol1") - vol2_glossary = build_volume_glossary("vol2") - - print("\n" + "="*60) - print("✅ All glossaries successfully built!") - print("="*60) - - if vol1_glossary: - print(f" → Vol1: {vol1_glossary['metadata']['total_terms']} terms") - if vol2_glossary: - print(f" → Vol2: {vol2_glossary['metadata']['total_terms']} terms") - - print("\nNext steps:") - print(" 1. Run generate_glossary.py to create the glossary QMD pages") - print(" 2. Individual chapter glossaries remain the source of truth") - -if __name__ == "__main__": - main() diff --git a/book/tools/scripts/glossary/generate_glossary.py b/book/tools/scripts/glossary/generate_glossary.py deleted file mode 100644 index c235e4873e..0000000000 --- a/book/tools/scripts/glossary/generate_glossary.py +++ /dev/null @@ -1,265 +0,0 @@ -#!/usr/bin/env python3 -""" -Generate glossary.qmd files from volume-specific glossary JSONs. - -This script reads volume-specific glossary JSON files and generates properly -formatted Quarto markdown files for each volume's glossary page. -""" - -import json -import re -import argparse -from pathlib import Path -from datetime import datetime - -# Chapter to section ID mappings by volume -VOL1_CHAPTER_MAPPING = { - "introduction": "@sec-introduction", - "ml_systems": "@sec-ml-system-architecture", - "nn_computation": "@sec-deep-learning-systems-foundations", - "nn_architectures": "@sec-dnn-architectures", - "frameworks": "@sec-ai-frameworks", - "training": "@sec-ai-training", - "benchmarking": "@sec-benchmarking-ai", - "data_engineering": "@sec-data-engineering-ml", - "hw_acceleration": "@sec-ai-acceleration", - "data_efficiency": "@sec-data-efficiency", - "optimizations": "@sec-model-compression", - "ops": "@sec-machine-learning-operations-mlops", - "serving": "@sec-model-serving-systems", - "responsible_engr": "@sec-responsible-engineering", - "workflow": "@sec-ai-development-workflow", - "conclusion": "@sec-conclusion", -} - -VOL2_CHAPTER_MAPPING = { - "introduction": "@sec-vol2-introduction", - "infrastructure": "@sec-infrastructure", - "distributed_training": "@sec-distributed-training", - "inference": "@sec-inference", - "communication": "@sec-communication", - "storage": "@sec-storage", - "ops_scale": "@sec-ops-scale", - "fault_tolerance": "@sec-fault-tolerance", - "edge_intelligence": "@sec-edge-intelligence", - "robust_ai": "@sec-robust-ai", - "security_privacy": "@sec-privacy-security", - "responsible_ai": "@sec-responsible-ai", - "sustainable_ai": "@sec-sustainable-ai", - "ai_good": "@sec-ai-for-good", - "frontiers": "@sec-frontiers", - "conclusion": "@sec-conclusion-vol2", -} - -def extract_section_id_from_qmd(qmd_path): - """Extract the main chapter section ID from a QMD file.""" - try: - with open(qmd_path, 'r', encoding='utf-8') as f: - content = f.read() - - # Look for main chapter heading with section ID - # Pattern: # Chapter Title {#sec-something} - pattern = r'^#\s+[^{]*\{#(sec-[^}]+)\}' - match = re.search(pattern, content, re.MULTILINE) - - if match: - return f"@{match.group(1)}" - - return None - - except Exception as e: - print(f"Error reading {qmd_path}: {e}") - return None - -def build_chapter_mapping(volume): - """Build mapping from chapter names to their actual section IDs.""" - project_root = Path(__file__).parent.parent.parent.parent - chapters_dir = project_root / f"quarto/contents/{volume}" - - chapter_mapping = {} - - # Try to discover section IDs from actual files - if chapters_dir.exists(): - for chapter_dir in chapters_dir.iterdir(): - if chapter_dir.is_dir() and chapter_dir.name not in ['frontmatter', 'backmatter']: - chapter_name = chapter_dir.name - chapter_path = chapter_dir / f"{chapter_name}.qmd" - - if chapter_path.exists(): - section_id = extract_section_id_from_qmd(chapter_path) - if section_id: - chapter_mapping[chapter_name] = section_id - - # Fall back to predefined mappings for any missing chapters - fallback = VOL1_CHAPTER_MAPPING if volume == "vol1" else VOL2_CHAPTER_MAPPING - for chapter, section_id in fallback.items(): - if chapter not in chapter_mapping: - chapter_mapping[chapter] = section_id - - return chapter_mapping - -def format_chapter_link(chapter, volume): - """Format chapter name as Quarto cross-reference link.""" - if not chapter: - return "" - - chapter_mapping = build_chapter_mapping(volume) - return chapter_mapping.get(chapter, f"@sec-{chapter.replace('_', '-')}") - -def load_volume_glossary(volume): - """Load the volume-specific glossary JSON file.""" - project_root = Path(__file__).parent.parent.parent.parent - glossary_path = project_root / f"quarto/contents/{volume}/backmatter/glossary/{volume}_glossary.json" - - if not glossary_path.exists(): - print(f"⚠️ Glossary not found: {glossary_path}") - return None - - with open(glossary_path) as f: - return json.load(f) - - -def generate_glossary_qmd(glossary_data, volume=None, volume_title=None): - """Generate the glossary QMD content.""" - terms = glossary_data["terms"] - total_terms = len(terms) - - # Determine volume description - if volume_title: - title_suffix = f" ({volume_title})" - intro_text = f"This glossary contains definitions of key terms used in {volume_title}." - else: - title_suffix = "" - intro_text = "This comprehensive glossary contains definitions of key terms used throughout the ML Systems textbook." - - # Header content - content = [ - "---", - "number-sections: false", - "---", - "", - f"# Glossary{title_suffix} {{.unnumbered}}", - "", - f"{intro_text} Terms are organized alphabetically and include references to the chapters where they appear.", - "", - "::: {.callout-note}", - "## Using the Glossary", - "", - "- **Terms are alphabetically ordered** for easy reference", - "- **Chapter references** show where terms are introduced or discussed", - "- **Cross-references** help you explore related concepts", - "- **Interactive tooltips** appear when you hover over glossary terms throughout the book", - ":::", - "" - ] - - # Group terms by first letter - terms_by_letter = {} - for term in terms: - first_letter = term["term"][0].upper() - if first_letter not in terms_by_letter: - terms_by_letter[first_letter] = [] - terms_by_letter[first_letter].append(term) - - # Generate glossary entries organized by letter - for letter in sorted(terms_by_letter.keys()): - content.append(f"## {letter}") - content.append("") - - for term in sorted(terms_by_letter[letter], key=lambda x: x["term"]): - term_name = term["term"] - definition = term["definition"] - - # Create the term entry with proper formatting - content.append(f"**{term_name}**") - content.append(f": {definition}") - - # Handle chapter references consistently - appears_in = term.get("appears_in", []) - chapter_source = term.get("chapter_source", "") - - if appears_in and len(appears_in) > 1: - # Multiple chapters - formatted_chapters = [format_chapter_link(ch, volume or "vol1") for ch in appears_in] - content.append(f" *Appears in: {', '.join(formatted_chapters)}*") - elif chapter_source: - # Single primary chapter - formatted_chapter = format_chapter_link(chapter_source, volume or "vol1") - content.append(f" *Appears in: {formatted_chapter}*") - - # Add cross-references if available - if term.get("see_also"): - see_also = ", ".join(term["see_also"]) - content.append(f" *See also: {see_also}*") - - content.append("") # Add spacing between terms - - # Footer content - if volume_title: - about_text = f"This glossary was automatically generated from chapter glossaries in {volume_title}." - else: - about_text = "This glossary was automatically generated from chapter glossaries throughout the textbook." - - content.extend([ - "---", - "", - "## About This Glossary", - "", - f"{about_text} Each term is defined in the context of machine learning systems and includes references to help you explore related concepts.", - "", - "**Updates**: The glossary is maintained alongside the textbook content to ensure definitions remain current and accurate.", - "", - f"*Generated on {datetime.now().strftime('%Y-%m-%d at %H:%M')}*" - ]) - - return "\n".join(content) - -def generate_volume_glossary(volume, volume_title): - """Generate glossary QMD for a specific volume.""" - print(f"\n📚 Generating glossary for {volume_title}...") - - glossary_data = load_volume_glossary(volume) - if not glossary_data: - return False - - total_terms = len(glossary_data["terms"]) - print(f" → Found {total_terms} terms") - - # Generate QMD content - qmd_content = generate_glossary_qmd(glossary_data, volume, volume_title) - - # Write to file - project_root = Path(__file__).parent.parent.parent.parent - output_path = project_root / f"quarto/contents/{volume}/backmatter/glossary/glossary.qmd" - - output_path.parent.mkdir(parents=True, exist_ok=True) - - print(f"💾 Writing to {output_path}...") - with open(output_path, 'w', encoding='utf-8') as f: - f.write(qmd_content) - - print(f"✅ {volume_title} glossary generated: {total_terms} terms") - return True - -def main(): - """Main function to generate glossaries.""" - parser = argparse.ArgumentParser(description="Generate glossary QMD files") - parser.add_argument("--volume", choices=["vol1", "vol2", "all"], - default="all", help="Which volume(s) to generate") - args = parser.parse_args() - - print("🔧 Generating Glossary QMD Files") - print("=" * 50) - - if args.volume == "vol1": - generate_volume_glossary("vol1", "Volume I: Foundations") - elif args.volume == "vol2": - generate_volume_glossary("vol2", "Volume II: Scalable Systems") - else: # all - generate_volume_glossary("vol1", "Volume I: Foundations") - generate_volume_glossary("vol2", "Volume II: Scalable Systems") - - print("\n✅ Glossary generation complete!") - -if __name__ == "__main__": - main() diff --git a/book/tools/scripts/quizzes/build_prior_vocab.py b/book/tools/scripts/quizzes/build_prior_vocab.py index b117178065..135326f81a 100644 --- a/book/tools/scripts/quizzes/build_prior_vocab.py +++ b/book/tools/scripts/quizzes/build_prior_vocab.py @@ -2,7 +2,7 @@ """Build the cumulative prior-vocabulary context for a target chapter. Walks the Vol1 → Vol2 reading order and, for chapter N, produces the -union of every glossary term first defined in chapters 1..N-1. The +union of every definition term first introduced in chapters 1..N-1. The resulting JSON is passed to that chapter's quiz-generation sub-agent so it knows which terms it may assume vs. which it must treat as novel to this chapter. @@ -65,27 +65,83 @@ READING_ORDER: list[tuple[str, str]] = [ ("vol2", "conclusion"), ] -BASE = Path(__file__).resolve().parents[4] / "quarto" / "contents" +BASE = Path(__file__).resolve().parents[3] / "quarto" / "contents" -def _glossary_path(vol: str, chap: str) -> Path | None: - """Return the glossary JSON path for a chapter, or ``None`` if absent. +def _chapter_qmd_path(vol: str, chap: str) -> Path | None: + """Return the main QMD path for a chapter, or ``None`` if absent. - The directory name and the glossary file stem usually match, but some - chapters (``optimizations``) name the glossary after the ``.qmd`` - stem instead. Fall back to any ``*_glossary.json`` in the chapter - directory. + The directory name and QMD stem usually match, but some chapters + (``optimizations``) use a more specific QMD stem. """ chap_dir = BASE / vol / chap - direct = chap_dir / f"{chap}_glossary.json" + direct = chap_dir / f"{chap}.qmd" if direct.is_file(): return direct - candidates = sorted(chap_dir.glob("*_glossary.json")) + candidates = sorted( + path for path in chap_dir.glob("*.qmd") if not path.name.startswith("_") + ) return candidates[0] if candidates else None +_DEFINITION_CALLOUT_RE = re.compile( + r"^:{3,4}\s+\{\.callout-definition(?P[^\n]*)\}\s*\n(?P.*?)(?=^:{3,4}\s*$)", + re.MULTILINE | re.DOTALL, +) +_TITLE_RE = re.compile(r'title="([^"]+)"') +_BOLD_TERM_RE = re.compile(r"\*\*\*([^*\n]+?)\*\*\*") +_INDEX_RE = re.compile(r"\\index\{[^{}]*\}") +_ATTR_RE = re.compile(r"\{#[^{}]+\}") + + +def _clean_markdown(text: str) -> str: + text = _INDEX_RE.sub("", text) + text = _ATTR_RE.sub("", text) + text = text.replace("***", "").replace("**", "").replace("*", "") + return " ".join(text.split()).strip() + + +def _first_paragraph(text: str) -> str: + paragraph: list[str] = [] + for raw_line in text.strip().splitlines(): + line = raw_line.strip() + if not line: + if paragraph: + break + continue + if line.startswith((":::", "```")): + if paragraph: + break + continue + paragraph.append(line) + return _clean_markdown(" ".join(paragraph)) + + +def _terms_from_chapter_qmd(path: Path) -> list[dict[str, str]]: + """Extract defined terms from definition callouts in a chapter QMD.""" + text = path.read_text(encoding="utf-8") + entries: list[dict[str, str]] = [] + for match in _DEFINITION_CALLOUT_RE.finditer(text): + body = match.group("body") + title_match = _TITLE_RE.search(match.group("attrs")) + bold_match = _BOLD_TERM_RE.search(body) + term = bold_match.group(1) if bold_match else ( + title_match.group(1) if title_match else "" + ) + term = _clean_markdown(term) + if not term: + continue + entries.append( + { + "term": term, + "definition": _first_paragraph(body), + } + ) + return entries + + def prior_vocab_for(target_idx: int) -> list[dict]: - """Union of every glossary term introduced in chapters before ``target_idx``. + """Union of every definition term introduced before ``target_idx``. Deduplicates by lowercased term; the first chapter to introduce a term wins, and later re-definitions are ignored. @@ -93,15 +149,10 @@ def prior_vocab_for(target_idx: int) -> list[dict]: terms: list[dict] = [] seen: set[str] = set() for vol, chap in READING_ORDER[:target_idx]: - gloss = _glossary_path(vol, chap) - if gloss is None: + qmd = _chapter_qmd_path(vol, chap) + if qmd is None: continue - try: - data = json.loads(gloss.read_text(encoding="utf-8")) - except json.JSONDecodeError as e: - print(f"warn: could not parse {gloss}: {e}", file=sys.stderr) - continue - for entry in data.get("terms", []): + for entry in _terms_from_chapter_qmd(qmd): term = entry.get("term", "").strip() if not term: continue diff --git a/book/vscode-ext/package.json b/book/vscode-ext/package.json index 9e7fad5f5f..5623c2a1d9 100644 --- a/book/vscode-ext/package.json +++ b/book/vscode-ext/package.json @@ -87,7 +87,7 @@ { "command": "mlsysbook.runAction", "title": "MLSysBook: Run Action" }, { "command": "mlsysbook.cleanArtifacts", "title": "MLSysBook: Clean Build Artifacts" }, { "command": "mlsysbook.doctor", "title": "MLSysBook: Doctor (Health Check)" }, - { "command": "mlsysbook.buildGlossary", "title": "MLSysBook: Build Global Glossary" }, + { "command": "mlsysbook.buildGlossary", "title": "MLSysBook: Show Glossary Paths" }, { "command": "mlsysbook.compressImages", "title": "MLSysBook: Compress Images" }, { "command": "mlsysbook.repoHealth", "title": "MLSysBook: Repo Health Check" }, { "command": "mlsysbook.contextBuildHtml", "title": "MLSysBook: Build as HTML" }, diff --git a/book/vscode-ext/scripts/smoke_extension_ux.py b/book/vscode-ext/scripts/smoke_extension_ux.py index 14e5d60ded..0bfe0ef146 100644 --- a/book/vscode-ext/scripts/smoke_extension_ux.py +++ b/book/vscode-ext/scripts/smoke_extension_ux.py @@ -144,7 +144,7 @@ def build_cases(repo_root: Path) -> list[Case]: Case("debug chapter pdf", f"./book/binder debug pdf --vol1 --chapter {chapter}", 180, allow_timeout_as_started=True), Case("debug chapter html", f"./book/binder debug html --vol1 --chapter {chapter}", 180, allow_timeout_as_started=True), Case("debug chapter epub", f"./book/binder debug epub --vol1 --chapter {chapter}", 180, allow_timeout_as_started=True), - Case("maintain glossary build", "./book/binder maintain glossary build", 120), + Case("maintain glossary paths", "./book/binder maintain glossary paths", 120), Case("maintain images compress", "./book/binder maintain images compress --all --smart-compression", 120), Case("maintain repo-health", "./book/binder maintain repo-health", 120), Case("publish script help vol1", "bash book/tools/scripts/publish/mit-press-release.sh --help", 30, allow_nonzero_exit=True), diff --git a/book/vscode-ext/src/commands/publishCommands.ts b/book/vscode-ext/src/commands/publishCommands.ts index 93fe88ed2e..eae766a1bc 100644 --- a/book/vscode-ext/src/commands/publishCommands.ts +++ b/book/vscode-ext/src/commands/publishCommands.ts @@ -28,8 +28,8 @@ export function registerPublishCommands(context: vscode.ExtensionContext): void }); }), vscode.commands.registerCommand('mlsysbook.buildGlossary', () => { - void runBookCommand('./book/binder fix glossary build', root, { - label: 'Build global glossary', + void runBookCommand('./book/binder maintain glossary paths', root, { + label: 'Show glossary paths', }); }), vscode.commands.registerCommand('mlsysbook.compressImages', () => { diff --git a/book/vscode-ext/src/constants.ts b/book/vscode-ext/src/constants.ts index 9534b5bd50..34c68e983c 100644 --- a/book/vscode-ext/src/constants.ts +++ b/book/vscode-ext/src/constants.ts @@ -74,7 +74,7 @@ export const PUBLISH_ACTIONS: ActionDef[] = [ export const MAINTENANCE_ACTIONS: ActionDef[] = [ { id: 'clean', label: 'Clean Build Artifacts', command: './book/binder clean', icon: 'trash' }, { id: 'doctor', label: 'Doctor (Health Check)', command: './book/binder doctor', icon: 'heart' }, - { id: 'glossary', label: 'Build Global Glossary', command: './book/binder fix glossary build', icon: 'book' }, + { id: 'glossary', label: 'Show Glossary Paths', command: './book/binder maintain glossary paths', icon: 'book' }, { id: 'compress-images', label: 'Compress Images (Dry Run)', command: './book/binder fix images compress --all --smart-compression', icon: 'file-media' }, { id: 'repo-health', label: 'Repo Health Check', command: './book/binder fix repo-health', icon: 'pulse' }, { id: 'bib-list', label: 'Bib: List All', command: './book/binder bib list', icon: 'list-unordered' },