ai-agent-book 精选快照(<2MB 代码与文档,来自 github.com/bojieli/ai-agent-book)
Build latest book artifacts / build (push) Canceled after 0s
dependency resolution / resolve (3.11) (push) Canceled after 0s
dependency resolution / resolve (3.13) (push) Canceled after 0s
deploy-pages / build (push) Canceled after 0s
deploy-pages / deploy (push) Canceled after 0s
i18n consistency check / check (push) Canceled after 0s
provider adoption tests / test (chapter2/context-compression) (push) Canceled after 0s
provider adoption tests / test (chapter2/prompt-injection) (push) Canceled after 0s
provider adoption tests / test (chapter2/system-hint) (push) Canceled after 0s
provider adoption tests / test (chapter3/log-sanitization) (push) Canceled after 0s
web-search-agent tests / test (push) Canceled after 0s
web-search-agent tests / agentbook (push) Canceled after 0s

This commit is contained in:
2026-08-20 13:12:50 +00:00
commit b119135836
10275 changed files with 3284984 additions and 0 deletions
@@ -0,0 +1,13 @@
[
"/Users/boj/.kimi-code/bin/kimi",
"--prompt",
"Create a polished 10\u201315 slide presentation from the real academic paper at\n`attention-is-all-you-need.pdf` using your installed `pptx` Skill. Write the\nfinal deck to `output/attention-is-all-you-need.pptx`.\n\nThis is an audited Agent Skills experiment. Follow the official PPTX Skill by\nprogressive disclosure: invoke the pptx Skill through the Skill tool (this\nloads its complete SKILL.md), then read its complete html2pptx.md only after\nselection. Use the pinned official `scripts/html2pptx.js` workflow. Use the\nofficial `scripts/thumbnail.py` to make `output/full-deck-thumbnail.jpg`,\ninspect the full grid, and fix visible overlap, cutoff, contrast, or alignment\ndefects before finishing.\n\nContent gates:\n- cover title, problem/background, Transformer method/architecture, key\n experimental results, and conclusion;\n- extract or crop at least three visuals directly from the source PDF (not\n invented replacements), place the files under `source_visuals/`, and embed\n all of them in the deck;\n- create `source_visuals/manifest.json` as a JSON list. Each item must contain\n `file`, one-based PDF `page`, the paper's `label` (for example Figure 1 or\n Table 2), and a faithful `caption`;\n- make every visual consistent with the surrounding slide explanation and\n cite its source page/label on-slide.\n\nYou may install the Node packages required by the official Skill inside this\nworkspace. Do not use the repository's bundled `demo.py`, local proxy Skill,\nor prewritten sample outline. The final response must name the deck,\nthumbnail, visual manifest, slide count, validation performed, and any\nremaining limitation.\n",
"--output-format",
"stream-json",
"--model",
"kimi-code/k3",
"--skills-dir",
"/Users/boj/book/ai-agent-book-exp2-6-mp/chapter2/agent-skills-ppt/runs/exp2-6-kimi-pptx-20260731-v1/workspace/kimi-skills",
"--add-dir",
"/Users/boj/book/ai-agent-book-exp2-6-mp/chapter2/agent-skills-ppt/external/anthropics-skills/skills/pptx"
]
@@ -0,0 +1,132 @@
{
"experiment_id": "2-6",
"runtime": "kimi",
"protocol_sha256": "1316b6c5bca03b76b7fda2c1fc31b9076394bf996cacb4f52add2db98dbae84e",
"official_skill_receipt": {
"repository": "https://github.com/anthropics/skills.git",
"revision": "69c0b1a0674149f27b61b2635f935524b6add202",
"skill_path": "/Users/boj/book/ai-agent-book-exp2-6-mp/chapter2/agent-skills-ppt/external/anthropics-skills/skills/pptx",
"required_file_hashes": {
"skills/pptx/SKILL.md": "b6f25545bfb358739f1532f793458b5dbc87ee009933cb7c306b2d951ab6617f",
"skills/pptx/html2pptx.md": "f08ed7580969b796d9cd5ade93e2cdee981dcaf13cc5eb12e8d4a3700c2d6047",
"skills/pptx/scripts/html2pptx.js": "c675d09a54d6a002e8ca5917b9d24a6568aa8d455bb7abeb212d4f564dd07a34",
"skills/pptx/scripts/thumbnail.py": "c21fd950b6ada7bd2f029885d3e56bc66b7ff061cc8404c492eb301664aa9e5d"
}
},
"agent_result": {
"return_code": 0,
"model_alias": "kimi-code/k3",
"num_assistant_messages": 25,
"num_tool_calls": 114,
"tool_names": [
"Bash",
"Edit",
"Grep",
"Read",
"ReadMediaFile",
"Skill",
"TodoList",
"Write"
],
"session_id": "session_605154fa-66bf-4bb2-89f4-86a48d3dcd8f",
"final_response": "Done. The presentation was built with the official PPTX Skill workflow (SKILL.md → html2pptx.md → pinned `scripts/html2pptx.js` → `scripts/thumbnail.py` visual check).\n\n**Deliverables**\n- Deck: `output/attention-is-all-you-need.pptx` — 13 slides, 16:9\n- Thumbnail grid: `output/full-deck-thumbnail.jpg` (official `thumbnail.py`, 4 cols)\n- Visual manifest: `source_visuals/manifest.json` — 4 entries with `file`, one-based PDF `page`, `label`, faithful `caption`\n- Cropped-from-PDF visuals (all embedded in the deck, each cited on-slide with label + page):\n - `fig1-03.png` — Figure 1, p. 3 (architecture) → cover + slide 4\n - `fig2-04.png` — Figure 2, p. 4 (scaled dot-product / multi-head attention) → slide 5\n - `table2-08.png` — Table 2, p. 8 (BLEU results) → slide 9\n - `fig3-13.png` — Figure 3, p. 13 (attention visualization) → slide 12\n\n**Content coverage** — cover title/authors/venue (1), problem/background (2), key idea (3), Transformer method/architecture (46), why self-attention with Table 1 adapted as a native table (7), training setup (8), key experimental results incl. Table 2 image and a BLEU bar chart (910), generalization to constituency parsing (11), interpretability (12), conclusion (13).\n\n**Validation performed**\n- `html2pptx.js` dimension/overflow validation passed for every HTML slide\n- Full-deck thumbnail grid inspected; every slide also re-rendered at 120220 DPI via LibreOffice/pdftoppm and individually inspected\n- Defects found and fixed: dropped `<sub>` subscript content (rewritten as `d_k`/`d_model` style), inconsistent bullet glyphs (root-caused to duplicate mid-paragraph `<a:pPr>` emitted by pptxgenjs; 75 removed via OOXML post-processing), a broken chart relationship path (normalized to relative), and rounded chart data labels (set to exact `0.00` format)\n- `ooxml/scripts/validate.py` passes on the final packed file; manifest JSON parses and matches the cropped files\n\n**Remaining limitations**\n- Slides were visually verified through LibreOffice rendering, not Microsoft PowerPoint itself; minor font-metric differences are possible there\n- The complexity table on slide 7 is a faithful adaptation of Table 1 (native table, cited as \"Adapted from Table 1, p. 6\") rather than a PDF crop — the four required direct crops are Figures 1, 2, 3 and Table 2"
},
"slide_count": 13,
"section_checks": {
"title": true,
"background": true,
"method": true,
"results": true,
"conclusion": true
},
"source_visuals": [
{
"file": "fig1-03.png",
"sha256": "eac33d539b220d8f092233f0ae589302365890b85444a1fdbfb88597e1eebdce",
"embedded": true,
"page": 3,
"label": "Figure 1",
"caption": "The Transformer - model architecture."
},
{
"file": "fig2-04.png",
"sha256": "66eb2559c7e7483a15a1f13b95babec32b4529b216664a150d974213ac5a8edc",
"embedded": true,
"page": 4,
"label": "Figure 2",
"caption": "(left) Scaled Dot-Product Attention. (right) Multi-Head Attention consists of several attention layers running in parallel."
},
{
"file": "table2-08.png",
"sha256": "8b2ead56595513b994224b6f1be49d6751fa8633b706638092670478b7ddb3c1",
"embedded": true,
"page": 8,
"label": "Table 2",
"caption": "The Transformer achieves better BLEU scores than previous state-of-the-art models on the English-to-German and English-to-French newstest2014 tests at a fraction of the training cost."
},
{
"file": "fig3-13.png",
"sha256": "47e9df791c547feee32f1f88649a70a256ce4552e55fb4ff258a40fd5998ccd6",
"embedded": true,
"page": 13,
"label": "Figure 3",
"caption": "An example of the attention mechanism following long-distance dependencies in the encoder self-attention in layer 5 of 6. Many of the attention heads attend to a distant dependency of the verb 'making', completing the phrase 'making...more difficult'. Attentions here shown only for the word 'making'. Different colors represent different heads. Best viewed in color."
}
],
"embedded_media": {
"ppt/media/image-4-1.png": "eac33d539b220d8f092233f0ae589302365890b85444a1fdbfb88597e1eebdce",
"ppt/media/image-1-2.png": "eac33d539b220d8f092233f0ae589302365890b85444a1fdbfb88597e1eebdce",
"ppt/media/image-5-1.png": "66eb2559c7e7483a15a1f13b95babec32b4529b216664a150d974213ac5a8edc",
"ppt/media/image-12-1.png": "47e9df791c547feee32f1f88649a70a256ce4552e55fb4ff258a40fd5998ccd6",
"ppt/media/image-9-1.png": "8b2ead56595513b994224b6f1be49d6751fa8633b706638092670478b7ddb3c1",
"ppt/media/Slide-13-image-1.png": "629d702b5ca51d6380ada24547bd77941b262b3434e394996946cb7b0bfc8398",
"ppt/media/Slide-1-image-1.png": "629d702b5ca51d6380ada24547bd77941b262b3434e394996946cb7b0bfc8398"
},
"thumbnail_files": [
"workspace/output/full-deck-thumbnail.jpg"
],
"gates": {
"source_pdf_hash_matches": true,
"kimi_run_succeeded": true,
"pptx_skill_invoked": true,
"skill_md_loaded": true,
"html2pptx_guide_loaded": true,
"official_html2pptx_used": true,
"official_thumbnail_used": true,
"thumbnail_visually_inspected": true,
"pptx_zip_valid": true,
"pptx_reopens": true,
"slide_count_in_range": true,
"required_sections_present": true,
"three_source_visuals_embedded_and_documented": true,
"thumbnail_grid_present": true,
"credential_scan_passed": true
},
"official_complete": true,
"artifacts": {
"experiment_protocol.json": {
"sha256": "1316b6c5bca03b76b7fda2c1fc31b9076394bf996cacb4f52add2db98dbae84e",
"bytes": 3709
},
"kimi_stream.jsonl": {
"sha256": "00eaaa3a884c35a203ffbacd65d146b44abf4a5f3a28e9e979a2f83e701541a1",
"bytes": 5595585
},
"workspace/attention-is-all-you-need.pdf": {
"sha256": "bdfaa68d8984f0dc02beaca527b76f207d99b666d31d1da728ee0728182df697",
"bytes": 2215244
},
"workspace/output/attention-is-all-you-need.pptx": {
"sha256": "be890e73d6b4bf91d888079ffb4cd7f63435bfcadd7046b580d64627907de41d",
"bytes": 605203
},
"workspace/source_visuals/manifest.json": {
"sha256": "be3b44999ae79695ac42f3fb7a538fdfc6ce84a53f6173d1547df1f201a0c350",
"bytes": 1091
},
"workspace/output/full-deck-thumbnail.jpg": {
"sha256": "7f7eae7496b8748d3bc1f179b8e3542f5fc05c9e13dac46f4125bf0d782aeabf",
"bytes": 255718
}
}
}
@@ -0,0 +1,65 @@
{
"experiment_id": "2-6",
"protocol_version": "1.1.0",
"frozen_on": "2026-07-30",
"revised_on": "2026-07-31",
"authority": "book/chapter2.md:767",
"runtime": {
"agent": "Claude Code",
"model_alias": "sonnet",
"acceptance_policy": "Runtime-agnostic (author policy, 2026-07-31): acceptance is NOT gated on Anthropic/Claude Code. Any agent runtime + model that supports SKILL.md-style progressive disclosure may complete this experiment, because not every reader has an Anthropic key. The pinned official Anthropic PPTX Skill content, the real paper, and all artifact gates are unchanged; Claude Code remains the reference path for readers who have Anthropic credentials.",
"alternate_runtimes": {
"kimi": {
"agent": "Kimi Code CLI",
"binary": "kimi",
"binary_fallback": "~/.kimi-code/bin/kimi",
"model_alias": "kimi-code/k3",
"auth_environment_variables": ["KIMI_API_KEY", "MOONSHOT_API_KEY"],
"skills_flag": "--skills-dir",
"stream_format": "stream-json"
}
},
"official_skill_repository": "https://github.com/anthropics/skills.git",
"official_skill_revision": "69c0b1a0674149f27b61b2635f935524b6add202",
"skill_path": "skills/pptx",
"revision_reason": "This is the official revision whose PPTX Skill contains the html2pptx.md workflow named by the manuscript; later revision 4e6907a packages that guide as html2pptx.tgz."
},
"paper": {
"title": "Attention Is All You Need",
"authors": "Ashish Vaswani et al.",
"arxiv_id": "1706.03762",
"pdf_url": "https://arxiv.org/pdf/1706.03762",
"pdf_sha256": "bdfaa68d8984f0dc02beaca527b76f207d99b666d31d1da728ee0728182df697"
},
"output": {
"minimum_slides": 10,
"maximum_slides": 15,
"required_sections": [
"title",
"problem/background",
"method/Transformer architecture",
"key results",
"conclusion"
],
"minimum_paper_visuals": 3,
"visual_policy": "At least three images must be extracted or cropped from the source PDF, embedded in the deck, and listed with PDF page and source label in source_visuals/manifest.json."
},
"progressive_disclosure_gates": [
"the agent runtime discovers only PPTX Skill metadata before selection",
"the agent invokes the official pptx Skill and loads its complete SKILL.md",
"the agent reads the complete official html2pptx.md only after selecting the Skill",
"the agent uses the official scripts/html2pptx.js workflow",
"the agent invokes the official scripts/thumbnail.py preview workflow and visually inspects the result"
],
"artifact_gates": [
"the source PDF hash matches the preregistered academic paper",
"the presentation is a valid ZIP/OOXML package and python-pptx reopens it",
"slide count is between 10 and 15 inclusive",
"the five required content sections are present",
"three or more source visual files are byte-identical to media embedded in the PPTX",
"each source visual has a PDF page, paper label, and caption in the visual manifest",
"a full-deck thumbnail grid exists",
"raw agent-runtime stream events, actual model, usage/cost where the runtime reports it, commands, hashes, and credential scan are retained"
],
"claim_policy": "The bundled Python demo is a noncanonical mechanism illustration and cannot satisfy Experiment 2-6. Only a real agent-runtime run with the pinned official Skill and real paper can complete this protocol. The runtime may be Claude Code or an equivalent skills-capable runtime (for example Kimi Code CLI); the pinned official Anthropic PPTX Skill content and every artifact gate below apply identically to either runtime."
}
@@ -0,0 +1,3 @@
{
"return_code": 0
}
@@ -0,0 +1,8 @@
{
"experiment_id": "2-6",
"runtime": "kimi",
"official_complete": true,
"protocol_sha256": "1316b6c5bca03b76b7fda2c1fc31b9076394bf996cacb4f52add2db98dbae84e",
"comparison_sha256": "52f7e327fcf71f2038f0449c70f19f9e7753406511c6bd93660e33a2967bb098",
"pptx_sha256": "be890e73d6b4bf91d888079ffb4cd7f63435bfcadd7046b580d64627907de41d"
}
@@ -0,0 +1,11 @@
{
"repository": "https://github.com/anthropics/skills.git",
"revision": "69c0b1a0674149f27b61b2635f935524b6add202",
"skill_path": "/Users/boj/book/ai-agent-book-exp2-6-mp/chapter2/agent-skills-ppt/external/anthropics-skills/skills/pptx",
"required_file_hashes": {
"skills/pptx/SKILL.md": "b6f25545bfb358739f1532f793458b5dbc87ee009933cb7c306b2d951ab6617f",
"skills/pptx/html2pptx.md": "f08ed7580969b796d9cd5ade93e2cdee981dcaf13cc5eb12e8d4a3700c2d6047",
"skills/pptx/scripts/html2pptx.js": "c675d09a54d6a002e8ca5917b9d24a6568aa8d455bb7abeb212d4f564dd07a34",
"skills/pptx/scripts/thumbnail.py": "c21fd950b6ada7bd2f029885d3e56bc66b7ff061cc8404c492eb301664aa9e5d"
}
}
@@ -0,0 +1,29 @@
Create a polished 1015 slide presentation from the real academic paper at
`attention-is-all-you-need.pdf` using your installed `pptx` Skill. Write the
final deck to `output/attention-is-all-you-need.pptx`.
This is an audited Agent Skills experiment. Follow the official PPTX Skill by
progressive disclosure: invoke the pptx Skill through the Skill tool (this
loads its complete SKILL.md), then read its complete html2pptx.md only after
selection. Use the pinned official `scripts/html2pptx.js` workflow. Use the
official `scripts/thumbnail.py` to make `output/full-deck-thumbnail.jpg`,
inspect the full grid, and fix visible overlap, cutoff, contrast, or alignment
defects before finishing.
Content gates:
- cover title, problem/background, Transformer method/architecture, key
experimental results, and conclusion;
- extract or crop at least three visuals directly from the source PDF (not
invented replacements), place the files under `source_visuals/`, and embed
all of them in the deck;
- create `source_visuals/manifest.json` as a JSON list. Each item must contain
`file`, one-based PDF `page`, the paper's `label` (for example Figure 1 or
Table 2), and a faithful `caption`;
- make every visual consistent with the surrounding slide explanation and
cite its source page/label on-slide.
You may install the Node packages required by the official Skill inside this
workspace. Do not use the repository's bundled `demo.py`, local proxy Skill,
or prewritten sample outline. The final response must name the deck,
thumbnail, visual manifest, slide count, validation performed, and any
remaining limitation.
@@ -0,0 +1,10 @@
{
"runtime": "kimi",
"binary": "/Users/boj/.kimi-code/bin/kimi",
"model_alias": "kimi-code/k3",
"skills_dir": "/Users/boj/book/ai-agent-book-exp2-6-mp/chapter2/agent-skills-ppt/runs/exp2-6-kimi-pptx-20260731-v1/workspace/kimi-skills",
"auth_environment_variables_present": [
"KIMI_API_KEY",
"MOONSHOT_API_KEY"
]
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 120 KiB

@@ -0,0 +1,85 @@
const pptxgen = require('pptxgenjs');
const html2pptx = require('./kimi-skills/pptx/scripts/html2pptx.js');
async function build() {
const pptx = new pptxgen();
pptx.layout = 'LAYOUT_16x9';
pptx.author = 'Kimi';
pptx.title = 'Attention Is All You Need';
// Slides 1-6
await html2pptx('slides/01-cover.html', pptx);
await html2pptx('slides/02-problem.html', pptx);
await html2pptx('slides/03-keyidea.html', pptx);
await html2pptx('slides/04-architecture.html', pptx);
await html2pptx('slides/05-attention.html', pptx);
await html2pptx('slides/06-building-blocks.html', pptx);
// Slide 7: complexity table (adapted from Table 1, p. 6)
const { slide: s7, placeholders: p7 } = await html2pptx('slides/07-why-self-attention.html', pptx);
const hdr = { fill: { color: '4338CA' }, color: 'FFFFFF', bold: true, fontSize: 10 };
const rows = [
[
{ text: 'Layer Type', options: hdr }, { text: 'Complexity per Layer', options: hdr },
{ text: 'Sequential Ops', options: hdr }, { text: 'Max Path Length', options: hdr }
],
['Self-Attention', 'O(n²·d)', 'O(1)', 'O(1)'],
['Recurrent', 'O(n·d²)', 'O(n)', 'O(n)'],
['Convolutional', 'O(k·n·d²)', 'O(1)', 'O(log_k n)'],
['Self-Attention (restricted)', 'O(r·n·d)', 'O(1)', 'O(n/r)']
];
s7.addTable(rows, {
...p7[0],
colW: [1.55, 1.15, 1.0, 1.1],
fontSize: 9.5,
fontFace: 'Arial',
border: { pt: 0.75, color: 'C9C6E8' },
align: 'center',
valign: 'middle',
fill: { color: 'FFFFFF' }
});
// Slides 8-9
await html2pptx('slides/08-training.html', pptx);
await html2pptx('slides/09-results.html', pptx);
// Slide 10: EN-DE BLEU bar chart (values from Table 2, p. 8)
const { slide: s10, placeholders: p10 } = await html2pptx('slides/10-chart.html', pptx);
s10.addChart(pptx.charts.BAR, [{
name: 'BLEU',
labels: ['ByteNet', 'GNMT+RL', 'ConvS2S', 'MoE', 'ConvS2S Ens.', 'TF (base)', 'TF (big)'],
values: [23.75, 24.6, 25.16, 26.03, 26.36, 27.3, 28.4]
}], {
...p10[0],
barDir: 'col',
showLegend: false,
showValue: true,
dataLabelPosition: 'outEnd',
dataLabelFontSize: 9,
dataLabelColor: '1A1633',
dataLabelFormatCode: '0.00',
showCatAxisTitle: false,
catAxisLabelFontSize: 9,
valAxisMinVal: 20,
valAxisMaxVal: 30,
valAxisMajorUnit: 2,
showValAxisTitle: true,
valAxisTitle: 'BLEU (newstest2014)',
valAxisLabelFontSize: 8,
valAxisTitleFontSize: 9,
chartColors: ['9B97B8', '9B97B8', '9B97B8', '9B97B8', '7C3AED', '4338CA', 'F59E0B'],
valAxisLineShow: false,
serAxisLineShow: false,
showCatName: true
});
// Slides 11-13
await html2pptx('slides/11-generalization.html', pptx);
await html2pptx('slides/12-interpretability.html', pptx);
await html2pptx('slides/13-conclusion.html', pptx);
await pptx.writeFile({ fileName: 'output/attention-is-all-you-need.pptx' });
console.log('Saved output/attention-is-all-you-need.pptx');
}
build().catch(e => { console.error(e); process.exit(1); });
@@ -0,0 +1,17 @@
#!/usr/bin/env python3
"""Post-process deck: remove duplicate mid-paragraph <a:pPr> elements that
pptxgenjs emits when list items contain multiple inline-formatting runs.
The duplicate (later) pPr carries buNone, which makes LibreOffice drop the
bullet glyph. Keeping only the first pPr per <a:p> restores uniform bullets."""
import re, glob, sys
pattern = re.compile(r'(</a:r>)\s*<a:pPr\b.*?</a:pPr>', re.S)
total = 0
for path in glob.glob('deckbuild/ppt/slides/slide*.xml'):
xml = open(path, encoding='utf-8').read()
fixed, n = pattern.subn(r'\1', xml)
if n:
open(path, 'w', encoding='utf-8').write(fixed)
total += n
print(f'{path}: removed {n} duplicate pPr')
print(f'total removed: {total}')
@@ -0,0 +1,15 @@
const sharp = require('sharp');
// Cover background: deep indigo -> violet diagonal gradient, rasterized (CSS gradients not supported)
const cover = `<svg xmlns="http://www.w3.org/2000/svg" width="1920" height="1080">
<defs>
<linearGradient id="g" x1="0%" y1="0%" x2="100%" y2="100%">
<stop offset="0%" style="stop-color:#14102E"/>
<stop offset="55%" style="stop-color:#2A1668"/>
<stop offset="100%" style="stop-color:#5B21B6"/>
</linearGradient>
</defs>
<rect width="100%" height="100%" fill="url(#g)"/>
</svg>`;
sharp(Buffer.from(cover)).png().toFile('assets/cover-bg.png').then(() => console.log('assets ok'));
Binary file not shown.

After

Width:  |  Height:  |  Size: 250 KiB

@@ -0,0 +1,805 @@
{
"name": "workspace",
"version": "1.0.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "workspace",
"version": "1.0.0",
"license": "ISC",
"dependencies": {
"playwright": "^1.62.1",
"pptxgenjs": "^4.0.1",
"sharp": "^0.35.3"
}
},
"node_modules/@emnapi/runtime": {
"version": "1.11.3",
"resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.11.3.tgz",
"integrity": "sha512-Xz4Tpyki7XyrpbUK1jR1AhdAdaXyhhY4lZ3neLodmhpuWfy2PAQN5B46sAiU4liOXGLkHypn/qU+jvfWSCYYLA==",
"license": "MIT",
"optional": true,
"dependencies": {
"tslib": "^2.4.0"
}
},
"node_modules/@img/colour": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/@img/colour/-/colour-1.1.0.tgz",
"integrity": "sha512-Td76q7j57o/tLVdgS746cYARfSyxk8iEfRxewL9h4OMzYhbW4TAcppl0mT4eyqXddh6L/jwoM75mo7ixa/pCeQ==",
"license": "MIT",
"engines": {
"node": ">=18"
}
},
"node_modules/@img/sharp-darwin-arm64": {
"version": "0.35.3",
"resolved": "https://registry.npmjs.org/@img/sharp-darwin-arm64/-/sharp-darwin-arm64-0.35.3.tgz",
"integrity": "sha512-RMnFX7YQsMoh7lWfcM4NEHHymBX/rLuKNPVM84XE9ONPcaSCDgE7CHIHpSgPcO2xcRthgBy1HfNO319mwhIAkg==",
"cpu": [
"arm64"
],
"license": "Apache-2.0",
"optional": true,
"os": [
"darwin"
],
"engines": {
"node": ">=20.9.0"
},
"funding": {
"url": "https://opencollective.com/libvips"
},
"optionalDependencies": {
"@img/sharp-libvips-darwin-arm64": "1.3.2"
}
},
"node_modules/@img/sharp-darwin-x64": {
"version": "0.35.3",
"resolved": "https://registry.npmjs.org/@img/sharp-darwin-x64/-/sharp-darwin-x64-0.35.3.tgz",
"integrity": "sha512-Xo+5uFBtLN0BKqieTxiFzFPQAUlBbbH5iBKyRX/z1JrbnYsHTfKJnUfL8+p2TPXr1pXqao4eeL4Rl144uDpK9w==",
"cpu": [
"x64"
],
"license": "Apache-2.0",
"optional": true,
"os": [
"darwin"
],
"engines": {
"node": ">=20.9.0"
},
"funding": {
"url": "https://opencollective.com/libvips"
},
"optionalDependencies": {
"@img/sharp-libvips-darwin-x64": "1.3.2"
}
},
"node_modules/@img/sharp-freebsd-wasm32": {
"version": "0.35.3",
"resolved": "https://registry.npmjs.org/@img/sharp-freebsd-wasm32/-/sharp-freebsd-wasm32-0.35.3.tgz",
"integrity": "sha512-lUxcqWIj2wMQ9BrwNjngcr1gWUr5xgaGThBRqPPalIC2n67Cqj1uPh8NnA/ZhAg8hUbKl+kVHKwgUIwe6ZYPrg==",
"license": "Apache-2.0",
"optional": true,
"os": [
"freebsd"
],
"dependencies": {
"@img/sharp-wasm32": "0.35.3"
},
"engines": {
"node": ">=20.9.0"
},
"funding": {
"url": "https://opencollective.com/libvips"
}
},
"node_modules/@img/sharp-libvips-darwin-arm64": {
"version": "1.3.2",
"resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-arm64/-/sharp-libvips-darwin-arm64-1.3.2.tgz",
"integrity": "sha512-9J6ypZFpQBj4YnePGoq/S38w6nz+vqg5WZLrLGY4YuSemdMq47GMLBPO42MzwdGwpg/agZ7xzZcFHa48xlywfg==",
"cpu": [
"arm64"
],
"license": "LGPL-3.0-or-later",
"optional": true,
"os": [
"darwin"
],
"funding": {
"url": "https://opencollective.com/libvips"
}
},
"node_modules/@img/sharp-libvips-darwin-x64": {
"version": "1.3.2",
"resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-x64/-/sharp-libvips-darwin-x64-1.3.2.tgz",
"integrity": "sha512-m2pW1n6cns9VaubNwsZ+c3CRYjxNQWgJ5gPlnL1nbBcpkBvFm6SCFN5o0psFHI8w9n11NKhFkeEDns98tiqbEw==",
"cpu": [
"x64"
],
"license": "LGPL-3.0-or-later",
"optional": true,
"os": [
"darwin"
],
"funding": {
"url": "https://opencollective.com/libvips"
}
},
"node_modules/@img/sharp-libvips-linux-arm": {
"version": "1.3.2",
"resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm/-/sharp-libvips-linux-arm-1.3.2.tgz",
"integrity": "sha512-1eMLzy92I4J6rmi4mAT8yC3HxOtniyGELlzGbNMLLeqe052ahFQ0h6LFq+lh5DsDIdYViIDst08abvSbcEdLXQ==",
"cpu": [
"arm"
],
"license": "LGPL-3.0-or-later",
"optional": true,
"os": [
"linux"
],
"funding": {
"url": "https://opencollective.com/libvips"
}
},
"node_modules/@img/sharp-libvips-linux-arm64": {
"version": "1.3.2",
"resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm64/-/sharp-libvips-linux-arm64-1.3.2.tgz",
"integrity": "sha512-dqVSFynCox4C/J8kT16V7SIFAns0IjgLwkvYT7p8LQVmJ5OS5b6tI9IGflxTeuBS//zXeFIUbwt5dwxyZ17cnA==",
"cpu": [
"arm64"
],
"license": "LGPL-3.0-or-later",
"optional": true,
"os": [
"linux"
],
"funding": {
"url": "https://opencollective.com/libvips"
}
},
"node_modules/@img/sharp-libvips-linux-ppc64": {
"version": "1.3.2",
"resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-ppc64/-/sharp-libvips-linux-ppc64-1.3.2.tgz",
"integrity": "sha512-3z0NHDxD6n5I9gc05U1eW1AyRm+Gznzq3naMrthPNqE6oYykcogW0l/jfpJdjYnuNl8R7yI9pNbE1XiUeyq0Aw==",
"cpu": [
"ppc64"
],
"license": "LGPL-3.0-or-later",
"optional": true,
"os": [
"linux"
],
"funding": {
"url": "https://opencollective.com/libvips"
}
},
"node_modules/@img/sharp-libvips-linux-riscv64": {
"version": "1.3.2",
"resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-riscv64/-/sharp-libvips-linux-riscv64-1.3.2.tgz",
"integrity": "sha512-bsb4rI+NldGOsXuej2r8OdSS8+zXDVaCWxyWrcv6kneTOlgAHtZABRzBBCwdsPiD90J4myNJuHpg6kA20ImW/w==",
"cpu": [
"riscv64"
],
"license": "LGPL-3.0-or-later",
"optional": true,
"os": [
"linux"
],
"funding": {
"url": "https://opencollective.com/libvips"
}
},
"node_modules/@img/sharp-libvips-linux-s390x": {
"version": "1.3.2",
"resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-s390x/-/sharp-libvips-linux-s390x-1.3.2.tgz",
"integrity": "sha512-/ABshyj8gCpyIrNXnHn4LorDJ0HHm1VhXPBlxZ8zAtfVPAaSafXPGn+sUSIRiwaSBy0mmFjSjiXI5mkcwdChKQ==",
"cpu": [
"s390x"
],
"license": "LGPL-3.0-or-later",
"optional": true,
"os": [
"linux"
],
"funding": {
"url": "https://opencollective.com/libvips"
}
},
"node_modules/@img/sharp-libvips-linux-x64": {
"version": "1.3.2",
"resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-x64/-/sharp-libvips-linux-x64-1.3.2.tgz",
"integrity": "sha512-ITPEtgffGJ0S6G9dRyw/366tJQqFRcHWPHhC+Stpg3Z8AEMrDrTr2lhdz4f/Y/HMbRh//7Z5mBzEpVdi62Oc3w==",
"cpu": [
"x64"
],
"license": "LGPL-3.0-or-later",
"optional": true,
"os": [
"linux"
],
"funding": {
"url": "https://opencollective.com/libvips"
}
},
"node_modules/@img/sharp-libvips-linuxmusl-arm64": {
"version": "1.3.2",
"resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-arm64/-/sharp-libvips-linuxmusl-arm64-1.3.2.tgz",
"integrity": "sha512-zE9EdiUzUmg5mDT5a1rk5fYJ6GWPloTwWBYDS14naqHsL+EaMpDj1AWnpLgh3u0YCORv2Tt50wrcrpYqkP97Kw==",
"cpu": [
"arm64"
],
"license": "LGPL-3.0-or-later",
"optional": true,
"os": [
"linux"
],
"funding": {
"url": "https://opencollective.com/libvips"
}
},
"node_modules/@img/sharp-libvips-linuxmusl-x64": {
"version": "1.3.2",
"resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-x64/-/sharp-libvips-linuxmusl-x64-1.3.2.tgz",
"integrity": "sha512-m0lrLiUt+lBYnCFr8qV/65yMR4E/c7/wf78I5eKTdkEakFAlZ9QlzEM3QIhhAwVeUhLAHLcCq7a7Vszq/oFNZQ==",
"cpu": [
"x64"
],
"license": "LGPL-3.0-or-later",
"optional": true,
"os": [
"linux"
],
"funding": {
"url": "https://opencollective.com/libvips"
}
},
"node_modules/@img/sharp-linux-arm": {
"version": "0.35.3",
"resolved": "https://registry.npmjs.org/@img/sharp-linux-arm/-/sharp-linux-arm-0.35.3.tgz",
"integrity": "sha512-affVWCTLooy8TSxbDx2qkzuDeaWLNVBA+P//FNBirHsXpP2fuBhk5AuboYUnrDnzoXes8GFjpTx0SBFOCRg+FA==",
"cpu": [
"arm"
],
"license": "Apache-2.0",
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=20.9.0"
},
"funding": {
"url": "https://opencollective.com/libvips"
},
"optionalDependencies": {
"@img/sharp-libvips-linux-arm": "1.3.2"
}
},
"node_modules/@img/sharp-linux-arm64": {
"version": "0.35.3",
"resolved": "https://registry.npmjs.org/@img/sharp-linux-arm64/-/sharp-linux-arm64-0.35.3.tgz",
"integrity": "sha512-QgKDspHPnrU+GQ55XPhGwyhC8acLVOOSyAvo1oVfFmrIXLkDNmGWzAfDZ4xK8oSA1qBQrALcHX0G5UZni/SuFQ==",
"cpu": [
"arm64"
],
"license": "Apache-2.0",
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=20.9.0"
},
"funding": {
"url": "https://opencollective.com/libvips"
},
"optionalDependencies": {
"@img/sharp-libvips-linux-arm64": "1.3.2"
}
},
"node_modules/@img/sharp-linux-ppc64": {
"version": "0.35.3",
"resolved": "https://registry.npmjs.org/@img/sharp-linux-ppc64/-/sharp-linux-ppc64-0.35.3.tgz",
"integrity": "sha512-sMd8rDxmpLOwv/7N44klFjOD5DUO7FLdjiXDI0hoxYaf7Ar262dQIEkosE98bps+5HPLtp/EvNqeqQtOycP/IA==",
"cpu": [
"ppc64"
],
"license": "Apache-2.0",
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=20.9.0"
},
"funding": {
"url": "https://opencollective.com/libvips"
},
"optionalDependencies": {
"@img/sharp-libvips-linux-ppc64": "1.3.2"
}
},
"node_modules/@img/sharp-linux-riscv64": {
"version": "0.35.3",
"resolved": "https://registry.npmjs.org/@img/sharp-linux-riscv64/-/sharp-linux-riscv64-0.35.3.tgz",
"integrity": "sha512-0Eob78yjlYPfL5vMNWAW55l3R9Y6BQS/gOfe0ZcP9mEz9ohhKSt4im1hayiknXgf8AWrFqMvJcKIdmLmEe7yeQ==",
"cpu": [
"riscv64"
],
"license": "Apache-2.0",
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=20.9.0"
},
"funding": {
"url": "https://opencollective.com/libvips"
},
"optionalDependencies": {
"@img/sharp-libvips-linux-riscv64": "1.3.2"
}
},
"node_modules/@img/sharp-linux-s390x": {
"version": "0.35.3",
"resolved": "https://registry.npmjs.org/@img/sharp-linux-s390x/-/sharp-linux-s390x-0.35.3.tgz",
"integrity": "sha512-KgAxQ0DxpNOq1rG2t5cgTgShJFGSuU7XO45cqC+1NVOuZnP6tlgZRuSYOfNupGkHID0o3cJOsw4DVeJpMovcGw==",
"cpu": [
"s390x"
],
"license": "Apache-2.0",
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=20.9.0"
},
"funding": {
"url": "https://opencollective.com/libvips"
},
"optionalDependencies": {
"@img/sharp-libvips-linux-s390x": "1.3.2"
}
},
"node_modules/@img/sharp-linux-x64": {
"version": "0.35.3",
"resolved": "https://registry.npmjs.org/@img/sharp-linux-x64/-/sharp-linux-x64-0.35.3.tgz",
"integrity": "sha512-8pqvxubL2PGdhlPy6GLqzDYMUjyRmKAwKHYKixpdJYBUK7PJ0C029XdsnpFIdgRZG68fZiGdHVWcKPvtiPB4cA==",
"cpu": [
"x64"
],
"license": "Apache-2.0",
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=20.9.0"
},
"funding": {
"url": "https://opencollective.com/libvips"
},
"optionalDependencies": {
"@img/sharp-libvips-linux-x64": "1.3.2"
}
},
"node_modules/@img/sharp-linuxmusl-arm64": {
"version": "0.35.3",
"resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-arm64/-/sharp-linuxmusl-arm64-0.35.3.tgz",
"integrity": "sha512-Vz0iQjzzcSX3HCbfwFfCSG/9SCIqyO0mH2sXyiHaAYfBk0cRsCWXRyQYX0ovCK/PAQBbTzQ0dsPQHh5MAFL59w==",
"cpu": [
"arm64"
],
"license": "Apache-2.0",
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=20.9.0"
},
"funding": {
"url": "https://opencollective.com/libvips"
},
"optionalDependencies": {
"@img/sharp-libvips-linuxmusl-arm64": "1.3.2"
}
},
"node_modules/@img/sharp-linuxmusl-x64": {
"version": "0.35.3",
"resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-x64/-/sharp-linuxmusl-x64-0.35.3.tgz",
"integrity": "sha512-6O1NPKcDVj9QEdg7Hx549EX8U0rp6yXQERqru6yRN7fGBn32UvIRJUlWnk+8xDCiG76hXVBbX82NZ/ZKr0euIg==",
"cpu": [
"x64"
],
"license": "Apache-2.0",
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=20.9.0"
},
"funding": {
"url": "https://opencollective.com/libvips"
},
"optionalDependencies": {
"@img/sharp-libvips-linuxmusl-x64": "1.3.2"
}
},
"node_modules/@img/sharp-wasm32": {
"version": "0.35.3",
"resolved": "https://registry.npmjs.org/@img/sharp-wasm32/-/sharp-wasm32-0.35.3.tgz",
"integrity": "sha512-cZ0XkcYGpHZkqW6iCkqTcmUC0CD9DhD5d/qeZlZkfRBn6GnHniZXLUo5+9xw8Iv76YE6LQFN9YNBlKREcCG76w==",
"license": "Apache-2.0 AND LGPL-3.0-or-later AND MIT",
"optional": true,
"dependencies": {
"@emnapi/runtime": "^1.11.1"
},
"engines": {
"node": ">=20.9.0"
},
"funding": {
"url": "https://opencollective.com/libvips"
}
},
"node_modules/@img/sharp-webcontainers-wasm32": {
"version": "0.35.3",
"resolved": "https://registry.npmjs.org/@img/sharp-webcontainers-wasm32/-/sharp-webcontainers-wasm32-0.35.3.tgz",
"integrity": "sha512-2rnq7bX3NzeR2T4YWgz8qiG4h3TSdMe+vN1iQXpJleSJ3SM5zQ8Fy2SyyXAWlbxpEZ2Y+Z4u1BePgJEYbSy80Q==",
"cpu": [
"wasm32"
],
"license": "Apache-2.0",
"optional": true,
"dependencies": {
"@img/sharp-wasm32": "0.35.3"
},
"engines": {
"node": ">=20.9.0"
},
"funding": {
"url": "https://opencollective.com/libvips"
}
},
"node_modules/@img/sharp-win32-arm64": {
"version": "0.35.3",
"resolved": "https://registry.npmjs.org/@img/sharp-win32-arm64/-/sharp-win32-arm64-0.35.3.tgz",
"integrity": "sha512-4bPwFdMbeC4JQ8L8LOyWp6nsHcboP5fxkp6iPOXz2Vg49R42TuMs2whkJ5OAP4/Ul035qOzy0AecOF9VOscn4w==",
"cpu": [
"arm64"
],
"license": "Apache-2.0 AND LGPL-3.0-or-later",
"optional": true,
"os": [
"win32"
],
"engines": {
"node": ">=20.9.0"
},
"funding": {
"url": "https://opencollective.com/libvips"
}
},
"node_modules/@img/sharp-win32-ia32": {
"version": "0.35.3",
"resolved": "https://registry.npmjs.org/@img/sharp-win32-ia32/-/sharp-win32-ia32-0.35.3.tgz",
"integrity": "sha512-r53mXsBN6lFUDiST764SvgwUdHAqM4rPAiDzAmf4fLoB6X/rkfyTrLCg6+g17wJJiCmB3JYgHuUldCWUIRFSXw==",
"cpu": [
"ia32"
],
"license": "Apache-2.0 AND LGPL-3.0-or-later",
"optional": true,
"os": [
"win32"
],
"engines": {
"node": "^20.9.0"
},
"funding": {
"url": "https://opencollective.com/libvips"
}
},
"node_modules/@img/sharp-win32-x64": {
"version": "0.35.3",
"resolved": "https://registry.npmjs.org/@img/sharp-win32-x64/-/sharp-win32-x64-0.35.3.tgz",
"integrity": "sha512-D4y1vNeZrIIJCN+uHaWVtH86B+aCrdMYYjicy9pXHvbGZeGYLLSd3wdVuC37FxVXlU1ARsk84eKWfWMXGYEqvA==",
"cpu": [
"x64"
],
"license": "Apache-2.0 AND LGPL-3.0-or-later",
"optional": true,
"os": [
"win32"
],
"engines": {
"node": ">=20.9.0"
},
"funding": {
"url": "https://opencollective.com/libvips"
}
},
"node_modules/@types/node": {
"version": "22.20.1",
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.20.1.tgz",
"integrity": "sha512-EANqOCF9QFyra+4pfxUcX9STKJpCLjMbObVzljIJomAWSnuSIEAvyzEU53GaajbXJEgdh0iEcPL+DGvpUd4k1Q==",
"license": "MIT",
"dependencies": {
"undici-types": "~6.21.0"
}
},
"node_modules/core-util-is": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz",
"integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==",
"license": "MIT"
},
"node_modules/detect-libc": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz",
"integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==",
"license": "Apache-2.0",
"engines": {
"node": ">=8"
}
},
"node_modules/fsevents": {
"version": "2.3.2",
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz",
"integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==",
"hasInstallScript": true,
"license": "MIT",
"optional": true,
"os": [
"darwin"
],
"engines": {
"node": "^8.16.0 || ^10.6.0 || >=11.0.0"
}
},
"node_modules/https": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/https/-/https-1.0.0.tgz",
"integrity": "sha512-4EC57ddXrkaF0x83Oj8sM6SLQHAWXw90Skqu2M4AEWENZ3F02dFJE/GARA8igO79tcgYqGrD7ae4f5L3um2lgg==",
"license": "ISC"
},
"node_modules/image-size": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/image-size/-/image-size-1.2.1.tgz",
"integrity": "sha512-rH+46sQJ2dlwfjfhCyNx5thzrv+dtmBIhPHk0zgRUukHzZ/kRueTJXoYYsclBaKcSMBWuGbOFXtioLpzTb5euw==",
"license": "MIT",
"dependencies": {
"queue": "6.0.2"
},
"bin": {
"image-size": "bin/image-size.js"
},
"engines": {
"node": ">=16.x"
}
},
"node_modules/immediate": {
"version": "3.0.6",
"resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz",
"integrity": "sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==",
"license": "MIT"
},
"node_modules/inherits": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
"license": "ISC"
},
"node_modules/isarray": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
"integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==",
"license": "MIT"
},
"node_modules/jszip": {
"version": "3.10.1",
"resolved": "https://registry.npmjs.org/jszip/-/jszip-3.10.1.tgz",
"integrity": "sha512-xXDvecyTpGLrqFrvkrUSoxxfJI5AH7U8zxxtVclpsUtMCq4JQ290LY8AW5c7Ggnr/Y/oK+bQMbqK2qmtk3pN4g==",
"license": "(MIT OR GPL-3.0-or-later)",
"dependencies": {
"lie": "~3.3.0",
"pako": "~1.0.2",
"readable-stream": "~2.3.6",
"setimmediate": "^1.0.5"
}
},
"node_modules/lie": {
"version": "3.3.0",
"resolved": "https://registry.npmjs.org/lie/-/lie-3.3.0.tgz",
"integrity": "sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ==",
"license": "MIT",
"dependencies": {
"immediate": "~3.0.5"
}
},
"node_modules/pako": {
"version": "1.0.11",
"resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz",
"integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==",
"license": "(MIT AND Zlib)"
},
"node_modules/playwright": {
"version": "1.62.1",
"resolved": "https://registry.npmjs.org/playwright/-/playwright-1.62.1.tgz",
"integrity": "sha512-0M+L3LAD8/nm554LOla9Ayx0j0tmFZ0FBcoQ7F1VuVHpM/XpiC8RcDzBQB8W5+hA8L22THxELzeF+2WcUzvcLg==",
"license": "Apache-2.0",
"dependencies": {
"playwright-core": "1.62.1"
},
"bin": {
"playwright": "cli.js"
},
"engines": {
"node": ">=20"
},
"optionalDependencies": {
"fsevents": "2.3.2"
}
},
"node_modules/playwright-core": {
"version": "1.62.1",
"resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.62.1.tgz",
"integrity": "sha512-wPYSwEBJY9GHraISXqyqtx0na0LpO3XEX7jNDhntbex7tzUS7kLnZsOlFruFJB4Hi/rhDMjXGqHewDZ68nYZVw==",
"license": "Apache-2.0",
"bin": {
"playwright-core": "cli.js"
},
"engines": {
"node": ">=20"
}
},
"node_modules/pptxgenjs": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/pptxgenjs/-/pptxgenjs-4.0.1.tgz",
"integrity": "sha512-TeJISr8wouAuXw4C1F/mC33xbZs/FuEG6nH9FG1Zj+nuPcGMP5YRHl6X+j3HSUnS1f3at6k75ZZXPMZlA5Lj9A==",
"license": "MIT",
"dependencies": {
"@types/node": "^22.8.1",
"https": "^1.0.0",
"image-size": "^1.2.1",
"jszip": "^3.10.1"
}
},
"node_modules/process-nextick-args": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
"integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==",
"license": "MIT"
},
"node_modules/queue": {
"version": "6.0.2",
"resolved": "https://registry.npmjs.org/queue/-/queue-6.0.2.tgz",
"integrity": "sha512-iHZWu+q3IdFZFX36ro/lKBkSvfkztY5Y7HMiPlOUjhupPcG2JMfst2KKEpu5XndviX/3UhFbRngUPNKtgvtZiA==",
"license": "MIT",
"dependencies": {
"inherits": "~2.0.3"
}
},
"node_modules/readable-stream": {
"version": "2.3.8",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz",
"integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==",
"license": "MIT",
"dependencies": {
"core-util-is": "~1.0.0",
"inherits": "~2.0.3",
"isarray": "~1.0.0",
"process-nextick-args": "~2.0.0",
"safe-buffer": "~5.1.1",
"string_decoder": "~1.1.1",
"util-deprecate": "~1.0.1"
}
},
"node_modules/safe-buffer": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
"license": "MIT"
},
"node_modules/semver": {
"version": "7.8.5",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz",
"integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==",
"license": "ISC",
"bin": {
"semver": "bin/semver.js"
},
"engines": {
"node": ">=10"
}
},
"node_modules/setimmediate": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz",
"integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==",
"license": "MIT"
},
"node_modules/sharp": {
"version": "0.35.3",
"resolved": "https://registry.npmjs.org/sharp/-/sharp-0.35.3.tgz",
"integrity": "sha512-ej0zVHuZGHCiABXcNxeYhpRnPNPAcvbG8RMdBAhDAxLKkCRVSpK3Iyu7qbqw3JMzoj0REeM6f3tJLtVwl0023Q==",
"license": "Apache-2.0",
"dependencies": {
"@img/colour": "^1.1.0",
"detect-libc": "^2.1.2",
"semver": "^7.8.5"
},
"engines": {
"node": ">=20.9.0"
},
"funding": {
"url": "https://opencollective.com/libvips"
},
"optionalDependencies": {
"@img/sharp-darwin-arm64": "0.35.3",
"@img/sharp-darwin-x64": "0.35.3",
"@img/sharp-freebsd-wasm32": "0.35.3",
"@img/sharp-libvips-darwin-arm64": "1.3.2",
"@img/sharp-libvips-darwin-x64": "1.3.2",
"@img/sharp-libvips-linux-arm": "1.3.2",
"@img/sharp-libvips-linux-arm64": "1.3.2",
"@img/sharp-libvips-linux-ppc64": "1.3.2",
"@img/sharp-libvips-linux-riscv64": "1.3.2",
"@img/sharp-libvips-linux-s390x": "1.3.2",
"@img/sharp-libvips-linux-x64": "1.3.2",
"@img/sharp-libvips-linuxmusl-arm64": "1.3.2",
"@img/sharp-libvips-linuxmusl-x64": "1.3.2",
"@img/sharp-linux-arm": "0.35.3",
"@img/sharp-linux-arm64": "0.35.3",
"@img/sharp-linux-ppc64": "0.35.3",
"@img/sharp-linux-riscv64": "0.35.3",
"@img/sharp-linux-s390x": "0.35.3",
"@img/sharp-linux-x64": "0.35.3",
"@img/sharp-linuxmusl-arm64": "0.35.3",
"@img/sharp-linuxmusl-x64": "0.35.3",
"@img/sharp-webcontainers-wasm32": "0.35.3",
"@img/sharp-win32-arm64": "0.35.3",
"@img/sharp-win32-ia32": "0.35.3",
"@img/sharp-win32-x64": "0.35.3"
},
"peerDependenciesMeta": {
"@types/node": {
"optional": true
}
}
},
"node_modules/string_decoder": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
"license": "MIT",
"dependencies": {
"safe-buffer": "~5.1.0"
}
},
"node_modules/tslib": {
"version": "2.8.1",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz",
"integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==",
"license": "0BSD",
"optional": true
},
"node_modules/undici-types": {
"version": "6.21.0",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz",
"integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==",
"license": "MIT"
},
"node_modules/util-deprecate": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
"integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==",
"license": "MIT"
}
}
}
@@ -0,0 +1,18 @@
{
"name": "workspace",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"type": "commonjs",
"dependencies": {
"playwright": "^1.62.1",
"pptxgenjs": "^4.0.1",
"sharp": "^0.35.3"
}
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,31 @@
<!DOCTYPE html>
<html>
<head><style>
html { background: #14102E; }
body { width: 720pt; height: 405pt; margin: 0; padding: 0; font-family: Arial, sans-serif; display: flex; background-image: url('../assets/cover-bg.png'); }
.left { width: 440pt; margin: 44pt 0 44pt 48pt; display: flex; flex-direction: column; }
.kicker { font-size: 10pt; color: #F59E0B; font-weight: bold; letter-spacing: 2pt; margin: 0 0 14pt 0; }
h1 { font-size: 40pt; color: #FFFFFF; margin: 0 0 14pt 0; line-height: 1.1; }
.sub { font-size: 14pt; color: #DDD6FE; margin: 0 0 26pt 0; line-height: 1.35; }
.rule { background: #F59E0B; height: 4pt; width: 72pt; margin: 0 0 26pt 0; }
.authors { font-size: 11pt; color: #EDE9FE; margin: 0 0 6pt 0; line-height: 1.4; }
.affil { font-size: 9.5pt; color: #B8AEE8; margin: 0; }
.card { width: 156pt; margin: 46pt 0 0 16pt; background: #FFFFFF; border-radius: 10pt; padding: 12pt; box-shadow: 4px 4px 18px rgba(0,0,0,0.4); height: 256pt; }
.card img { height: 200pt; display: block; margin: 0 auto; }
.cardcap { font-size: 8pt; color: #5B5876; text-align: center; margin: 8pt 0 0 0; }
</style></head>
<body>
<div class="left">
<p class="kicker">NEURIPS 2017 &middot; ARXIV:1706.03762</p>
<h1>Attention Is<br>All You Need</h1>
<p class="sub">The Transformer: sequence transduction based entirely on attention &mdash; no recurrence, no convolution.</p>
<div class="rule"></div>
<p class="authors">Ashish Vaswani &middot; Noam Shazeer &middot; Niki Parmar &middot; Jakob Uszkoreit<br>Llion Jones &middot; Aidan N. Gomez &middot; &#x141;ukasz Kaiser &middot; Illia Polosukhin</p>
<p class="affil">Google Brain &middot; Google Research &middot; University of Toronto</p>
</div>
<div class="card">
<img src="../source_visuals/fig1-03.png">
<p class="cardcap">The Transformer &mdash; model architecture<br>Figure 1, paper p. 3</p>
</div>
</body>
</html>
@@ -0,0 +1,46 @@
<!DOCTYPE html>
<html>
<head><style>
html { background: #FFFFFF; }
body { width: 720pt; height: 405pt; margin: 0; padding: 0; background: #FAFAFF; font-family: Arial, sans-serif; display: flex; }
.bar { width: 10pt; background: #4338CA; }
.wrap { width: 644pt; margin: 26pt 32pt 22pt 34pt; display: flex; flex-direction: column; }
.kicker { font-size: 9.5pt; color: #7C3AED; font-weight: bold; letter-spacing: 2pt; margin: 0 0 4pt 0; }
h1 { font-size: 23pt; color: #1A1633; margin: 0 0 8pt 0; }
.rule { background: #F59E0B; height: 3pt; width: 60pt; margin: 0 0 14pt 0; }
.cols { display: flex; }
.txt { width: 400pt; }
ul { margin: 0; padding-left: 14pt; font-size: 11pt; color: #2A2740; line-height: 1.4; }
li { margin-bottom: 9pt; }
.stat { width: 200pt; margin-left: 30pt; background: #EEF0FF; border-radius: 10pt; padding: 14pt 16pt; }
.stat p { margin: 0; }
.bignum { font-size: 26pt; color: #4338CA; font-weight: bold; margin: 0; }
.statlab { font-size: 9.5pt; color: #5B5876; margin: 2pt 0 12pt 0; }
.foot { font-size: 8pt; color: #8A86A3; margin-top: auto; margin-bottom: 0; }
</style></head>
<body>
<div class="bar"></div>
<div class="wrap">
<p class="kicker">01 &middot; BACKGROUND</p>
<h1>The Problem: The Limits of Recurrence</h1>
<div class="rule"></div>
<div class="cols">
<div class="txt">
<ul>
<li>Sequence transduction (e.g., machine translation) was dominated by <b>recurrent</b> (LSTM / GRU) and <b>convolutional</b> encoder&ndash;decoder models.</li>
<li>RNNs compute hidden states <b>one position at a time</b>: inherently sequential, so training cannot parallelize across positions in a sequence.</li>
<li>Signals between distant positions must travel a path of <b>O(n) operations</b> &mdash; the longer the path, the harder long-range dependencies are to learn.</li>
<li>Attention mechanisms already existed, but only as an <b>accessory</b> layered on top of RNNs or CNNs.</li>
</ul>
</div>
<div class="stat">
<p class="bignum">O(n)</p>
<p class="statlab">sequential operations per layer in a recurrent network</p>
<p class="bignum">O(n)</p>
<p class="statlab">maximum path length between any two positions</p>
</div>
</div>
<p class="foot">Source: Vaswani et al., &ldquo;Attention Is All You Need&rdquo;, &sect;1 Introduction (paper p. 1&ndash;2).</p>
</div>
</body>
</html>
@@ -0,0 +1,48 @@
<!DOCTYPE html>
<html>
<head><style>
html { background: #FFFFFF; }
body { width: 720pt; height: 405pt; margin: 0; padding: 0; background: #FAFAFF; font-family: Arial, sans-serif; display: flex; }
.bar { width: 10pt; background: #4338CA; }
.wrap { width: 644pt; margin: 26pt 32pt 22pt 34pt; display: flex; flex-direction: column; }
.kicker { font-size: 9.5pt; color: #7C3AED; font-weight: bold; letter-spacing: 2pt; margin: 0 0 4pt 0; }
h1 { font-size: 23pt; color: #1A1633; margin: 0 0 8pt 0; }
.rule { background: #F59E0B; height: 3pt; width: 60pt; margin: 0 0 16pt 0; }
.cards { display: flex; }
.card { width: 198pt; margin-right: 14pt; background: #4338CA; border-radius: 10pt; padding: 14pt 14pt 16pt 14pt; }
.card p { margin: 0; }
.ct { font-size: 13pt; color: #FFFFFF; font-weight: bold; margin: 0 0 6pt 0; }
.cd { font-size: 9.5pt; color: #DDD6FE; line-height: 1.35; }
ul { margin: 16pt 0 0 0; padding-left: 14pt; font-size: 11pt; color: #2A2740; line-height: 1.4; }
li { margin-bottom: 8pt; }
.foot { font-size: 8pt; color: #8A86A3; margin-top: auto; margin-bottom: 0; }
</style></head>
<body>
<div class="bar"></div>
<div class="wrap">
<p class="kicker">02 &middot; KEY IDEA</p>
<h1>The Transformer: Attention Is All You Need</h1>
<div class="rule"></div>
<div class="cards">
<div class="card">
<p class="ct">No Recurrence</p>
<p class="cd">Sequential RNN hidden states are removed entirely &mdash; positions are processed in parallel.</p>
</div>
<div class="card">
<p class="ct">No Convolution</p>
<p class="cd">No fixed-width kernels; every position can connect to every other position directly.</p>
</div>
<div class="card" style="margin-right: 0;">
<p class="ct">Self-Attention Only</p>
<p class="cd">Multi-headed self-attention computes all representations, in both encoder and decoder.</p>
</div>
</div>
<ul>
<li>First sequence transduction model based <b>entirely on attention</b>, replacing recurrent layers with multi-headed self-attention.</li>
<li>Highly parallelizable &mdash; reaches a new state of the art in translation with a <b>fraction of the training cost</b>.</li>
<li>Generalizes beyond translation (e.g., English constituency parsing) and yields interpretable attention patterns.</li>
</ul>
<p class="foot">Source: Vaswani et al., Abstract and &sect;1 (paper p. 1&ndash;2).</p>
</div>
</body>
</html>
@@ -0,0 +1,44 @@
<!DOCTYPE html>
<html>
<head><style>
html { background: #FFFFFF; }
body { width: 720pt; height: 405pt; margin: 0; padding: 0; background: #FAFAFF; font-family: Arial, sans-serif; display: flex; }
.bar { width: 10pt; background: #4338CA; }
.wrap { width: 644pt; margin: 26pt 32pt 22pt 34pt; display: flex; flex-direction: column; }
.kicker { font-size: 9.5pt; color: #7C3AED; font-weight: bold; letter-spacing: 2pt; margin: 0 0 4pt 0; }
h1 { font-size: 23pt; color: #1A1633; margin: 0 0 8pt 0; }
.rule { background: #F59E0B; height: 3pt; width: 60pt; margin: 0 0 12pt 0; }
.cols { display: flex; }
.txt { width: 372pt; }
ul { margin: 0; padding-left: 14pt; font-size: 10.5pt; color: #2A2740; line-height: 1.38; }
li { margin-bottom: 8pt; }
.fig { width: 240pt; margin-left: 26pt; background: #FFFFFF; border: 1px solid #E0DFF0; border-radius: 10pt; padding: 10pt; }
.fig img { height: 262pt; display: block; margin: 0 auto; }
.figcap { font-size: 8pt; color: #5B5876; text-align: center; margin: 6pt 0 0 0; }
.foot { font-size: 8pt; color: #8A86A3; margin-top: auto; margin-bottom: 0; }
</style></head>
<body>
<div class="bar"></div>
<div class="wrap">
<p class="kicker">03 &middot; METHOD</p>
<h1>Model Architecture: Stacked Self-Attention</h1>
<div class="rule"></div>
<div class="cols">
<div class="txt">
<ul>
<li><b>Encoder&ndash;decoder</b> structure built from stacked self-attention and point-wise, fully connected layers (left and right halves of Figure 1).</li>
<li><b>Encoder</b>: N = 6 identical layers &mdash; each with multi-head self-attention, then a position-wise feed-forward network.</li>
<li><b>Decoder</b>: N = 6 layers; adds a <b>masked</b> multi-head self-attention sub-layer (positions only attend to earlier positions) plus attention over the encoder output.</li>
<li>A <b>residual connection</b> wraps every sub-layer, followed by <b>layer normalization</b>.</li>
<li>Inputs/outputs are embedded (d_model = 512) and combined with <b>positional encodings</b>, since the model has no notion of order on its own.</li>
</ul>
</div>
<div class="fig">
<img src="../source_visuals/fig1-03.png">
<p class="figcap">Encoder (left) and decoder (right) stacks.<br>Figure 1, paper p. 3.</p>
</div>
</div>
<p class="foot">Visual: Figure 1, &ldquo;The Transformer - model architecture&rdquo; (paper p. 3); text: &sect;3.1 (paper p. 3).</p>
</div>
</body>
</html>
@@ -0,0 +1,48 @@
<!DOCTYPE html>
<html>
<head><style>
html { background: #FFFFFF; }
body { width: 720pt; height: 405pt; margin: 0; padding: 0; background: #FAFAFF; font-family: Arial, sans-serif; display: flex; }
.bar { width: 10pt; background: #4338CA; }
.wrap { width: 644pt; margin: 26pt 32pt 22pt 34pt; display: flex; flex-direction: column; }
.kicker { font-size: 9.5pt; color: #7C3AED; font-weight: bold; letter-spacing: 2pt; margin: 0 0 4pt 0; }
h1 { font-size: 23pt; color: #1A1633; margin: 0 0 8pt 0; }
.rule { background: #F59E0B; height: 3pt; width: 60pt; margin: 0 0 12pt 0; }
.cols { display: flex; }
.txt { width: 300pt; }
.formula { background: #1A1633; border-radius: 8pt; padding: 10pt 12pt; margin: 0 0 12pt 0; }
.formula p { font-family: Courier New, monospace; font-size: 10.5pt; color: #FDE68A; margin: 0; text-align: center; }
ul { margin: 0; padding-left: 14pt; font-size: 10.5pt; color: #2A2740; line-height: 1.38; }
li { margin-bottom: 8pt; }
.fig { width: 312pt; margin-left: 24pt; background: #FFFFFF; border: 1px solid #E0DFF0; border-radius: 10pt; padding: 10pt; }
.fig img { width: 292pt; display: block; margin: 0 auto; }
.figcap { font-size: 8pt; color: #5B5876; text-align: center; margin: 6pt 0 0 0; }
.foot { font-size: 8pt; color: #8A86A3; margin-top: auto; margin-bottom: 0; }
</style></head>
<body>
<div class="bar"></div>
<div class="wrap">
<p class="kicker">04 &middot; METHOD</p>
<h1>Scaled Dot-Product &amp; Multi-Head Attention</h1>
<div class="rule"></div>
<div class="cols">
<div class="txt">
<div class="formula">
<p>Attention(Q,K,V) = softmax(QK^T / &radic;d_k)V</p>
</div>
<ul>
<li>Attention maps a <b>query</b> and <b>key&ndash;value</b> pairs to an output: a weighted sum of values, weights from query&ndash;key compatibility.</li>
<li>Dot products are scaled by <b>1/&radic;d_k</b> &mdash; for large d_k they would push softmax into tiny-gradient regions.</li>
<li><b>Multi-head</b>: queries, keys, values are linearly projected <b>h = 8</b> times (to d_k = d_v = 64), attention runs in parallel, outputs are concatenated and re-projected.</li>
<li>Different heads jointly attend to information from <b>different representation subspaces</b> at different positions.</li>
</ul>
</div>
<div class="fig">
<img src="../source_visuals/fig2-04.png">
<p class="figcap">(left) Scaled Dot-Product Attention; (right) Multi-Head Attention &mdash; several attention layers in parallel. Figure 2, paper p. 4.</p>
</div>
</div>
<p class="foot">Visual: Figure 2 (paper p. 4); formula and text: &sect;3.2 (paper p. 4&ndash;5).</p>
</div>
</body>
</html>
@@ -0,0 +1,55 @@
<!DOCTYPE html>
<html>
<head><style>
html { background: #FFFFFF; }
body { width: 720pt; height: 405pt; margin: 0; padding: 0; background: #FAFAFF; font-family: Arial, sans-serif; display: flex; }
.bar { width: 10pt; background: #4338CA; }
.wrap { width: 644pt; margin: 26pt 32pt 22pt 34pt; display: flex; flex-direction: column; }
.kicker { font-size: 9.5pt; color: #7C3AED; font-weight: bold; letter-spacing: 2pt; margin: 0 0 4pt 0; }
h1 { font-size: 23pt; color: #1A1633; margin: 0 0 8pt 0; }
.rule { background: #F59E0B; height: 3pt; width: 60pt; margin: 0 0 14pt 0; }
.grid { display: flex; margin-bottom: 12pt; }
.card { width: 300pt; background: #FFFFFF; border: 1px solid #E0DFF0; border-left: 5pt solid #7C3AED; border-radius: 8pt; padding: 10pt 14pt; }
.card p { margin: 0; }
.ct { font-size: 12pt; color: #4338CA; font-weight: bold; margin: 0 0 5pt 0; }
.cd { font-size: 10pt; color: #2A2740; line-height: 1.35; }
.gap { width: 16pt; }
.note { background: #FDF3E0; border-left: 5pt solid #F59E0B; border-radius: 6pt; padding: 9pt 14pt; margin-top: auto; }
.note p { font-size: 10pt; color: #6B4E12; margin: 0; line-height: 1.35; }
.foot { font-size: 8pt; color: #8A86A3; margin: 8pt 0 0 0; }
</style></head>
<body>
<div class="bar"></div>
<div class="wrap">
<p class="kicker">05 &middot; METHOD</p>
<h1>Anatomy of the Building Blocks</h1>
<div class="rule"></div>
<div class="grid">
<div class="card">
<p class="ct">Multi-Head Attention</p>
<p class="cd">h = 8 parallel heads; d_k = d_v = d_model/h = 64, so total compute stays close to single-head attention at full dimension.</p>
</div>
<div class="gap"></div>
<div class="card">
<p class="ct">Position-wise Feed-Forward</p>
<p class="cd">FFN(x) = max(0, xW&#x2081;+b&#x2081;)W&#x2082;+b&#x2082;, applied identically to every position; inner dimension d_ff = 2048.</p>
</div>
</div>
<div class="grid">
<div class="card">
<p class="ct">Add &amp; Norm</p>
<p class="cd">Residual connection around each sub-layer: LayerNorm(x + Sublayer(x)); all sub-layers and embeddings output d_model = 512.</p>
</div>
<div class="gap"></div>
<div class="card">
<p class="ct">Positional Encoding</p>
<p class="cd">Sine/cosine waves of different frequencies injected at the inputs, so the model can use token order; learned alternatives worked equally well.</p>
</div>
</div>
<div class="note">
<p><b>Two configurations:</b> base &mdash; d_model 512, d_ff 2048, h 8, dropout 0.1 &nbsp;|&nbsp; big &mdash; d_model 1024, d_ff 4096, h 16, dropout 0.3.</p>
</div>
<p class="foot">Source: &sect;3.2&ndash;3.5 (paper p. 4&ndash;5); &sect;5.4 and Table 3 footnotes (paper p. 7&ndash;8).</p>
</div>
</body>
</html>
@@ -0,0 +1,44 @@
<!DOCTYPE html>
<html>
<head><style>
html { background: #FFFFFF; }
body { width: 720pt; height: 405pt; margin: 0; padding: 0; background: #FAFAFF; font-family: Arial, sans-serif; display: flex; }
.bar { width: 10pt; background: #4338CA; }
.wrap { width: 644pt; margin: 26pt 32pt 22pt 34pt; display: flex; flex-direction: column; }
.kicker { font-size: 9.5pt; color: #7C3AED; font-weight: bold; letter-spacing: 2pt; margin: 0 0 4pt 0; }
h1 { font-size: 23pt; color: #1A1633; margin: 0 0 8pt 0; }
.rule { background: #F59E0B; height: 3pt; width: 60pt; margin: 0 0 12pt 0; }
.cols { display: flex; }
.txt { width: 290pt; }
ul { margin: 0; padding-left: 14pt; font-size: 10.5pt; color: #2A2740; line-height: 1.38; }
li { margin-bottom: 9pt; }
.tabwrap { width: 330pt; margin-left: 22pt; }
.tablab { font-size: 9pt; color: #5B5876; margin: 0 0 4pt 0; font-weight: bold; }
.tabcap { font-size: 8pt; color: #5B5876; margin: 6pt 0 0 0; }
.foot { font-size: 8pt; color: #8A86A3; margin-top: auto; margin-bottom: 0; }
</style></head>
<body>
<div class="bar"></div>
<div class="wrap">
<p class="kicker">06 &middot; MOTIVATION</p>
<h1>Why Self-Attention Wins</h1>
<div class="rule"></div>
<div class="cols">
<div class="txt">
<ul>
<li><b>Parallelization:</b> a self-attention layer needs only O(1) sequential operations vs. O(n) for recurrence &mdash; training uses all positions at once.</li>
<li><b>Long-range learning:</b> any two positions connect through a path of <b>constant length O(1)</b>, instead of O(n) for RNNs or O(log_k n) for dilated convolutions.</li>
<li><b>Cost:</b> per-layer complexity O(n&sup2;&middot;d) beats recurrence O(n&middot;d&sup2;) whenever n &lt; d &mdash; the common case with word-piece / BPE representations.</li>
<li><b>Interpretability:</b> attention distributions expose what the model attends to; heads learn distinct, task-like behaviors.</li>
</ul>
</div>
<div class="tabwrap">
<p class="tablab">PER-LAYER COMPLEXITY AND PATH LENGTHS</p>
<div id="table-complexity" class="placeholder" style="width: 330pt; height: 150pt;"></div>
<p class="tabcap">n = sequence length, d = representation dimension, k = conv. kernel width, r = neighborhood. Adapted from Table 1, paper p. 6.</p>
</div>
</div>
<p class="foot">Table: adapted from Table 1 (paper p. 6); text: &sect;4 (paper p. 6&ndash;7).</p>
</div>
</body>
</html>
@@ -0,0 +1,54 @@
<!DOCTYPE html>
<html>
<head><style>
html { background: #FFFFFF; }
body { width: 720pt; height: 405pt; margin: 0; padding: 0; background: #FAFAFF; font-family: Arial, sans-serif; display: flex; }
.bar { width: 10pt; background: #4338CA; }
.wrap { width: 644pt; margin: 26pt 32pt 22pt 34pt; display: flex; flex-direction: column; }
.kicker { font-size: 9.5pt; color: #7C3AED; font-weight: bold; letter-spacing: 2pt; margin: 0 0 4pt 0; }
h1 { font-size: 23pt; color: #1A1633; margin: 0 0 8pt 0; }
.rule { background: #F59E0B; height: 3pt; width: 60pt; margin: 0 0 14pt 0; }
.cols { display: flex; }
.card { width: 302pt; background: #FFFFFF; border: 1px solid #E0DFF0; border-radius: 10pt; padding: 12pt 16pt 4pt 16pt; }
.card p { margin: 0; }
.ct { font-size: 12.5pt; color: #4338CA; font-weight: bold; margin: 0 0 8pt 0; }
ul { margin: 0; padding-left: 13pt; font-size: 10pt; color: #2A2740; line-height: 1.35; }
li { margin-bottom: 7pt; }
.gap { width: 20pt; }
.mono { font-family: Courier New, monospace; font-size: 9pt; color: #4338CA; }
.hw { background: #EEF0FF; border-radius: 8pt; padding: 9pt 14pt; margin-top: 14pt; }
.hw p { font-size: 10pt; color: #2A2740; margin: 0; }
.foot { font-size: 8pt; color: #8A86A3; margin-top: auto; margin-bottom: 0; }
</style></head>
<body>
<div class="bar"></div>
<div class="wrap">
<p class="kicker">07 &middot; EXPERIMENTS</p>
<h1>Training Setup</h1>
<div class="rule"></div>
<div class="cols">
<div class="card">
<p class="ct">Data &amp; Batching</p>
<ul>
<li><b>WMT 2014 English&ndash;German</b>: 4.5M sentence pairs; <b>English&ndash;French</b>: 36M sentences.</li>
<li>Byte-pair encoding with a <b>shared source&ndash;target vocabulary of ~37K tokens</b>.</li>
<li>Batches of ~25,000 source and ~25,000 target tokens, grouped by approximate sequence length.</li>
</ul>
</div>
<div class="gap"></div>
<div class="card">
<p class="ct">Optimization &amp; Regularization</p>
<ul>
<li>Adam (&beta;&#x2081; = 0.9, &beta;&#x2082; = 0.98, &epsilon; = 10&#x207B;&#x2079;) with <b>warmup</b>: 4,000 linearly increasing steps, then inverse-square-root decay.</li>
<li>Residual dropout 0.1 (base) / 0.3 (big); attention dropout on each sub-layer.</li>
<li>Label smoothing &epsilon;_ls = 0.1 &mdash; hurts perplexity but <b>improves accuracy and BLEU</b>.</li>
</ul>
</div>
</div>
<div class="hw">
<p><b>Hardware &amp; time:</b> 8 &times; NVIDIA P100 GPUs &mdash; base model: 12 hours (100K steps); big model: 3.5 days (300K steps). Beam search with beam size 4, length penalty &alpha; = 0.6.</p>
</div>
<p class="foot">Source: &sect;5 Training (paper p. 7); &sect;6.1 (paper p. 8).</p>
</div>
</body>
</html>
@@ -0,0 +1,52 @@
<!DOCTYPE html>
<html>
<head><style>
html { background: #FFFFFF; }
body { width: 720pt; height: 405pt; margin: 0; padding: 0; background: #FAFAFF; font-family: Arial, sans-serif; display: flex; }
.bar { width: 10pt; background: #4338CA; }
.wrap { width: 644pt; margin: 26pt 32pt 22pt 34pt; display: flex; flex-direction: column; }
.kicker { font-size: 9.5pt; color: #7C3AED; font-weight: bold; letter-spacing: 2pt; margin: 0 0 4pt 0; }
h1 { font-size: 23pt; color: #1A1633; margin: 0 0 8pt 0; }
.rule { background: #F59E0B; height: 3pt; width: 60pt; margin: 0 0 12pt 0; }
.cols { display: flex; }
.fig { width: 396pt; background: #FFFFFF; border: 1px solid #E0DFF0; border-radius: 10pt; padding: 10pt; }
.fig img { width: 376pt; display: block; margin: 0 auto; }
.figcap { font-size: 8pt; color: #5B5876; text-align: center; margin: 6pt 0 0 0; }
.stats { width: 196pt; margin-left: 22pt; }
.stat { background: #4338CA; border-radius: 10pt; padding: 10pt 14pt; margin-bottom: 10pt; }
.stat p { margin: 0; }
.bignum { font-size: 22pt; color: #FFFFFF; font-weight: bold; }
.statlab { font-size: 8.5pt; color: #DDD6FE; line-height: 1.3; margin-top: 2pt; }
.stat.amber { background: #B45309; }
.foot { font-size: 8pt; color: #8A86A3; margin-top: auto; margin-bottom: 0; }
</style></head>
<body>
<div class="bar"></div>
<div class="wrap">
<p class="kicker">08 &middot; RESULTS</p>
<h1>Machine Translation: New State of the Art</h1>
<div class="rule"></div>
<div class="cols">
<div class="fig">
<img src="../source_visuals/table2-08.png">
<p class="figcap">BLEU scores and training costs on WMT 2014 EN&ndash;DE / EN&ndash;FR (newstest2014). Table 2, paper p. 8.</p>
</div>
<div class="stats">
<div class="stat">
<p class="bignum">28.4 BLEU</p>
<p class="statlab">EN&rarr;DE: &gt;2.0 above the best previously reported model, including ensembles</p>
</div>
<div class="stat">
<p class="bignum">41.8 BLEU</p>
<p class="statlab">EN&rarr;FR: best single model, at under 1/4 of the prior training cost</p>
</div>
<div class="stat amber">
<p class="bignum">3.3&times;10^18</p>
<p class="statlab">FLOPs to train the base model &mdash; yet it already beats all prior models and ensembles</p>
</div>
</div>
</div>
<p class="foot">Visual: Table 2 (paper p. 8); text: &sect;6.1 Machine Translation (paper p. 8).</p>
</div>
</body>
</html>
@@ -0,0 +1,34 @@
<!DOCTYPE html>
<html>
<head><style>
html { background: #FFFFFF; }
body { width: 720pt; height: 405pt; margin: 0; padding: 0; background: #FAFAFF; font-family: Arial, sans-serif; display: flex; }
.bar { width: 10pt; background: #4338CA; }
.wrap { width: 644pt; margin: 26pt 32pt 22pt 34pt; display: flex; flex-direction: column; }
.kicker { font-size: 9.5pt; color: #7C3AED; font-weight: bold; letter-spacing: 2pt; margin: 0 0 4pt 0; }
h1 { font-size: 23pt; color: #1A1633; margin: 0 0 8pt 0; }
.rule { background: #F59E0B; height: 3pt; width: 60pt; margin: 0 0 10pt 0; }
.chartwrap { margin: 0 auto; }
#chart-bleu { margin: 0 auto; }
.chartcap { font-size: 9pt; color: #5B5876; text-align: center; margin: 6pt 0 0 0; }
.takeaway { background: #FDF3E0; border-left: 5pt solid #F59E0B; border-radius: 6pt; padding: 8pt 14pt; margin-top: auto; }
.takeaway p { font-size: 10pt; color: #6B4E12; margin: 0; }
.foot { font-size: 8pt; color: #8A86A3; margin: 8pt 0 0 0; }
</style></head>
<body>
<div class="bar"></div>
<div class="wrap">
<p class="kicker">09 &middot; RESULTS</p>
<h1>EN&rarr;DE BLEU: Transformer vs. Prior Art</h1>
<div class="rule"></div>
<div class="chartwrap">
<div id="chart-bleu" class="placeholder" style="width: 460pt; height: 218pt; margin: 0 auto;"></div>
<p class="chartcap">WMT 2014 English&rarr;German newstest2014 BLEU scores &mdash; values from Table 2, paper p. 8.</p>
</div>
<div class="takeaway">
<p>The big Transformer sets a new state of the art (28.4 BLEU) &mdash; more than 2.0 BLEU above the best previously reported models, including ensembles.</p>
</div>
<p class="foot">Data: Table 2 (paper p. 8); discussion: &sect;6.1 (paper p. 8).</p>
</div>
</body>
</html>
@@ -0,0 +1,51 @@
<!DOCTYPE html>
<html>
<head><style>
html { background: #FFFFFF; }
body { width: 720pt; height: 405pt; margin: 0; padding: 0; background: #FAFAFF; font-family: Arial, sans-serif; display: flex; }
.bar { width: 10pt; background: #4338CA; }
.wrap { width: 644pt; margin: 26pt 32pt 22pt 34pt; display: flex; flex-direction: column; }
.kicker { font-size: 9.5pt; color: #7C3AED; font-weight: bold; letter-spacing: 2pt; margin: 0 0 4pt 0; }
h1 { font-size: 23pt; color: #1A1633; margin: 0 0 8pt 0; }
.rule { background: #F59E0B; height: 3pt; width: 60pt; margin: 0 0 14pt 0; }
.cols { display: flex; }
.txt { width: 380pt; }
ul { margin: 0; padding-left: 14pt; font-size: 11pt; color: #2A2740; line-height: 1.4; }
li { margin-bottom: 10pt; }
.stats { width: 210pt; margin-left: 30pt; }
.stat { background: #4338CA; border-radius: 10pt; padding: 12pt 16pt; margin-bottom: 12pt; }
.stat p { margin: 0; }
.bignum { font-size: 24pt; color: #FFFFFF; font-weight: bold; }
.statlab { font-size: 9pt; color: #DDD6FE; line-height: 1.3; margin-top: 3pt; }
.foot { font-size: 8pt; color: #8A86A3; margin-top: auto; margin-bottom: 0; }
</style></head>
<body>
<div class="bar"></div>
<div class="wrap">
<p class="kicker">10 &middot; RESULTS</p>
<h1>Beyond Translation: Constituency Parsing</h1>
<div class="rule"></div>
<div class="cols">
<div class="txt">
<ul>
<li>A <b>4-layer Transformer</b> was trained on English constituency parsing (Wall Street Journal portion of the Penn Treebank, ~40K training sentences).</li>
<li>With almost <b>no task-specific tuning</b>, it outperforms the BerkeleyParser &mdash; even when trained only on the WSJ training set.</li>
<li>In the <b>semi-supervised</b> setting (with a ~17M-sentence high-confidence corpus) it beats all previously reported models <b>except the Recurrent Neural Network Grammar</b>.</li>
<li>The same architecture generalizes across tasks without structural changes.</li>
</ul>
</div>
<div class="stats">
<div class="stat">
<p class="bignum">91.3 F1</p>
<p class="statlab">WSJ-only, discriminative setting (Section 23 of WSJ)</p>
</div>
<div class="stat">
<p class="bignum">92.7 F1</p>
<p class="statlab">Semi-supervised setting &mdash; above every prior model except RNNG</p>
</div>
</div>
</div>
<p class="foot">Source: Table 4 (paper p. 10) and &sect;6.2 / &ldquo;English Constituency Parsing&rdquo; (paper p. 9&ndash;10).</p>
</div>
</body>
</html>
@@ -0,0 +1,47 @@
<!DOCTYPE html>
<html>
<head><style>
html { background: #FFFFFF; }
body { width: 720pt; height: 405pt; margin: 0; padding: 0; background: #FAFAFF; font-family: Arial, sans-serif; display: flex; }
.bar { width: 10pt; background: #4338CA; }
.wrap { width: 644pt; margin: 26pt 32pt 22pt 34pt; display: flex; flex-direction: column; }
.kicker { font-size: 9.5pt; color: #7C3AED; font-weight: bold; letter-spacing: 2pt; margin: 0 0 4pt 0; }
h1 { font-size: 23pt; color: #1A1633; margin: 0 0 8pt 0; }
.rule { background: #F59E0B; height: 3pt; width: 60pt; margin: 0 0 12pt 0; }
.cols { display: flex; }
.txt { width: 282pt; }
ul { margin: 0; padding-left: 14pt; font-size: 10.5pt; color: #2A2740; line-height: 1.38; }
li { margin-bottom: 9pt; }
.quote { background: #EEF0FF; border-left: 4pt solid #7C3AED; border-radius: 6pt; padding: 8pt 12pt; margin-top: 10pt; }
.quote p { font-size: 9.5pt; color: #4338CA; font-style: italic; margin: 0; line-height: 1.35; }
.fig { width: 330pt; margin-left: 24pt; background: #FFFFFF; border: 1px solid #E0DFF0; border-radius: 10pt; padding: 10pt; }
.fig img { width: 310pt; display: block; margin: 0 auto; }
.figcap { font-size: 8pt; color: #5B5876; text-align: center; margin: 6pt 0 0 0; }
.foot { font-size: 8pt; color: #8A86A3; margin-top: auto; margin-bottom: 0; }
</style></head>
<body>
<div class="bar"></div>
<div class="wrap">
<p class="kicker">11 &middot; RESULTS</p>
<h1>Interpretability: What Attention Sees</h1>
<div class="rule"></div>
<div class="cols">
<div class="txt">
<ul>
<li>Individual attention heads learn to perform <b>different tasks</b>; many exhibit behavior tied to the syntactic and semantic structure of sentences.</li>
<li>In this example (encoder self-attention, layer 5 of 6), many heads attend to a <b>distant dependency of the verb &ldquo;making&rdquo;</b>, completing the phrase &ldquo;making&hellip;more difficult&rdquo;.</li>
<li>Other heads are involved in <b>anaphora resolution</b> (Figure 4 of the paper).</li>
</ul>
<div class="quote">
<p>&ldquo;Not only do individual attention heads clearly learn to perform different tasks, many appear to exhibit behavior related to the syntactic and semantic structure of the sentences.&rdquo; &mdash; &sect;4, p. 7</p>
</div>
</div>
<div class="fig">
<img src="../source_visuals/fig3-13.png">
<p class="figcap">Attention for the word &ldquo;making&rdquo;; colors = different heads. Figure 3, paper p. 13.</p>
</div>
</div>
<p class="foot">Visual: Figure 3 (paper p. 13); text: &sect;4 (paper p. 7) and Appendix (paper p. 13).</p>
</div>
</body>
</html>
@@ -0,0 +1,33 @@
<!DOCTYPE html>
<html>
<head><style>
html { background: #14102E; }
body { width: 720pt; height: 405pt; margin: 0; padding: 0; font-family: Arial, sans-serif; display: flex; background-image: url('../assets/cover-bg.png'); }
.wrap { width: 620pt; margin: 30pt 50pt 24pt 50pt; display: flex; flex-direction: column; }
.kicker { font-size: 9.5pt; color: #F59E0B; font-weight: bold; letter-spacing: 2pt; margin: 0 0 4pt 0; }
h1 { font-size: 24pt; color: #FFFFFF; margin: 0 0 8pt 0; }
.rule { background: #F59E0B; height: 3pt; width: 60pt; margin: 0 0 14pt 0; }
ul { margin: 0; padding-left: 15pt; font-size: 11pt; color: #EDE9FE; line-height: 1.42; }
li { margin-bottom: 8pt; }
.quote { background: #3B2380; border-left: 4pt solid #F59E0B; border-radius: 6pt; padding: 10pt 14pt; margin-top: auto; }
.quote p { font-size: 10pt; color: #DDD6FE; font-style: italic; margin: 0; line-height: 1.4; }
.foot { font-size: 8pt; color: #B8AEE8; margin: 10pt 0 0 0; }
</style></head>
<body>
<div class="wrap">
<p class="kicker">12 &middot; CONCLUSION</p>
<h1>Conclusion &amp; Legacy</h1>
<div class="rule"></div>
<ul>
<li>The <b>Transformer</b>: the first sequence transduction model based entirely on attention &mdash; multi-headed self-attention replaces recurrent layers in encoder&ndash;decoder architectures.</li>
<li>Trains <b>significantly faster</b> than recurrent or convolutional architectures thanks to full parallelization.</li>
<li>New state of the art on <b>WMT 2014 EN&rarr;DE (28.4 BLEU)</b> and <b>EN&rarr;FR (41.8 BLEU)</b>, at a fraction of the previous training cost.</li>
<li>The architecture became the foundation of modern large language models (BERT, GPT, and their successors) &mdash; attention really was all you needed.</li>
</ul>
<div class="quote">
<p>&ldquo;We are excited about the future of attention-based models and plan to apply them to other tasks.&rdquo; &mdash; Vaswani et al., &sect;7 Conclusion (paper p. 10)</p>
</div>
<p class="foot">Vaswani, Shazeer, Parmar, Uszkoreit, Jones, Gomez, Kaiser, Polosukhin. &ldquo;Attention Is All You Need.&rdquo; NeurIPS 2017 (arXiv:1706.03762). All figures/tables shown are cropped from the original paper PDF.</p>
</div>
</body>
</html>
Binary file not shown.

After

Width:  |  Height:  |  Size: 95 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

@@ -0,0 +1,26 @@
[
{
"file": "fig1-03.png",
"page": 3,
"label": "Figure 1",
"caption": "The Transformer - model architecture."
},
{
"file": "fig2-04.png",
"page": 4,
"label": "Figure 2",
"caption": "(left) Scaled Dot-Product Attention. (right) Multi-Head Attention consists of several attention layers running in parallel."
},
{
"file": "table2-08.png",
"page": 8,
"label": "Table 2",
"caption": "The Transformer achieves better BLEU scores than previous state-of-the-art models on the English-to-German and English-to-French newstest2014 tests at a fraction of the training cost."
},
{
"file": "fig3-13.png",
"page": 13,
"label": "Figure 3",
"caption": "An example of the attention mechanism following long-distance dependencies in the encoder self-attention in layer 5 of 6. Many of the attention heads attend to a distant dependency of the verb 'making', completing the phrase 'making...more difficult'. Attentions here shown only for the word 'making'. Different colors represent different heads. Best viewed in color."
}
]
Binary file not shown.

After

Width:  |  Height:  |  Size: 120 KiB