Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 40 additions & 8 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ const config = {
type: "docSidebar",
sidebarId: "guideSidebar",
position: "left",
label: "User Guide",
label: "Guides",
},
{
type: "docSidebar",
Expand All @@ -170,22 +170,54 @@ const config = {
style: "dark",
links: [
{
title: "User Guide",
title: "Architecture",
items: [
{
label: "How to Use",
to: "docs/guide",
label: "Overview",
to: "docs/architecture",
},
{
label: "Inference Scheduler",
to: "docs/architecture/Components/inference-scheduler",
},
{
label: "KV Cache Manager",
to: "docs/architecture/Components/kv-cache-manager",
},
{
label: "Model Service",
to: "docs/architecture/Components/modelservice",
},
{
label: "Benchmark Tools",
to: "docs/architecture/Components/benchmark",
},
],
},
{
title: "Architecture",
title: "Guides",
items: [
{
label: "Overview",
to: "docs/architecture",
label: "Getting Started",
to: "docs/guide",
},
{
label: "Prerequisites",
to: "docs/guide/Installation/prerequisites",
},
{
label: "Inference Scheduling",
to: "docs/guide/Installation/inference-scheduling",
},
{
label: "Prefill/Decode Disaggregation",
to: "docs/guide/Installation/pd-disaggregation",
},
],
{
label: "Wide Expert Parallelism",
to: "docs/guide/Installation/wide-ep-lws",
},
],
},
{
title: "Community",
Expand Down
14 changes: 2 additions & 12 deletions remote-content/remote-content.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,7 @@ import architectureMainSource from './remote-sources/architecture/architecture-m
import componentSources from './remote-sources/architecture/components-generator.js';

// Import guide remote content sources
import guideExamplesSource from './remote-sources/guide/guide-examples.js';
import guidePrerequisitesSource from './remote-sources/guide/guide-prerequisites.js';
import guideInferenceSchedulingSource from './remote-sources/guide/guide-inference-scheduling.js';
import guidePdDisaggregationSource from './remote-sources/guide/guide-pd-disaggregation.js';
import guideWideEpLwsSource from './remote-sources/guide/guide-wide-ep-lws.js';
import guidePrecisePrefixCacheAwareSource from './remote-sources/guide/guide-precise-prefix-cache-aware.js';
import guideSources from './remote-sources/guide/guide-generator.js';

/**
* Remote Content Plugin System
Expand Down Expand Up @@ -48,12 +43,7 @@ const remoteContentPlugins = [
...componentSources, // Spread all dynamically generated component sources

// Guide remote content sources (docs/guide/)
guideExamplesSource,
guidePrerequisitesSource,
guideInferenceSchedulingSource,
guidePdDisaggregationSource,
guideWideEpLwsSource,
guidePrecisePrefixCacheAwareSource,
...guideSources, // Spread all dynamically generated guide sources

// Add more remote sources here in the appropriate section above
];
Expand Down
64 changes: 0 additions & 64 deletions remote-content/remote-sources/guide/guide-examples.js

This file was deleted.

155 changes: 155 additions & 0 deletions remote-content/remote-sources/guide/guide-generator.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
/**
* Dynamic Guide Generator
*
* Automatically discovers and generates guide pages from the llm-d repository's guides directory.
* This replaces the individual guide files and consolidates all guide content management.
*/

import { createContentWithSource, createStandardTransform } from '../utils.js';
import { findRepoConfig, generateRepoUrls } from '../component-configs.js';

// Get repository configuration for the main llm-d repo
const repoConfig = findRepoConfig('llm-d');
const { repoUrl, sourceBaseUrl } = generateRepoUrls(repoConfig);
const contentTransform = createStandardTransform('llm-d');

/**
* Configuration for special guide mappings
*/
const SPECIAL_GUIDES = {
'prerequisites': {
sourceFile: 'guides/QUICKSTART.md',
title: 'Prerequisites',
description: 'Prerequisites for running the llm-d QuickStart',
sidebarLabel: 'Prerequisites',
sidebarPosition: 1,
outputFile: 'prerequisites.md'
},
'guide': {
sourceFile: 'guides/README.md',
title: 'Guides',
description: 'Getting started with llm-d and exploring well-lit paths for different use cases',
sidebarLabel: 'Guides',
sidebarPosition: 1,
outputFile: 'guide.md',
customTransform: contentTransform
}
};

/**
* Configuration for dynamic guide discovery
* These are the directories in guides/ that contain README.md files
* with their descriptive titles and sidebar positions
*/
const DYNAMIC_GUIDES = [
{
dirName: 'inference-scheduling',
title: 'Intelligent Inference Scheduling',
description: 'Well-lit path for intelligent inference scheduling with load balancing',
sidebarPosition: 2
},
{
dirName: 'pd-disaggregation',
title: 'Prefill/Decode Disaggregation',
description: 'Well-lit path for separating prefill and decode operations',
sidebarPosition: 3
},
{
dirName: 'precise-prefix-cache-aware',
title: 'Precise Prefix Cache Aware Routing',
description: 'Feature guide for precise prefix cache aware routing',
sidebarPosition: 4
},
{
dirName: 'simulated-accelerators',
title: 'Accelerator Simulation',
description: 'Feature guide for llm-d accelerator simulation',
sidebarPosition: 5
},
{
dirName: 'wide-ep-lws',
title: 'Wide Expert Parallelism with LeaderWorkerSet',
description: 'Well-lit path for wide expert parallelism using LeaderWorkerSet',
sidebarPosition: 6
}
];

/**
* Create plugin configurations for all guides
*/
function createGuidePlugins() {
const plugins = [];

// Add special guides (prerequisites and main guide)
Object.entries(SPECIAL_GUIDES).forEach(([name, config]) => {
plugins.push([
'docusaurus-plugin-remote-content',
{
name: `guide-${name}`,
sourceBaseUrl,
outDir: name === 'guide' ? 'docs/guide' : 'docs/guide/Installation',
documents: [config.sourceFile],
noRuntimeDownloads: false,
performCleanup: true,

modifyContent(filename, content) {
if (filename === config.sourceFile) {
return createContentWithSource({
title: config.title,
description: config.description,
sidebarLabel: config.sidebarLabel,
sidebarPosition: config.sidebarPosition,
filename: config.sourceFile,
newFilename: config.outputFile,
repoUrl,
branch: repoConfig.branch,
content,
contentTransform: config.customTransform || contentTransform
});
}
return undefined;
},
},
]);
});

// Add dynamic guides
DYNAMIC_GUIDES.forEach((guide) => {
const sourceFile = `guides/${guide.dirName}/README.md`;

plugins.push([
'docusaurus-plugin-remote-content',
{
name: `guide-${guide.dirName}`,
sourceBaseUrl,
outDir: 'docs/guide/Installation',
documents: [sourceFile],
noRuntimeDownloads: false,
performCleanup: true,

modifyContent(filename, content) {
if (filename === sourceFile) {
return createContentWithSource({
title: guide.title,
description: guide.description,
sidebarLabel: guide.title,
sidebarPosition: guide.sidebarPosition,
filename: sourceFile,
newFilename: `${guide.dirName}.md`,
repoUrl,
branch: repoConfig.branch,
content,
contentTransform
});
}
return undefined;
},
},
]);
});

return plugins;
}

// Export all guide plugins
export default createGuidePlugins();
48 changes: 0 additions & 48 deletions remote-content/remote-sources/guide/guide-inference-scheduling.js

This file was deleted.

Loading