diff --git a/.github/workflows/fern-docs-ci.yml b/.github/workflows/fern-docs-ci.yml new file mode 100644 index 0000000000..d7f5794028 --- /dev/null +++ b/.github/workflows/fern-docs-ci.yml @@ -0,0 +1,49 @@ +# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Validates Fern autodocs generation (fern/product-docs) on pull requests. +# Output is gitignored; see fern/AUTODOCS_GUIDE.md and docs.yml `libraries`. + +name: Fern docs (autodocs) + +on: + pull_request: + paths: + - 'fern/**' + - '.github/workflows/fern-docs-ci.yml' + +permissions: + contents: read + +jobs: + generate-library-reference: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v6 + + - name: Setup Node.js + uses: actions/setup-node@v6 + with: + node-version: '20' + + - name: Install Fern CLI + run: npm install -g fern-api + + - name: Generate library reference MDX (product-docs) + env: + FERN_TOKEN: ${{ secrets.DOCS_FERN_TOKEN }} + working-directory: ./fern + run: fern docs md generate diff --git a/.github/workflows/fern-docs-preview-build.yml b/.github/workflows/fern-docs-preview-build.yml new file mode 100644 index 0000000000..bab659cbfd --- /dev/null +++ b/.github/workflows/fern-docs-preview-build.yml @@ -0,0 +1,63 @@ +# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Workflow 1 of 2 for Fern doc previews. +# +# Collects the fern/ sources and PR metadata from the (possibly untrusted) PR +# branch and uploads them as an artifact. No secrets are used here, so this is +# safe to run on fork PRs via the regular pull_request trigger. +# +# The companion workflow (fern-docs-preview-comment.yml) picks up the artifact, +# builds the preview with DOCS_FERN_TOKEN, and posts the PR comment. + +name: "Preview Fern Docs: Build" + +on: + pull_request: + paths: + - 'fern/**' + - '.github/workflows/fern-docs-preview-build.yml' + +permissions: + contents: read + +jobs: + collect: + runs-on: ubuntu-latest + steps: + - name: Checkout PR + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + with: + fetch-depth: 0 + + - name: Save PR metadata + env: + PR_NUMBER: ${{ github.event.pull_request.number }} + HEAD_REF: ${{ github.head_ref }} + BASE_REF: ${{ github.base_ref }} + run: | + mkdir -p .preview-metadata + echo "$PR_NUMBER" > .preview-metadata/pr_number + echo "$HEAD_REF" > .preview-metadata/head_ref + git diff --name-only "origin/${BASE_REF}...HEAD" -- '*.mdx' > .preview-metadata/changed_mdx_files 2>/dev/null || true + + - name: Upload fern sources and metadata + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 + with: + name: fern-preview + path: | + fern/ + .preview-metadata/ + retention-days: 1 diff --git a/.github/workflows/fern-docs-preview-comment.yml b/.github/workflows/fern-docs-preview-comment.yml new file mode 100644 index 0000000000..6696f51259 --- /dev/null +++ b/.github/workflows/fern-docs-preview-comment.yml @@ -0,0 +1,148 @@ +# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Workflow 2 of 2 for Fern doc previews. +# +# Triggered by workflow_run after "Preview Fern Docs: Build" completes. +# Downloads the fern/ artifact, builds a preview with DOCS_FERN_TOKEN, and +# posts a stable :herb: comment on the PR. This workflow never checks out the +# PR branch directly, keeping secrets isolated from untrusted code. +# +# Required configuration: +# - Organization secret: DOCS_FERN_TOKEN (from `fern token` for the nvidia Fern org) + +name: "Preview Fern Docs: Comment" + +on: + workflow_run: + workflows: ["Preview Fern Docs: Build"] + types: [completed] + +permissions: + pull-requests: write + actions: read + +jobs: + preview: + runs-on: ubuntu-latest + if: ${{ github.event.workflow_run.conclusion == 'success' }} + steps: + - name: Download fern sources and metadata + uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 + with: + name: fern-preview + run-id: ${{ github.event.workflow_run.id }} + github-token: ${{ secrets.GITHUB_TOKEN }} + + - name: Read PR metadata + id: metadata + run: | + echo "pr_number=$(cat .preview-metadata/pr_number)" >> "$GITHUB_OUTPUT" + echo "head_ref=$(cat .preview-metadata/head_ref)" >> "$GITHUB_OUTPUT" + + - name: Setup Node.js + uses: actions/setup-node@v6 + with: + node-version: '20' + + - name: Install Fern CLI + run: npm install -g fern-api + + - name: Generate library reference MDX (autodocs) + env: + FERN_TOKEN: ${{ secrets.DOCS_FERN_TOKEN }} + working-directory: ./fern + run: fern docs md generate + + - name: Generate preview URL + id: generate-docs + env: + FERN_TOKEN: ${{ secrets.DOCS_FERN_TOKEN }} + HEAD_REF: ${{ steps.metadata.outputs.head_ref }} + working-directory: ./fern + run: | + OUTPUT=$(fern generate --docs --preview --id "$HEAD_REF" 2>&1) + echo "$OUTPUT" + URL=$(echo "$OUTPUT" | grep -oP 'Published docs to \K.*(?= \()') + if [ -z "$URL" ]; then + echo "::error::Failed to generate preview URL. See fern output above." + exit 1 + fi + echo "preview_url=$URL" >> "$GITHUB_OUTPUT" + + - name: Build page links for changed MDX files + id: page-links + env: + FERN_TOKEN: ${{ secrets.DOCS_FERN_TOKEN }} + PREVIEW_URL: ${{ steps.generate-docs.outputs.preview_url }} + run: | + CHANGED_FILES="" + if [ -f .preview-metadata/changed_mdx_files ]; then + CHANGED_FILES=$(cat .preview-metadata/changed_mdx_files) + fi + + if [ -z "$CHANGED_FILES" ] || [ -z "$PREVIEW_URL" ]; then + echo "page_links=" >> "$GITHUB_OUTPUT"; exit 0 + fi + + BASE_URL=$(echo "$PREVIEW_URL" | grep -oP 'https?://[^/]+') + FILES_PARAM=$(echo "$CHANGED_FILES" | tr '\n' ',' | sed 's/,$//' \ + | python3 -c "import sys, urllib.parse; print(urllib.parse.quote(sys.stdin.read().strip(), safe=',/'))") + RESPONSE=$(curl -sf -H "FERN_TOKEN: $FERN_TOKEN" "${PREVIEW_URL}/api/fern-docs/get-slug-for-file?files=${FILES_PARAM}" 2>/dev/null) || { + echo "page_links=" >> "$GITHUB_OUTPUT"; exit 0 + } + + PAGE_LINKS=$(echo "$RESPONSE" | jq -r --arg url "$BASE_URL" \ + '.mappings[] | select(.slug != null) | "- [\(.slug)](\($url)/\(.slug))"') + + if [ -n "$PAGE_LINKS" ]; then + { echo "page_links<> "$GITHUB_OUTPUT" + else + echo "page_links=" >> "$GITHUB_OUTPUT" + fi + + - name: Post or update PR comment + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PR_NUMBER: ${{ steps.metadata.outputs.pr_number }} + PREVIEW_URL: ${{ steps.generate-docs.outputs.preview_url }} + PAGE_LINKS: ${{ steps.page-links.outputs.page_links }} + run: | + # Build comment body + BODY=":herb: **Preview your docs:** <${PREVIEW_URL}>" + if [ -n "${PAGE_LINKS}" ]; then + BODY="${BODY} + + Here are the markdown pages you've updated: + ${PAGE_LINKS}" + fi + + # Hidden marker for upsert + MARKER="" + BODY="${BODY} + + ${MARKER}" + + # Find existing comment with marker + COMMENT_ID=$(gh api "repos/${{ github.repository }}/issues/${PR_NUMBER}/comments" \ + --jq ".[] | select(.body | contains(\"${MARKER}\")) | .id" | head -1) + + if [ -n "$COMMENT_ID" ]; then + gh api "repos/${{ github.repository }}/issues/comments/${COMMENT_ID}" \ + -X PATCH -f body="$BODY" + else + gh api "repos/${{ github.repository }}/issues/${PR_NUMBER}/comments" \ + -f body="$BODY" + fi diff --git a/.github/workflows/fern-docs-preview.yml b/.github/workflows/fern-docs-preview.yml new file mode 100644 index 0000000000..c91cf40849 --- /dev/null +++ b/.github/workflows/fern-docs-preview.yml @@ -0,0 +1,115 @@ +# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Generates a Fern preview URL for documentation PRs and posts it as a PR comment. +# Uses pull_request_target so the workflow can access DOCS_FERN_TOKEN for fork PRs. +# Each PR gets a stable preview URL (keyed by branch name) that updates on every push. +# +# Required configuration: +# - Organization secret: DOCS_FERN_TOKEN (from `fern token` for the nvidia Fern org) + +name: Preview Fern Docs + +on: + pull_request_target: + types: [opened, synchronize, ready_for_review] + paths: + - 'fern/**' + - '.github/workflows/fern-docs-preview.yml' + +permissions: + pull-requests: write + contents: read + +jobs: + preview: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v6 + with: + fetch-depth: 0 + + - name: Checkout PR head + run: | + git fetch origin pull/${{ github.event.pull_request.number }}/head:pr-${{ github.event.pull_request.number }} + git checkout pr-${{ github.event.pull_request.number }} + + - name: Setup Fern CLI + uses: fern-api/setup-fern-cli@v1 + + - name: Generate library reference MDX (autodocs) + env: + FERN_TOKEN: ${{ secrets.DOCS_FERN_TOKEN }} + working-directory: ./fern + run: fern docs md generate + + - name: Generate preview URL + id: generate-docs + env: + FERN_TOKEN: ${{ secrets.DOCS_FERN_TOKEN }} + HEAD_REF: ${{ github.head_ref }} + run: | + OUTPUT=$(fern generate --docs --preview --id "$HEAD_REF" 2>&1) || true + echo "$OUTPUT" + URL=$(echo "$OUTPUT" | grep -oP 'Published docs to \K.*(?= \()') + echo "preview_url=$URL" >> $GITHUB_OUTPUT + echo "Preview URL: $URL" + working-directory: ./fern + + - name: Get page links for changed MDX files + id: page-links + env: + FERN_TOKEN: ${{ secrets.DOCS_FERN_TOKEN }} + run: | + PREVIEW_URL="${{ steps.generate-docs.outputs.preview_url }}" + CHANGED_FILES=$(git diff --name-only origin/${{ github.base_ref }}...HEAD -- '*.mdx' 2>/dev/null || echo "") + + if [ -z "$CHANGED_FILES" ] || [ -z "$PREVIEW_URL" ]; then + echo "page_links=" >> $GITHUB_OUTPUT; exit 0 + fi + + BASE_URL=$(echo "$PREVIEW_URL" | grep -oP 'https?://[^/]+') + + FILES_PARAM=$(echo "$CHANGED_FILES" | tr '\n' ',' | sed 's/,$//') + RESPONSE=$(curl -sf -H "FERN_TOKEN: $FERN_TOKEN" "${PREVIEW_URL}/api/fern-docs/get-slug-for-file?files=${FILES_PARAM}" 2>/dev/null) || { + echo "page_links=" >> $GITHUB_OUTPUT; exit 0 + } + + PAGE_LINKS=$(echo "$RESPONSE" | jq -r --arg url "$BASE_URL" \ + '.mappings[] | select(.slug != null) | "- [\(.slug)](\($url)/\(.slug))"') + + if [ -n "$PAGE_LINKS" ]; then + { echo "page_links<> $GITHUB_OUTPUT + else + echo "page_links=" >> $GITHUB_OUTPUT + fi + + - name: Create comment content + run: | + echo ":herb: **Preview your docs:** <${{ steps.generate-docs.outputs.preview_url }}>" > comment.md + + if [ -n "${{ steps.page-links.outputs.page_links }}" ]; then + echo "" >> comment.md + echo "Here are the markdown pages you've updated:" >> comment.md + echo "${{ steps.page-links.outputs.page_links }}" >> comment.md + fi + + - name: Post PR comment + uses: thollander/actions-comment-pull-request@v2.4.3 + with: + filePath: comment.md + comment_tag: preview-docs + mode: upsert diff --git a/.github/workflows/publish-fern-docs.yml b/.github/workflows/publish-fern-docs.yml new file mode 100644 index 0000000000..f4866bcc0a --- /dev/null +++ b/.github/workflows/publish-fern-docs.yml @@ -0,0 +1,63 @@ +# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Fern docs publish workflow (BioNeMo Framework) +# Publishes the Fern documentation site when a docs tag is pushed or manually triggered. +# +# To publish: git tag docs/v1.2.0 && git push origin docs/v1.2.0 +# Or use the "Run workflow" button in the Actions tab. +# +# Required configuration: +# - Organization secret: DOCS_FERN_TOKEN (from `fern token` for the nvidia Fern org) + +name: Publish Fern Docs + +on: + push: + tags: + - 'docs/v*' + workflow_dispatch: + +permissions: + contents: read + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v6 + + - name: Setup Node.js + uses: actions/setup-node@v6 + with: + node-version: '20' + + - name: Install Fern CLI + run: npm install -g fern-api + + # Libraries in docs.yml write under fern/product-docs/ (gitignored). + # Run before publish so the Full Library Reference is included in the site. + - name: Generate library reference MDX (autodocs) + env: + FERN_TOKEN: ${{ secrets.DOCS_FERN_TOKEN }} + working-directory: ./fern + run: fern docs md generate + + - name: Publish Docs + env: + FERN_TOKEN: ${{ secrets.DOCS_FERN_TOKEN }} + working-directory: ./fern + run: fern generate --docs diff --git a/.gitignore b/.gitignore index 2087953bc9..6550602839 100644 --- a/.gitignore +++ b/.gitignore @@ -216,4 +216,7 @@ outputs/ # Nsys profiles *.nsys-rep +# Fern: generated Python API reference (`fern docs md generate`) +fern/product-docs/ + .claude/ diff --git a/docs/docs/main/contributing/sub-package_dependency_graph.md b/docs/docs/main/contributing/sub-package_dependency_graph.md index 27deb43bcb..307f3eb375 100644 --- a/docs/docs/main/contributing/sub-package_dependency_graph.md +++ b/docs/docs/main/contributing/sub-package_dependency_graph.md @@ -4,12 +4,12 @@ The script in `sub-packages/bionemo/fw/src/dependency_graph.py` generates a depe These are visualizations of the dependency graph from the pyproject.toml files: -Dependency Graph +Dependency Graph Similarly from the tach.toml file: -Dependency Graph +Dependency Graph And these are the dependencies from the file imports: -Dependency Graph +Dependency Graph diff --git a/docs/docs/main/getting-started/development.md b/docs/docs/main/getting-started/development.md index c6b47c056b..2b9f4e4cae 100644 --- a/docs/docs/main/getting-started/development.md +++ b/docs/docs/main/getting-started/development.md @@ -72,4 +72,4 @@ Set `DATA_SOURCE=ngc` for public resources, or `DATA_SOURCE=pbss` for internal N ## Advanced developer documentation -For repository-wide development guidance, see the top-level \[README\]({{ github_url }}) and the package or recipe README in the directory you are modifying. +For repository-wide development guidance, see the top-level \[README\](https://github.com/NVIDIA/bionemo-framework) and the package or recipe README in the directory you are modifying. diff --git a/docs/docs/models/geneformer.md b/docs/docs/models/geneformer.md index 4b8d535182..bcd516af3f 100644 --- a/docs/docs/models/geneformer.md +++ b/docs/docs/models/geneformer.md @@ -19,37 +19,37 @@ Geneformer generates a dense representation of a scRNA cell by learning co-expre ### Model Architecture: -**Architecture Type:** [Bidirectional Encoder Representations from Transformers (BERT)](https://arxiv.org/abs/1810.04805)
-**Network Architecture:** [Geneformer](https://rdcu.be/ddrx0)
+**Architecture Type:** [Bidirectional Encoder Representations from Transformers (BERT)](https://arxiv.org/abs/1810.04805)
+**Network Architecture:** [Geneformer](https://rdcu.be/ddrx0)
### Input: -**Input Type(s):** Number (Row represents cell, containing gene names and single cell expression counts)
-**Input Format(s):** Array [AnnData](https://anndata.readthedocs.io/en/latest/)
-**Input Parameters:** 1D
+**Input Type(s):** Number (Row represents cell, containing gene names and single cell expression counts)
+**Input Format(s):** Array [AnnData](https://anndata.readthedocs.io/en/latest/)
+**Input Parameters:** 1D
### Output: -**Output Type(s):** Vector (Dense Embedding Predictions)embeddings.
-**Output Format:** NumPy
-**Output Parameters:** 1D
-**Other Properties Related to Output:** Numeric floating point vector (fp16, bf16, or fp32); geneformer-10M-240530 outputs 256 dimensional embeddings; geneformer-106M-240530 outputs 768 dimensional embeddings
+**Output Type(s):** Vector (Dense Embedding Predictions)embeddings.
+**Output Format:** NumPy
+**Output Parameters:** 1D
+**Other Properties Related to Output:** Numeric floating point vector (fp16, bf16, or fp32); geneformer-10M-240530 outputs 256 dimensional embeddings; geneformer-106M-240530 outputs 768 dimensional embeddings
### Software Integration: **Runtime Engine(s):** -- BioNeMo, TransformerEngine
+- BioNeMo, TransformerEngine
-**Supported Hardware Microarchitecture Compatibility:**
+**Supported Hardware Microarchitecture Compatibility:**
-- Ampere
-- Hopper
-- Volta
+- Ampere
+- Hopper
+- Volta
-**[Preferred/Supported] Operating System(s):**
+**[Preferred/Supported] Operating System(s):**
-- Linux
+- Linux
### Model Versions: @@ -82,17 +82,17 @@ In this training split, we made sure that all "assay" and "tissue_general" label The 1% hold-out evaluation set was split further into a validation and test set. This final split was mostly done randomly by cell; however, we set aside a full dataset into the test split so that we could evaluate performance after training on a completely unseen dataset, including when monitoring the validation loss during training. -**Link:** Datasets downloaded from [CZ CELLxGENE Discover - Cellular Visualization Tool (cziscience.com)](https://cellxgene.cziscience.com/)
+**Link:** Datasets downloaded from [CZ CELLxGENE Discover - Cellular Visualization Tool (cziscience.com)](https://cellxgene.cziscience.com/)
**Data Collection Method by dataset** -- [Human]
+- [Human]
**Labeling Method by dataset** -- Hybrid: Automated, Human
+- Hybrid: Automated, Human
**Properties (Quantity, Dataset Descriptions, Sensor(s)):** -23.64 million non-diseased and human-derived single cells were chosen from the CZI CELLxGENE census, which is characterized as follows:
+23.64 million non-diseased and human-derived single cells were chosen from the CZI CELLxGENE census, which is characterized as follows:
- **Assay Bias:** - The vast majority of the dataset is one of the 10x genomics assays. Approximately 20M of the 26M cells are genomic assays, 4M are sci-RNA-seq, while remaining assays (microwell-seq, drop-seq, bd rhapsody, smart-seq, seq-well, and MARS-seq) represent small fractions of the full datasets. @@ -110,25 +110,25 @@ Dataset was derived from a limited number of public sources where methods and pr ## Evaluation Dataset: Adamson et al 2016 PERTURB-seq dataset, accessed by Harvard dataverse. -**Link:** [adamson.zip - Harvard Dataverse](https://dataverse.harvard.edu/file.xhtml?fileId=6154417)
+**Link:** [adamson.zip - Harvard Dataverse](https://dataverse.harvard.edu/file.xhtml?fileId=6154417)
**Data Collection Method by dataset** -- Human
+- Human
**Labeling Method by dataset** -- Automated - Molecular Barcoding
+- Automated - Molecular Barcoding
**Properties (Quantity, Dataset Descriptions, Sensor(s)):** There are ~20k single cells, half of which represent unperturbed control samples, and the other half which contain an additional datatable containing the CRISPR knock-out targets for each cell. -**Link:** [CZ CELLxGENE Discover - Cellular Visualization Tool (cziscience.com)](https://cellxgene.cziscience.com/)
+**Link:** [CZ CELLxGENE Discover - Cellular Visualization Tool (cziscience.com)](https://cellxgene.cziscience.com/)
**Data Collection Method by dataset** -- Human
+- Human
**Labeling Method by dataset** -- Hybrid: Automated, Human
+- Hybrid: Automated, Human
**Properties (Quantity, Dataset Descriptions, Sensor(s)):** @@ -136,12 +136,12 @@ Adamson et al 2016 PERTURB-seq dataset, accessed by Harvard dataverse. ### Inference: -**Engine:** BioNeMo, TransformerEngine
-**Test Hardware:**
+**Engine:** BioNeMo, TransformerEngine
+**Test Hardware:**
-- Ampere
-- Hopper
-- Volta
+- Ampere
+- Hopper
+- Volta
\*Additional description content may be included here diff --git a/fern/AUTODOCS_GUIDE.md b/fern/AUTODOCS_GUIDE.md new file mode 100644 index 0000000000..016316ecf5 --- /dev/null +++ b/fern/AUTODOCS_GUIDE.md @@ -0,0 +1,78 @@ +# Fern library API (`fern docs md generate`) + +This repo uses Fern’s **`libraries:`** block in `docs.yml` to generate Python API reference +Markdown from source (same pattern as NeMo Curator). + +## Prerequisites + +- Node.js and `fern-api` (or `npx fern-api`) +- **GitHub Actions:** org/repo secret **`DOCS_FERN_TOKEN`** (from `fern token` for the NVIDIA Fern org). Used by all Fern workflows below. + +## CI workflows (`.github/workflows/`) + +| Workflow | Purpose | +|----------|---------| +| `fern-docs-ci.yml` | On PRs touching `fern/**`, runs `fern docs md generate` to validate autodocs. | +| `fern-docs-preview-build.yml` | **Preview (1/2):** uploads `fern/` + PR metadata as an artifact (no secrets; safe on forks). | +| `fern-docs-preview-comment.yml` | **Preview (2/2):** on `workflow_run` success, downloads artifact, runs `fern docs md generate` + `fern generate --docs --preview`, posts PR comment. | +| `fern-docs-preview.yml` | Alternate **preview** via `pull_request_target` + comment (uses `DOCS_FERN_TOKEN`; same as NeMo Curator). You may disable this or the build/comment pair if you want a single preview path. | +| `publish-fern-docs.yml` | On `docs/v*` tags or manual dispatch: `fern docs md generate` then `fern generate --docs` to publish. | + +`install-fern-ci` from the convert-to-fern toolkit is optional; this repo mirrors Curator’s workflow set directly. + +## Generate locally + +From the `fern/` directory: + +```bash +cd fern +npx fern-api@latest upgrade # optional: align CLI with fern.config.json +fern docs md generate +``` + +Output is written under `fern/product-docs/` (gitignored). The **API Reference** tab in +`versions/latest.yml` and `versions/v2.7.yml` points at +`product-docs/bionemo-core/Full-Library-Reference`. + +## Adding another sub-package + +1. Add a new top-level key under `libraries:` in `docs.yml` (see `bionemo-core` as a template). +2. Set `subpath` to a **concrete Python package directory** (with `__init__.py`) that Fern/Pyright accept. Namespace-only dirs (PEP 420, no `__init__.py`) at the namespace root (e.g. `src/bionemo`) can fail with `PACKAGE_NOT_FOUND`; prefer `src/bionemo/` (e.g. `sub-packages/bionemo-core/src/bionemo/core`). +3. Set `output.path` to a unique folder under `./product-docs/`. +4. Add a matching `- folder: ../product-docs//Full-Library-Reference` entry under the **api** tab in the version YAML files. + +## Preview + +```bash +cd fern +fern docs dev +``` + +Use the **API Reference** tab to browse generated pages after running `fern docs md generate`. + +## Jupyter notebooks (`NotebookViewer`) + +Static tutorial notebooks are rendered with the **`NotebookViewer`** React component (ported from NeMo Data Designer), optional **Colab** link, and **`fern/styles/notebook-viewer.css`** (registered in `docs.yml`). + +1. **Dependencies:** `pygments` (for syntax-highlighted code cells when converting). + +2. **Convert** `.ipynb` → JSON + TypeScript module for MDX import: + + ```bash + cd fern + python scripts/ipynb-to-fern-json.py ../path/to/notebook.ipynb -o components/notebooks/my-notebook.json + ``` + +3. **Use** in MDX: + + ```mdx + import { NotebookViewer } from "@/components/NotebookViewer"; + import notebook from "@/components/notebooks/my-notebook"; + + + ``` + +`experimental.mdx-components` in `docs.yml` already includes `./components`, so `@/components/...` resolves. diff --git a/fern/assets/NVIDIA_dark.svg b/fern/assets/NVIDIA_dark.svg new file mode 100644 index 0000000000..04850d9d6b --- /dev/null +++ b/fern/assets/NVIDIA_dark.svg @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + diff --git a/fern/assets/NVIDIA_light.svg b/fern/assets/NVIDIA_light.svg new file mode 100644 index 0000000000..9ee045c3ef --- /dev/null +++ b/fern/assets/NVIDIA_light.svg @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + diff --git a/fern/assets/NVIDIA_symbol.svg b/fern/assets/NVIDIA_symbol.svg new file mode 100644 index 0000000000..c0507afe00 --- /dev/null +++ b/fern/assets/NVIDIA_symbol.svg @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + diff --git a/fern/assets/css/chatbot.css b/fern/assets/css/chatbot.css new file mode 100644 index 0000000000..add69e60ef --- /dev/null +++ b/fern/assets/css/chatbot.css @@ -0,0 +1,17 @@ +/* match styles of llm_bot Chatbot icon */ +img.open-icon { + max-height: 20px !important; + max-width: 20px !important; +} + +.open-icon { + border: none; + max-width: 22px; + margin-right: 8px; +} + +/* tempoarily make invisible to test in production. + turn on in going md-container > md-main > md-contant > article */ +#chatbot > button { + display: block; +} diff --git a/fern/assets/css/color-schemes.css b/fern/assets/css/color-schemes.css new file mode 100644 index 0000000000..0b199f5cad --- /dev/null +++ b/fern/assets/css/color-schemes.css @@ -0,0 +1,95 @@ +/* Light Theme */ +[data-md-color-scheme="light"] { + --md-primary-fg-color: #76b900; + --md-primary-fg-color--light: #8ed100; + --md-primary-fg-color--dark: #5f9300; + --md-primary-bg-color: #ffffff; + --md-accent-fg-color: #76b900; /* Changed to green */ + + --md-default-fg-color: #333333; + --md-default-fg-color--light: #666666; + --md-default-fg-color--lighter: #999999; + --md-default-fg-color--lightest: #cccccc; + --md-default-bg-color: #ffffff; + + --md-code-fg-color: #24292e; + --md-code-bg-color: #f6f8fa; + + --md-typeset-color: var(--md-default-fg-color); + --md-typeset-a-color: var(--md-accent-fg-color); + + --md-admonition-bg-color: var(--md-default-bg-color); + --md-admonition-fg-color: var(--md-default-fg-color); + /* footer */ + --md-footer-bg-color: white; + --md-footer-fg-color: var(--md-default-fg-color); + --md-footer-bg-color--dark: white; + --md-footer-fg-color--light: var(--md-default-fg-color); + --md-footer-border-bottom: 1px solid #c9d1d9; + --md-header-border: 1px solid #c9d1d9; + --svg-color: black; + --md-header-bg-color: white; + --md-header-color: black; + --md-search-hover-color: #999999; +} + +/* Dark Theme */ +[data-md-color-scheme="dark"] { + --md-primary-fg-color: #76b900; + --md-primary-fg-color--light: #8ed100; + --md-primary-fg-color--dark: #5f9300; + --md-primary-bg-color: #1a1a1a; + /* Lighter green for better visibility in dark mode */ + --md-accent-fg-color: #8ed100; + /* text color */ + --md-default-fg-color: #ffffff; + /* title text */ + --md-default-fg-color--light: white; + /* scroll bar */ + --md-default-fg-color--lighter: #999999; + /* code copy */ + --md-default-fg-color--lightest: #666666; + --md-default-bg-color: #1a1a1a; + /* code color */ + --md-code-fg-color: #c9d1d9; + --md-code-bg-color: #2a2a2a; + + --md-typeset-color: var(--md-default-fg-color); + --md-typeset-a-color: var(--md-accent-fg-color); + + --md-admonition-bg-color: #2a2a2a; + --md-admonition-fg-color: var(--md-default-fg-color); + --md-footer-bg-color: #2a2a2a; + --md-footer-fg-color: #cccccc; + /* footer */ + --md-footer-bg-color: #1a1a1a; + --md-footer-fg-color: #ffffff; + --md-footer-bg-color--dark: #1a1a1a; + --md-footer-fg-color--light: #ffffff; + + --md-footer-border: 0px solid #c9d1d9; + --md-footer-border-bottom: 1px solid #2a2a2a; + --md-header-border: 0px solid #c9d1d9; + --svg-color: white; + --md-header-bg-color: #1a1a1a; + --md-header-color: white; + --md-search-hover-color: #2a2a2a; + --md-shadow-z2: 0.5px 1px 2px rgba(255, 255, 255, 0.25); + + /* code */ + --md-code-fg-color: #d4d4d4; + --md-code-bg-color: #1e1e1e; + --md-code-hl-color: rgba(255, 255, 255, 0.1); + --md-code-hl-number-color: #b5cea8; + --md-code-hl-special-color: #d7ba7d; + --md-code-hl-function-color: #dcdcaa; + --md-code-hl-constant-color: #4ec9b0; + --md-code-hl-keyword-color: #c586c0; + --md-code-hl-string-color: #ce9178; + --md-code-hl-name-color: #9cdcfe; + --md-code-hl-operator-color: #d4d4d4; + --md-code-hl-punctuation-color: #d4d4d4; + --md-code-hl-comment-color: #6a9955; + --md-code-hl-generic-color: #d4d4d4; + --md-code-hl-variable-color: #9cdcfe; +} diff --git a/fern/assets/css/custom-material.css b/fern/assets/css/custom-material.css new file mode 100644 index 0000000000..2d18d75f4a --- /dev/null +++ b/fern/assets/css/custom-material.css @@ -0,0 +1,180 @@ +:root { + --md-text-font: "NVIDIA Sans", -apple-system, BlinkMacSystemFont, Segoe UI, + Roboto, Helvetica Neue, Arial, sans-serif; + --md-code-font: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, + monospace; +} + +.md-header, +.md-tabs { + background-color: var(--md-header-bg-color); + color: var(--md-header-color); +} + +.md-tabs { + border-bottom: var(--md-footer-border-bottom); +} + +.md-header__title { + font-weight: 600; +} + +.md-nav__item { + margin-top: 0.2rem; +} + +.md-nav__link { + color: var(--md-nav-color); +} + +.md-nav__link:hover { + color: var(--md-nav-color); +} + +.md-typeset h1, +.md-typeset h2 { + font-weight: 600; + color: var(--md-default-fg-color); +} + +.md-typeset a { + color: var(--md-accent-fg-color); + font-weight: bold; + transition: color 0.2s; +} + +.md-typeset a:hover { + text-decoration: underline; +} + +.md-typeset code { + background-color: var(--md-code-bg-color); + color: var(--md-code-fg-color); + padding: 0.2em 0.4em; + border-radius: 3px; +} + +.md-typeset pre { + background-color: var(--md-code-bg-color); + border-radius: 6px; + padding: 1em; +} + +.md-footer { + background-color: var(--md-footer-bg-color); + color: var(--md-footer-fg-color); +} + +/* Admonitions */ +.md-typeset .admonition { + border-left-width: 4px; + border-radius: 4px; +} + +.md-typeset .admonition-title { + font-weight: 600; +} + +.md-typeset .admonition.under-construction, +.md-typeset .admonition.to-do, +.md-typeset .admonition.new-item, +.md-typeset .admonition.time, +.md-typeset .admonition.oci-only, +.md-typeset .admonition.azure-only { + border-left-width: 4px; + border-radius: 4px; +} + +.md-typeset .md-button { + color: var(--md-accent-fg-color); + border: 1px solid var(--md-accent-fg-color); + border-radius: 4px; + padding: 0.5em 1em; + font-weight: 600; + transition: background-color 0.2s, color 0.2s; +} + +.md-typeset .md-button:hover { + background-color: var(--md-accent-fg-color); + color: var(--md-primary-bg-color); +} + +/* Tables */ +.md-typeset table { + border-collapse: separate; + border-spacing: 0; + border: 1px solid var(--md-default-fg-color--lighter); + border-radius: 4px; + overflow: hidden; +} + +.md-typeset table th { + background-color: var(--md-default-fg-color--lightest); + font-weight: 600; +} + +.md-typeset table th, +.md-typeset table td { + border: 1px solid var(--md-default-fg-color--lighter); + padding: 0.75em 1em; +} + +/* Images */ +.md-typeset img { + /* border: 1px solid var(--md-default-fg-color--lighter); */ + border-radius: 4px; +} + +.md-footer { + border-top: var(--md-footer-border); +} + +#logo_light_mode { + display: var(--md-footer-logo-light-mode); +} + +#logo_dark_mode { + display: var(--md-footer-logo-dark-mode); +} + +#logo_light_mode { + display: var(--md-footer-logo-light-mode); +} + +#logo_dark_mode { + display: var(--md-footer-logo-dark-mode); +} + +.md-header__button.md-logo svg { + fill: var(--svg-color); +} + +.md-copyright { + color: var(--md-header-color); +} + +.md-grid { + max-width: 67rem; +} + +.md-search__form:hover { + background-color: var(--md-search-hover-color); +} + +.md-search__icon svg { + fill: #ffffff; +} + +.md-typeset .grid.cards > ul > li:hover { + border-color: var(--md-default-fg-color--lightest); +} + +.md-typeset .grid { + grid-template-columns: repeat(2, minmax(min(100%, 16rem), 1fr)); +} + +@media (max-width: 768px) { + .md-typeset .grid { + grid-template-columns: 1fr; + } +} diff --git a/fern/assets/css/fonts.css b/fern/assets/css/fonts.css new file mode 100644 index 0000000000..e753210be6 --- /dev/null +++ b/fern/assets/css/fonts.css @@ -0,0 +1,41 @@ +@font-face { + font-family: "NVIDIA Sans"; + font-style: normal; + src: url(https://brand-assets.cne.ngc.nvidia.com/assets/fonts/nvidia-sans/1.0.0/NVIDIASans_Lt.woff2); + font-weight: light; +} + +@font-face { + font-family: "NVIDIA Sans"; + font-style: italic; + src: url(https://brand-assets.cne.ngc.nvidia.com/assets/fonts/nvidia-sans/1.0.0/NVIDIASans_LtIt.woff2); + font-weight: light; +} + +@font-face { + font-family: "NVIDIA Sans"; + font-style: normal; + src: url(https://brand-assets.cne.ngc.nvidia.com/assets/fonts/nvidia-sans/1.0.0/NVIDIASans_Rg.woff2); + font-weight: normal; +} + +@font-face { + font-family: "NVIDIA Sans"; + font-style: italic; + src: url(https://brand-assets.cne.ngc.nvidia.com/assets/fonts/nvidia-sans/1.0.0/NVIDIASans_It.woff2); + font-weight: normal; +} + +@font-face { + font-family: "NVIDIA Sans"; + font-style: normal; + src: url(https://brand-assets.cne.ngc.nvidia.com/assets/fonts/nvidia-sans/1.0.0/NVIDIASans_Bd.woff2); + font-weight: bold; +} + +@font-face { + font-family: "NVIDIA Sans"; + font-style: italic; + src: url(https://brand-assets.cne.ngc.nvidia.com/assets/fonts/nvidia-sans/1.0.0/NVIDIASans_BdIt.woff2); + font-weight: bold; +} diff --git a/fern/assets/css/jupyter-themes.css b/fern/assets/css/jupyter-themes.css new file mode 100644 index 0000000000..3073cd7bc0 --- /dev/null +++ b/fern/assets/css/jupyter-themes.css @@ -0,0 +1,21 @@ +/* theme: light */ +body[data-md-color-scheme="light"] .jupyter-notebook { + --jp-cell-editor-background: #f7f7f7; + --jp-cell-editor-border-color: #cfcfcf; + --jp-cell-prompt-fg-color: #303030; + --jp-cell-prompt-bg-color: #f0f0f0; + --jp-notebook-background: #ffffff; + --jp-layout-color1: #ffffff; + --jp-content-font-color1: #000000; +} + +/* theme: dark */ +body[data-md-color-scheme="dark"] .jupyter-notebook { + --jp-cell-editor-background: #2b2b2b; + --jp-cell-editor-border-color: #464646; + --jp-cell-prompt-fg-color: #d7d7d7; + --jp-cell-prompt-bg-color: #333333; + --jp-notebook-background: #1e1e1e; + --jp-layout-color1: #1e1e1e; + --jp-content-font-color1: #d4d4d4; +} diff --git a/fern/assets/images/70b-cp-benchmarks.png b/fern/assets/images/70b-cp-benchmarks.png new file mode 100644 index 0000000000..f56deb5aa2 Binary files /dev/null and b/fern/assets/images/70b-cp-benchmarks.png differ diff --git a/fern/assets/images/F1-score-models.png b/fern/assets/images/F1-score-models.png new file mode 100644 index 0000000000..431f1fcfb4 Binary files /dev/null and b/fern/assets/images/F1-score-models.png differ diff --git a/fern/assets/images/Geneformer_steven_106m_train.png b/fern/assets/images/Geneformer_steven_106m_train.png new file mode 100644 index 0000000000..7bf9fb3601 Binary files /dev/null and b/fern/assets/images/Geneformer_steven_106m_train.png differ diff --git a/fern/assets/images/Geneformer_steven_106m_val.png b/fern/assets/images/Geneformer_steven_106m_val.png new file mode 100644 index 0000000000..a8eb9775c6 Binary files /dev/null and b/fern/assets/images/Geneformer_steven_106m_val.png differ diff --git a/fern/assets/images/accuracy-models-04-18-2025.png b/fern/assets/images/accuracy-models-04-18-2025.png new file mode 100644 index 0000000000..52b0c8c0d2 Binary files /dev/null and b/fern/assets/images/accuracy-models-04-18-2025.png differ diff --git a/fern/assets/images/amplify/training_loss.png b/fern/assets/images/amplify/training_loss.png new file mode 100644 index 0000000000..872d133cab Binary files /dev/null and b/fern/assets/images/amplify/training_loss.png differ diff --git a/fern/assets/images/amplify/validation_loss.png b/fern/assets/images/amplify/validation_loss.png new file mode 100644 index 0000000000..2f2b4e2e28 Binary files /dev/null and b/fern/assets/images/amplify/validation_loss.png differ diff --git a/fern/assets/images/amplify/validation_ppl.png b/fern/assets/images/amplify/validation_ppl.png new file mode 100644 index 0000000000..fe7f0c8cb1 Binary files /dev/null and b/fern/assets/images/amplify/validation_ppl.png differ diff --git a/fern/assets/images/average-accuracy-models.png b/fern/assets/images/average-accuracy-models.png new file mode 100644 index 0000000000..3abd706602 Binary files /dev/null and b/fern/assets/images/average-accuracy-models.png differ diff --git a/fern/assets/images/cellxgene/num_cells_by_assay.png b/fern/assets/images/cellxgene/num_cells_by_assay.png new file mode 100644 index 0000000000..967e536005 Binary files /dev/null and b/fern/assets/images/cellxgene/num_cells_by_assay.png differ diff --git a/fern/assets/images/cellxgene/num_cells_by_dataset.png b/fern/assets/images/cellxgene/num_cells_by_dataset.png new file mode 100644 index 0000000000..69b146045a Binary files /dev/null and b/fern/assets/images/cellxgene/num_cells_by_dataset.png differ diff --git a/fern/assets/images/cellxgene/num_genes_measured_by_assay.png b/fern/assets/images/cellxgene/num_genes_measured_by_assay.png new file mode 100644 index 0000000000..00864d4ca0 Binary files /dev/null and b/fern/assets/images/cellxgene/num_genes_measured_by_assay.png differ diff --git a/fern/assets/images/cellxgene/pct_cells_by_age.png b/fern/assets/images/cellxgene/pct_cells_by_age.png new file mode 100644 index 0000000000..c052a09da0 Binary files /dev/null and b/fern/assets/images/cellxgene/pct_cells_by_age.png differ diff --git a/fern/assets/images/cellxgene/pct_cells_by_ethnicity_category.png b/fern/assets/images/cellxgene/pct_cells_by_ethnicity_category.png new file mode 100644 index 0000000000..9bbd6463d7 Binary files /dev/null and b/fern/assets/images/cellxgene/pct_cells_by_ethnicity_category.png differ diff --git a/fern/assets/images/cellxgene/pct_cells_by_sex.png b/fern/assets/images/cellxgene/pct_cells_by_sex.png new file mode 100644 index 0000000000..d09e8ce097 Binary files /dev/null and b/fern/assets/images/cellxgene/pct_cells_by_sex.png differ diff --git a/fern/assets/images/cellxgene/pct_cells_by_tissue_category.png b/fern/assets/images/cellxgene/pct_cells_by_tissue_category.png new file mode 100644 index 0000000000..93b613c846 Binary files /dev/null and b/fern/assets/images/cellxgene/pct_cells_by_tissue_category.png differ diff --git a/fern/assets/images/cellxgene/top9_datasets_tissue_distribution.png b/fern/assets/images/cellxgene/top9_datasets_tissue_distribution.png new file mode 100644 index 0000000000..783d4c1e5c Binary files /dev/null and b/fern/assets/images/cellxgene/top9_datasets_tissue_distribution.png differ diff --git a/fern/assets/images/data_parallelism.png b/fern/assets/images/data_parallelism.png new file mode 100644 index 0000000000..37e6566fdc Binary files /dev/null and b/fern/assets/images/data_parallelism.png differ diff --git a/fern/assets/images/dependency_file_imports.png b/fern/assets/images/dependency_file_imports.png new file mode 100644 index 0000000000..27db22499d Binary files /dev/null and b/fern/assets/images/dependency_file_imports.png differ diff --git a/fern/assets/images/dependency_graph_pyproject.png b/fern/assets/images/dependency_graph_pyproject.png new file mode 100644 index 0000000000..e3f24065bc Binary files /dev/null and b/fern/assets/images/dependency_graph_pyproject.png differ diff --git a/fern/assets/images/dependency_graph_tach.png b/fern/assets/images/dependency_graph_tach.png new file mode 100644 index 0000000000..315b45675a Binary files /dev/null and b/fern/assets/images/dependency_graph_tach.png differ diff --git a/fern/assets/images/esm2-15b-b300-mxfp8-10node-conv.svg b/fern/assets/images/esm2-15b-b300-mxfp8-10node-conv.svg new file mode 100644 index 0000000000..613f343af9 --- /dev/null +++ b/fern/assets/images/esm2-15b-b300-mxfp8-10node-conv.svg @@ -0,0 +1,118 @@ +
5001k1.5k2kStep1313.51414.51515.516
diff --git a/fern/assets/images/esm2-15b-b300-nvfp4-10node-conv.svg b/fern/assets/images/esm2-15b-b300-nvfp4-10node-conv.svg new file mode 100644 index 0000000000..8f0f49a386 --- /dev/null +++ b/fern/assets/images/esm2-15b-b300-nvfp4-10node-conv.svg @@ -0,0 +1,118 @@ +
5001k1.5k2kStep1313.51414.51515.516
diff --git a/fern/assets/images/esm2-3b-b200-mxfp8-6node-conv.png b/fern/assets/images/esm2-3b-b200-mxfp8-6node-conv.png new file mode 100644 index 0000000000..2a71d80f98 Binary files /dev/null and b/fern/assets/images/esm2-3b-b200-mxfp8-6node-conv.png differ diff --git a/fern/assets/images/esm2-3b-b200-nvfp4-6node-conv.png b/fern/assets/images/esm2-3b-b200-nvfp4-6node-conv.png new file mode 100644 index 0000000000..4766891471 Binary files /dev/null and b/fern/assets/images/esm2-3b-b200-nvfp4-6node-conv.png differ diff --git a/fern/assets/images/esm2/esm2_device_scaling.png b/fern/assets/images/esm2/esm2_device_scaling.png new file mode 100644 index 0000000000..1b12998c76 Binary files /dev/null and b/fern/assets/images/esm2/esm2_device_scaling.png differ diff --git a/fern/assets/images/esm2/esm2_device_scaling.svg b/fern/assets/images/esm2/esm2_device_scaling.svg new file mode 100644 index 0000000000..96a2b72bf8 --- /dev/null +++ b/fern/assets/images/esm2/esm2_device_scaling.svg @@ -0,0 +1,1405 @@ + + + + + + + + 2024-10-15T15:01:59.375504 + image/svg+xml + + + Matplotlib v3.6.3, https://matplotlib.org/ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/fern/assets/images/esm2/esm2_low_precision/esm2-15b-b300-mxfp8-10node-conv.svg b/fern/assets/images/esm2/esm2_low_precision/esm2-15b-b300-mxfp8-10node-conv.svg new file mode 100644 index 0000000000..613f343af9 --- /dev/null +++ b/fern/assets/images/esm2/esm2_low_precision/esm2-15b-b300-mxfp8-10node-conv.svg @@ -0,0 +1,118 @@ +
5001k1.5k2kStep1313.51414.51515.516
diff --git a/fern/assets/images/esm2/esm2_low_precision/esm2-15b-b300-nvfp4-10node-conv.svg b/fern/assets/images/esm2/esm2_low_precision/esm2-15b-b300-nvfp4-10node-conv.svg new file mode 100644 index 0000000000..8f0f49a386 --- /dev/null +++ b/fern/assets/images/esm2/esm2_low_precision/esm2-15b-b300-nvfp4-10node-conv.svg @@ -0,0 +1,118 @@ +
5001k1.5k2kStep1313.51414.51515.516
diff --git a/fern/assets/images/esm2/esm2_low_precision/esm2-3b-b200-mxfp8-6node-conv.png b/fern/assets/images/esm2/esm2_low_precision/esm2-3b-b200-mxfp8-6node-conv.png new file mode 100644 index 0000000000..2a71d80f98 Binary files /dev/null and b/fern/assets/images/esm2/esm2_low_precision/esm2-3b-b200-mxfp8-6node-conv.png differ diff --git a/fern/assets/images/esm2/esm2_low_precision/esm2-3b-b200-nvfp4-6node-conv.png b/fern/assets/images/esm2/esm2_low_precision/esm2-3b-b200-nvfp4-6node-conv.png new file mode 100644 index 0000000000..4766891471 Binary files /dev/null and b/fern/assets/images/esm2/esm2_low_precision/esm2-3b-b200-nvfp4-6node-conv.png differ diff --git a/fern/assets/images/esm2/esm2_low_precision/esm2_15b_grouped_bars.png b/fern/assets/images/esm2/esm2_low_precision/esm2_15b_grouped_bars.png new file mode 100644 index 0000000000..0a284d4624 Binary files /dev/null and b/fern/assets/images/esm2/esm2_low_precision/esm2_15b_grouped_bars.png differ diff --git a/fern/assets/images/esm2/esm2_low_precision/esm2_8gpu_speedup.png b/fern/assets/images/esm2/esm2_low_precision/esm2_8gpu_speedup.png new file mode 100644 index 0000000000..96a7cf289f Binary files /dev/null and b/fern/assets/images/esm2/esm2_low_precision/esm2_8gpu_speedup.png differ diff --git a/fern/assets/images/esm2/esm2_low_precision/esm2_8gpu_tflops.png b/fern/assets/images/esm2/esm2_low_precision/esm2_8gpu_tflops.png new file mode 100644 index 0000000000..d89a4e6158 Binary files /dev/null and b/fern/assets/images/esm2/esm2_low_precision/esm2_8gpu_tflops.png differ diff --git a/fern/assets/images/esm2/esm2_model_scaling.png b/fern/assets/images/esm2/esm2_model_scaling.png new file mode 100644 index 0000000000..93435b555a Binary files /dev/null and b/fern/assets/images/esm2/esm2_model_scaling.png differ diff --git a/fern/assets/images/esm2/esm2_model_scaling.svg b/fern/assets/images/esm2/esm2_model_scaling.svg new file mode 100644 index 0000000000..1348c169a7 --- /dev/null +++ b/fern/assets/images/esm2/esm2_model_scaling.svg @@ -0,0 +1,1698 @@ + + + + + + + + 2025-01-14T10:06:49.710062 + image/svg+xml + + + Matplotlib v3.6.3, https://matplotlib.org/ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/fern/assets/images/esm2/esm2_native_te_benchmarks.svg b/fern/assets/images/esm2/esm2_native_te_benchmarks.svg new file mode 100644 index 0000000000..bf650e1b02 --- /dev/null +++ b/fern/assets/images/esm2/esm2_native_te_benchmarks.svg @@ -0,0 +1,1398 @@ + + + + + + + + 2025-10-20T11:51:04.957845 + image/svg+xml + + + Matplotlib v3.10.6, https://matplotlib.org/ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/fern/assets/images/esm2/esm2_peft_memory_usage.png b/fern/assets/images/esm2/esm2_peft_memory_usage.png new file mode 100644 index 0000000000..bf4b57cd92 Binary files /dev/null and b/fern/assets/images/esm2/esm2_peft_memory_usage.png differ diff --git a/fern/assets/images/esm2/esm2_peft_time.png b/fern/assets/images/esm2/esm2_peft_time.png new file mode 100644 index 0000000000..c21a1a8fa5 Binary files /dev/null and b/fern/assets/images/esm2/esm2_peft_time.png differ diff --git a/fern/assets/images/esm2/esm2_pretrain_convergence.png b/fern/assets/images/esm2/esm2_pretrain_convergence.png new file mode 100644 index 0000000000..aac352a80c Binary files /dev/null and b/fern/assets/images/esm2/esm2_pretrain_convergence.png differ diff --git a/fern/assets/images/esm2/esm2_pretrain_convergence.svg b/fern/assets/images/esm2/esm2_pretrain_convergence.svg new file mode 100644 index 0000000000..3d8db001da --- /dev/null +++ b/fern/assets/images/esm2/esm2_pretrain_convergence.svg @@ -0,0 +1,1522 @@ + + + + + + + + 2025-01-07T14:20:56.875575 + image/svg+xml + + + Matplotlib v3.6.3, https://matplotlib.org/ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/fern/assets/images/esm2/esm2_single_node_training_perf.png b/fern/assets/images/esm2/esm2_single_node_training_perf.png new file mode 100644 index 0000000000..4096986a50 Binary files /dev/null and b/fern/assets/images/esm2/esm2_single_node_training_perf.png differ diff --git a/fern/assets/images/esm2/esm2_single_node_training_perf.svg b/fern/assets/images/esm2/esm2_single_node_training_perf.svg new file mode 100644 index 0000000000..11b7598d2c --- /dev/null +++ b/fern/assets/images/esm2/esm2_single_node_training_perf.svg @@ -0,0 +1,1250 @@ + + + + + + + + 2024-10-15T15:01:57.680700 + image/svg+xml + + + Matplotlib v3.6.3, https://matplotlib.org/ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/fern/assets/images/esm2_15b_grouped_bars.png b/fern/assets/images/esm2_15b_grouped_bars.png new file mode 100644 index 0000000000..0a284d4624 Binary files /dev/null and b/fern/assets/images/esm2_15b_grouped_bars.png differ diff --git a/fern/assets/images/esm2_8gpu_speedup.png b/fern/assets/images/esm2_8gpu_speedup.png new file mode 100644 index 0000000000..96a7cf289f Binary files /dev/null and b/fern/assets/images/esm2_8gpu_speedup.png differ diff --git a/fern/assets/images/esm2_8gpu_tflops.png b/fern/assets/images/esm2_8gpu_tflops.png new file mode 100644 index 0000000000..d89a4e6158 Binary files /dev/null and b/fern/assets/images/esm2_8gpu_tflops.png differ diff --git a/fern/assets/images/esm2_device_scaling.png b/fern/assets/images/esm2_device_scaling.png new file mode 100644 index 0000000000..1b12998c76 Binary files /dev/null and b/fern/assets/images/esm2_device_scaling.png differ diff --git a/fern/assets/images/esm2_device_scaling.svg b/fern/assets/images/esm2_device_scaling.svg new file mode 100644 index 0000000000..96a2b72bf8 --- /dev/null +++ b/fern/assets/images/esm2_device_scaling.svg @@ -0,0 +1,1405 @@ + + + + + + + + 2024-10-15T15:01:59.375504 + image/svg+xml + + + Matplotlib v3.6.3, https://matplotlib.org/ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/fern/assets/images/esm2_model_scaling.png b/fern/assets/images/esm2_model_scaling.png new file mode 100644 index 0000000000..93435b555a Binary files /dev/null and b/fern/assets/images/esm2_model_scaling.png differ diff --git a/fern/assets/images/esm2_model_scaling.svg b/fern/assets/images/esm2_model_scaling.svg new file mode 100644 index 0000000000..1348c169a7 --- /dev/null +++ b/fern/assets/images/esm2_model_scaling.svg @@ -0,0 +1,1698 @@ + + + + + + + + 2025-01-14T10:06:49.710062 + image/svg+xml + + + Matplotlib v3.6.3, https://matplotlib.org/ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/fern/assets/images/esm2_native_te_benchmarks.svg b/fern/assets/images/esm2_native_te_benchmarks.svg new file mode 100644 index 0000000000..bf650e1b02 --- /dev/null +++ b/fern/assets/images/esm2_native_te_benchmarks.svg @@ -0,0 +1,1398 @@ + + + + + + + + 2025-10-20T11:51:04.957845 + image/svg+xml + + + Matplotlib v3.10.6, https://matplotlib.org/ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/fern/assets/images/esm2_peft_memory_usage.png b/fern/assets/images/esm2_peft_memory_usage.png new file mode 100644 index 0000000000..bf4b57cd92 Binary files /dev/null and b/fern/assets/images/esm2_peft_memory_usage.png differ diff --git a/fern/assets/images/esm2_peft_time.png b/fern/assets/images/esm2_peft_time.png new file mode 100644 index 0000000000..c21a1a8fa5 Binary files /dev/null and b/fern/assets/images/esm2_peft_time.png differ diff --git a/fern/assets/images/esm2_pretrain_convergence.png b/fern/assets/images/esm2_pretrain_convergence.png new file mode 100644 index 0000000000..aac352a80c Binary files /dev/null and b/fern/assets/images/esm2_pretrain_convergence.png differ diff --git a/fern/assets/images/esm2_pretrain_convergence.svg b/fern/assets/images/esm2_pretrain_convergence.svg new file mode 100644 index 0000000000..3d8db001da --- /dev/null +++ b/fern/assets/images/esm2_pretrain_convergence.svg @@ -0,0 +1,1522 @@ + + + + + + + + 2025-01-07T14:20:56.875575 + image/svg+xml + + + Matplotlib v3.6.3, https://matplotlib.org/ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/fern/assets/images/esm2_single_node_training_perf.png b/fern/assets/images/esm2_single_node_training_perf.png new file mode 100644 index 0000000000..4096986a50 Binary files /dev/null and b/fern/assets/images/esm2_single_node_training_perf.png differ diff --git a/fern/assets/images/esm2_single_node_training_perf.svg b/fern/assets/images/esm2_single_node_training_perf.svg new file mode 100644 index 0000000000..11b7598d2c --- /dev/null +++ b/fern/assets/images/esm2_single_node_training_perf.svg @@ -0,0 +1,1250 @@ + + + + + + + + 2024-10-15T15:01:57.680700 + image/svg+xml + + + Matplotlib v3.6.3, https://matplotlib.org/ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/fern/assets/images/evo2/evo2_bionemo_1b_6950steps.png b/fern/assets/images/evo2/evo2_bionemo_1b_6950steps.png new file mode 100644 index 0000000000..30198ab9e7 Binary files /dev/null and b/fern/assets/images/evo2/evo2_bionemo_1b_6950steps.png differ diff --git a/fern/assets/images/evo2/evo2_bionemo_7bnv_28ksteps.png b/fern/assets/images/evo2/evo2_bionemo_7bnv_28ksteps.png new file mode 100644 index 0000000000..b7f212a0da Binary files /dev/null and b/fern/assets/images/evo2/evo2_bionemo_7bnv_28ksteps.png differ diff --git a/fern/assets/images/evo2/evo2_performance_by_cluster_size.png b/fern/assets/images/evo2/evo2_performance_by_cluster_size.png new file mode 100644 index 0000000000..5accde044e Binary files /dev/null and b/fern/assets/images/evo2/evo2_performance_by_cluster_size.png differ diff --git a/fern/assets/images/evo2/evo2_savanna_1b_6950steps.png b/fern/assets/images/evo2/evo2_savanna_1b_6950steps.png new file mode 100644 index 0000000000..117b291a26 Binary files /dev/null and b/fern/assets/images/evo2/evo2_savanna_1b_6950steps.png differ diff --git a/fern/assets/images/evo2/evo2_savanna_7b_28ksteps.png b/fern/assets/images/evo2/evo2_savanna_7b_28ksteps.png new file mode 100644 index 0000000000..a2dbf3ee71 Binary files /dev/null and b/fern/assets/images/evo2/evo2_savanna_7b_28ksteps.png differ diff --git a/fern/assets/images/evo2/evo2_vs_7b_40b_performance_vs_context_length.png b/fern/assets/images/evo2/evo2_vs_7b_40b_performance_vs_context_length.png new file mode 100644 index 0000000000..2b2499ba3c Binary files /dev/null and b/fern/assets/images/evo2/evo2_vs_7b_40b_performance_vs_context_length.png differ diff --git a/fern/assets/images/evo2/evo2_vs_llama2_performance_vs_context_length.png b/fern/assets/images/evo2/evo2_vs_llama2_performance_vs_context_length.png new file mode 100644 index 0000000000..f22d219535 Binary files /dev/null and b/fern/assets/images/evo2/evo2_vs_llama2_performance_vs_context_length.png differ diff --git a/fern/assets/images/evo2/evo2_zeroshot_brca1_stripplot.png b/fern/assets/images/evo2/evo2_zeroshot_brca1_stripplot.png new file mode 100644 index 0000000000..282347260e Binary files /dev/null and b/fern/assets/images/evo2/evo2_zeroshot_brca1_stripplot.png differ diff --git a/fern/assets/images/evo2_bionemo_1b_6950steps.png b/fern/assets/images/evo2_bionemo_1b_6950steps.png new file mode 100644 index 0000000000..30198ab9e7 Binary files /dev/null and b/fern/assets/images/evo2_bionemo_1b_6950steps.png differ diff --git a/fern/assets/images/evo2_bionemo_7bnv_28ksteps.png b/fern/assets/images/evo2_bionemo_7bnv_28ksteps.png new file mode 100644 index 0000000000..b7f212a0da Binary files /dev/null and b/fern/assets/images/evo2_bionemo_7bnv_28ksteps.png differ diff --git a/fern/assets/images/evo2_performance_by_cluster_size.png b/fern/assets/images/evo2_performance_by_cluster_size.png new file mode 100644 index 0000000000..5accde044e Binary files /dev/null and b/fern/assets/images/evo2_performance_by_cluster_size.png differ diff --git a/fern/assets/images/evo2_savanna_1b_6950steps.png b/fern/assets/images/evo2_savanna_1b_6950steps.png new file mode 100644 index 0000000000..117b291a26 Binary files /dev/null and b/fern/assets/images/evo2_savanna_1b_6950steps.png differ diff --git a/fern/assets/images/evo2_savanna_7b_28ksteps.png b/fern/assets/images/evo2_savanna_7b_28ksteps.png new file mode 100644 index 0000000000..a2dbf3ee71 Binary files /dev/null and b/fern/assets/images/evo2_savanna_7b_28ksteps.png differ diff --git a/fern/assets/images/evo2_vs_7b_40b_performance_vs_context_length.png b/fern/assets/images/evo2_vs_7b_40b_performance_vs_context_length.png new file mode 100644 index 0000000000..2b2499ba3c Binary files /dev/null and b/fern/assets/images/evo2_vs_7b_40b_performance_vs_context_length.png differ diff --git a/fern/assets/images/evo2_vs_llama2_performance_vs_context_length.png b/fern/assets/images/evo2_vs_llama2_performance_vs_context_length.png new file mode 100644 index 0000000000..f22d219535 Binary files /dev/null and b/fern/assets/images/evo2_vs_llama2_performance_vs_context_length.png differ diff --git a/fern/assets/images/evo2_zeroshot_brca1_stripplot.png b/fern/assets/images/evo2_zeroshot_brca1_stripplot.png new file mode 100644 index 0000000000..282347260e Binary files /dev/null and b/fern/assets/images/evo2_zeroshot_brca1_stripplot.png differ diff --git a/fern/assets/images/execution_schedulers.png b/fern/assets/images/execution_schedulers.png new file mode 100644 index 0000000000..4245dde8b1 Binary files /dev/null and b/fern/assets/images/execution_schedulers.png differ diff --git a/fern/assets/images/f1-score-models-04-18-2025.png b/fern/assets/images/f1-score-models-04-18-2025.png new file mode 100644 index 0000000000..5d341ada04 Binary files /dev/null and b/fern/assets/images/f1-score-models-04-18-2025.png differ diff --git a/fern/assets/images/favicon.png b/fern/assets/images/favicon.png new file mode 100644 index 0000000000..c40b7a6bef Binary files /dev/null and b/fern/assets/images/favicon.png differ diff --git a/fern/assets/images/fsdp_slide1.png b/fern/assets/images/fsdp_slide1.png new file mode 100644 index 0000000000..d42122d86c Binary files /dev/null and b/fern/assets/images/fsdp_slide1.png differ diff --git a/fern/assets/images/fsdp_slide2.png b/fern/assets/images/fsdp_slide2.png new file mode 100644 index 0000000000..aef809eeba Binary files /dev/null and b/fern/assets/images/fsdp_slide2.png differ diff --git a/fern/assets/images/geneformer/F1-score-models.png b/fern/assets/images/geneformer/F1-score-models.png new file mode 100644 index 0000000000..431f1fcfb4 Binary files /dev/null and b/fern/assets/images/geneformer/F1-score-models.png differ diff --git a/fern/assets/images/geneformer/Geneformer_steven_106m_train.png b/fern/assets/images/geneformer/Geneformer_steven_106m_train.png new file mode 100644 index 0000000000..7bf9fb3601 Binary files /dev/null and b/fern/assets/images/geneformer/Geneformer_steven_106m_train.png differ diff --git a/fern/assets/images/geneformer/Geneformer_steven_106m_val.png b/fern/assets/images/geneformer/Geneformer_steven_106m_val.png new file mode 100644 index 0000000000..a8eb9775c6 Binary files /dev/null and b/fern/assets/images/geneformer/Geneformer_steven_106m_val.png differ diff --git a/fern/assets/images/geneformer/accuracy-models-04-18-2025.png b/fern/assets/images/geneformer/accuracy-models-04-18-2025.png new file mode 100644 index 0000000000..52b0c8c0d2 Binary files /dev/null and b/fern/assets/images/geneformer/accuracy-models-04-18-2025.png differ diff --git a/fern/assets/images/geneformer/average-accuracy-models.png b/fern/assets/images/geneformer/average-accuracy-models.png new file mode 100644 index 0000000000..3abd706602 Binary files /dev/null and b/fern/assets/images/geneformer/average-accuracy-models.png differ diff --git a/fern/assets/images/geneformer/f1-score-models-04-18-2025.png b/fern/assets/images/geneformer/f1-score-models-04-18-2025.png new file mode 100644 index 0000000000..5d341ada04 Binary files /dev/null and b/fern/assets/images/geneformer/f1-score-models-04-18-2025.png differ diff --git a/fern/assets/images/geneformer/geneformer_106m_train_loss.png b/fern/assets/images/geneformer/geneformer_106m_train_loss.png new file mode 100644 index 0000000000..e59d38b51e Binary files /dev/null and b/fern/assets/images/geneformer/geneformer_106m_train_loss.png differ diff --git a/fern/assets/images/geneformer/geneformer_106m_val_loss.png b/fern/assets/images/geneformer/geneformer_106m_val_loss.png new file mode 100644 index 0000000000..f0ef330529 Binary files /dev/null and b/fern/assets/images/geneformer/geneformer_106m_val_loss.png differ diff --git a/fern/assets/images/geneformer/geneformer_10m_training_loss.png b/fern/assets/images/geneformer/geneformer_10m_training_loss.png new file mode 100644 index 0000000000..5923ae0e24 Binary files /dev/null and b/fern/assets/images/geneformer/geneformer_10m_training_loss.png differ diff --git a/fern/assets/images/geneformer/geneformer_10m_val_loss.png b/fern/assets/images/geneformer/geneformer_10m_val_loss.png new file mode 100644 index 0000000000..becc2254f2 Binary files /dev/null and b/fern/assets/images/geneformer/geneformer_10m_val_loss.png differ diff --git a/fern/assets/images/geneformer/loss_curve_new_v_old_geneformer_64_node_10M.png b/fern/assets/images/geneformer/loss_curve_new_v_old_geneformer_64_node_10M.png new file mode 100644 index 0000000000..7dbb980086 Binary files /dev/null and b/fern/assets/images/geneformer/loss_curve_new_v_old_geneformer_64_node_10M.png differ diff --git a/fern/assets/images/geneformer/model_tflops_per_gpu_chart_geneformer.png b/fern/assets/images/geneformer/model_tflops_per_gpu_chart_geneformer.png new file mode 100644 index 0000000000..d3acd5cac2 Binary files /dev/null and b/fern/assets/images/geneformer/model_tflops_per_gpu_chart_geneformer.png differ diff --git a/fern/assets/images/geneformer_106m_train_loss.png b/fern/assets/images/geneformer_106m_train_loss.png new file mode 100644 index 0000000000..e59d38b51e Binary files /dev/null and b/fern/assets/images/geneformer_106m_train_loss.png differ diff --git a/fern/assets/images/geneformer_106m_val_loss.png b/fern/assets/images/geneformer_106m_val_loss.png new file mode 100644 index 0000000000..f0ef330529 Binary files /dev/null and b/fern/assets/images/geneformer_106m_val_loss.png differ diff --git a/fern/assets/images/geneformer_10m_training_loss.png b/fern/assets/images/geneformer_10m_training_loss.png new file mode 100644 index 0000000000..5923ae0e24 Binary files /dev/null and b/fern/assets/images/geneformer_10m_training_loss.png differ diff --git a/fern/assets/images/geneformer_10m_val_loss.png b/fern/assets/images/geneformer_10m_val_loss.png new file mode 100644 index 0000000000..becc2254f2 Binary files /dev/null and b/fern/assets/images/geneformer_10m_val_loss.png differ diff --git a/fern/assets/images/lingua-1b-loss-curve.png b/fern/assets/images/lingua-1b-loss-curve.png new file mode 100644 index 0000000000..a782e166a1 Binary files /dev/null and b/fern/assets/images/lingua-1b-loss-curve.png differ diff --git a/fern/assets/images/lingua-1b-step-time.png b/fern/assets/images/lingua-1b-step-time.png new file mode 100644 index 0000000000..2b641b539d Binary files /dev/null and b/fern/assets/images/lingua-1b-step-time.png differ diff --git a/fern/assets/images/logo-icon-black.svg b/fern/assets/images/logo-icon-black.svg new file mode 100644 index 0000000000..3e5448e732 --- /dev/null +++ b/fern/assets/images/logo-icon-black.svg @@ -0,0 +1,3 @@ + + + diff --git a/fern/assets/images/logo-white.svg b/fern/assets/images/logo-white.svg new file mode 100644 index 0000000000..e890314f9f --- /dev/null +++ b/fern/assets/images/logo-white.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/fern/assets/images/loss_curve_new_v_old_geneformer_64_node_10M.png b/fern/assets/images/loss_curve_new_v_old_geneformer_64_node_10M.png new file mode 100644 index 0000000000..7dbb980086 Binary files /dev/null and b/fern/assets/images/loss_curve_new_v_old_geneformer_64_node_10M.png differ diff --git a/fern/assets/images/megatron_background/README.md b/fern/assets/images/megatron_background/README.md new file mode 100644 index 0000000000..580f5b73c8 --- /dev/null +++ b/fern/assets/images/megatron_background/README.md @@ -0,0 +1 @@ +NOTE: these images are from https://nvidia.sharepoint.com/:p:/r/sites/PixelsManagementTeams/_layouts/15/doc2.aspx?sourcedoc=%7BD1FC26B6-A366-4D1E-8595-A9D3CD3A0D71%7D&file=Pixels_SW_Team_Meeting_2024_09_05.pptx&action=edit&mobileredirect=true&DefaultItemOpen=1 diff --git a/fern/assets/images/megatron_background/data_parallelism.png b/fern/assets/images/megatron_background/data_parallelism.png new file mode 100644 index 0000000000..37e6566fdc Binary files /dev/null and b/fern/assets/images/megatron_background/data_parallelism.png differ diff --git a/fern/assets/images/megatron_background/execution_schedulers.png b/fern/assets/images/megatron_background/execution_schedulers.png new file mode 100644 index 0000000000..4245dde8b1 Binary files /dev/null and b/fern/assets/images/megatron_background/execution_schedulers.png differ diff --git a/fern/assets/images/megatron_background/fsdp_slide1.png b/fern/assets/images/megatron_background/fsdp_slide1.png new file mode 100644 index 0000000000..d42122d86c Binary files /dev/null and b/fern/assets/images/megatron_background/fsdp_slide1.png differ diff --git a/fern/assets/images/megatron_background/fsdp_slide2.png b/fern/assets/images/megatron_background/fsdp_slide2.png new file mode 100644 index 0000000000..aef809eeba Binary files /dev/null and b/fern/assets/images/megatron_background/fsdp_slide2.png differ diff --git a/fern/assets/images/megatron_background/pipeline_parallelism.png b/fern/assets/images/megatron_background/pipeline_parallelism.png new file mode 100644 index 0000000000..d0feb1de39 Binary files /dev/null and b/fern/assets/images/megatron_background/pipeline_parallelism.png differ diff --git a/fern/assets/images/megatron_background/sp_korthikanti_2022_fig5.png b/fern/assets/images/megatron_background/sp_korthikanti_2022_fig5.png new file mode 100644 index 0000000000..53fb1f042d Binary files /dev/null and b/fern/assets/images/megatron_background/sp_korthikanti_2022_fig5.png differ diff --git a/fern/assets/images/megatron_background/tensor_and_pipeline_parallelism.png b/fern/assets/images/megatron_background/tensor_and_pipeline_parallelism.png new file mode 100644 index 0000000000..fffde8ead7 Binary files /dev/null and b/fern/assets/images/megatron_background/tensor_and_pipeline_parallelism.png differ diff --git a/fern/assets/images/megatron_background/tensor_parallelism.png b/fern/assets/images/megatron_background/tensor_parallelism.png new file mode 100644 index 0000000000..8082f2f7e1 Binary files /dev/null and b/fern/assets/images/megatron_background/tensor_parallelism.png differ diff --git a/fern/assets/images/model_tflops_per_gpu_chart_geneformer.png b/fern/assets/images/model_tflops_per_gpu_chart_geneformer.png new file mode 100644 index 0000000000..d3acd5cac2 Binary files /dev/null and b/fern/assets/images/model_tflops_per_gpu_chart_geneformer.png differ diff --git a/fern/assets/images/num_cells_by_assay.png b/fern/assets/images/num_cells_by_assay.png new file mode 100644 index 0000000000..967e536005 Binary files /dev/null and b/fern/assets/images/num_cells_by_assay.png differ diff --git a/fern/assets/images/num_cells_by_dataset.png b/fern/assets/images/num_cells_by_dataset.png new file mode 100644 index 0000000000..69b146045a Binary files /dev/null and b/fern/assets/images/num_cells_by_dataset.png differ diff --git a/fern/assets/images/num_genes_measured_by_assay.png b/fern/assets/images/num_genes_measured_by_assay.png new file mode 100644 index 0000000000..00864d4ca0 Binary files /dev/null and b/fern/assets/images/num_genes_measured_by_assay.png differ diff --git a/fern/assets/images/og2_convergence_vs_megatron.png b/fern/assets/images/og2_convergence_vs_megatron.png new file mode 100644 index 0000000000..6b20b718fe Binary files /dev/null and b/fern/assets/images/og2_convergence_vs_megatron.png differ diff --git a/fern/assets/images/og2_data_sorting.png b/fern/assets/images/og2_data_sorting.png new file mode 100644 index 0000000000..3409de0591 Binary files /dev/null and b/fern/assets/images/og2_data_sorting.png differ diff --git a/fern/assets/images/og2_hf_streaming_buffer_original.png b/fern/assets/images/og2_hf_streaming_buffer_original.png new file mode 100644 index 0000000000..c8dad62972 Binary files /dev/null and b/fern/assets/images/og2_hf_streaming_buffer_original.png differ diff --git a/fern/assets/images/og2_hf_streaming_buffer_resharded.png b/fern/assets/images/og2_hf_streaming_buffer_resharded.png new file mode 100644 index 0000000000..f7dabcd904 Binary files /dev/null and b/fern/assets/images/og2_hf_streaming_buffer_resharded.png differ diff --git a/fern/assets/images/og2_megatron_sharded_eden_dataloader.png b/fern/assets/images/og2_megatron_sharded_eden_dataloader.png new file mode 100644 index 0000000000..0eb718c7ee Binary files /dev/null and b/fern/assets/images/og2_megatron_sharded_eden_dataloader.png differ diff --git a/fern/assets/images/og2_original_vs_reshuffled.png b/fern/assets/images/og2_original_vs_reshuffled.png new file mode 100644 index 0000000000..b876449116 Binary files /dev/null and b/fern/assets/images/og2_original_vs_reshuffled.png differ diff --git a/fern/assets/images/og2_resharding_duckdb.png b/fern/assets/images/og2_resharding_duckdb.png new file mode 100644 index 0000000000..533bb31d45 Binary files /dev/null and b/fern/assets/images/og2_resharding_duckdb.png differ diff --git a/fern/assets/images/og2_summary_shuffling_approaches.png b/fern/assets/images/og2_summary_shuffling_approaches.png new file mode 100644 index 0000000000..7b7abf06e6 Binary files /dev/null and b/fern/assets/images/og2_summary_shuffling_approaches.png differ diff --git a/fern/assets/images/og2_throughput_comparison.png b/fern/assets/images/og2_throughput_comparison.png new file mode 100644 index 0000000000..fe778ea6c5 Binary files /dev/null and b/fern/assets/images/og2_throughput_comparison.png differ diff --git a/fern/assets/images/pct_cells_by_age.png b/fern/assets/images/pct_cells_by_age.png new file mode 100644 index 0000000000..c052a09da0 Binary files /dev/null and b/fern/assets/images/pct_cells_by_age.png differ diff --git a/fern/assets/images/pct_cells_by_ethnicity_category.png b/fern/assets/images/pct_cells_by_ethnicity_category.png new file mode 100644 index 0000000000..9bbd6463d7 Binary files /dev/null and b/fern/assets/images/pct_cells_by_ethnicity_category.png differ diff --git a/fern/assets/images/pct_cells_by_sex.png b/fern/assets/images/pct_cells_by_sex.png new file mode 100644 index 0000000000..d09e8ce097 Binary files /dev/null and b/fern/assets/images/pct_cells_by_sex.png differ diff --git a/fern/assets/images/pct_cells_by_tissue_category.png b/fern/assets/images/pct_cells_by_tissue_category.png new file mode 100644 index 0000000000..93b613c846 Binary files /dev/null and b/fern/assets/images/pct_cells_by_tissue_category.png differ diff --git a/fern/assets/images/pipeline_parallelism.png b/fern/assets/images/pipeline_parallelism.png new file mode 100644 index 0000000000..d0feb1de39 Binary files /dev/null and b/fern/assets/images/pipeline_parallelism.png differ diff --git a/fern/assets/images/recipes/70b-cp-benchmarks.png b/fern/assets/images/recipes/70b-cp-benchmarks.png new file mode 100644 index 0000000000..f56deb5aa2 Binary files /dev/null and b/fern/assets/images/recipes/70b-cp-benchmarks.png differ diff --git a/fern/assets/images/recipes/lingua-1b-loss-curve.png b/fern/assets/images/recipes/lingua-1b-loss-curve.png new file mode 100644 index 0000000000..a782e166a1 Binary files /dev/null and b/fern/assets/images/recipes/lingua-1b-loss-curve.png differ diff --git a/fern/assets/images/recipes/lingua-1b-step-time.png b/fern/assets/images/recipes/lingua-1b-step-time.png new file mode 100644 index 0000000000..2b641b539d Binary files /dev/null and b/fern/assets/images/recipes/lingua-1b-step-time.png differ diff --git a/fern/assets/images/recipes/og2_convergence_vs_megatron.png b/fern/assets/images/recipes/og2_convergence_vs_megatron.png new file mode 100644 index 0000000000..6b20b718fe Binary files /dev/null and b/fern/assets/images/recipes/og2_convergence_vs_megatron.png differ diff --git a/fern/assets/images/recipes/og2_data_sorting.png b/fern/assets/images/recipes/og2_data_sorting.png new file mode 100644 index 0000000000..3409de0591 Binary files /dev/null and b/fern/assets/images/recipes/og2_data_sorting.png differ diff --git a/fern/assets/images/recipes/og2_hf_streaming_buffer_original.png b/fern/assets/images/recipes/og2_hf_streaming_buffer_original.png new file mode 100644 index 0000000000..c8dad62972 Binary files /dev/null and b/fern/assets/images/recipes/og2_hf_streaming_buffer_original.png differ diff --git a/fern/assets/images/recipes/og2_hf_streaming_buffer_resharded.png b/fern/assets/images/recipes/og2_hf_streaming_buffer_resharded.png new file mode 100644 index 0000000000..f7dabcd904 Binary files /dev/null and b/fern/assets/images/recipes/og2_hf_streaming_buffer_resharded.png differ diff --git a/fern/assets/images/recipes/og2_megatron_sharded_eden_dataloader.png b/fern/assets/images/recipes/og2_megatron_sharded_eden_dataloader.png new file mode 100644 index 0000000000..0eb718c7ee Binary files /dev/null and b/fern/assets/images/recipes/og2_megatron_sharded_eden_dataloader.png differ diff --git a/fern/assets/images/recipes/og2_original_vs_reshuffled.png b/fern/assets/images/recipes/og2_original_vs_reshuffled.png new file mode 100644 index 0000000000..b876449116 Binary files /dev/null and b/fern/assets/images/recipes/og2_original_vs_reshuffled.png differ diff --git a/fern/assets/images/recipes/og2_resharding_duckdb.png b/fern/assets/images/recipes/og2_resharding_duckdb.png new file mode 100644 index 0000000000..533bb31d45 Binary files /dev/null and b/fern/assets/images/recipes/og2_resharding_duckdb.png differ diff --git a/fern/assets/images/recipes/og2_summary_shuffling_approaches.png b/fern/assets/images/recipes/og2_summary_shuffling_approaches.png new file mode 100644 index 0000000000..7b7abf06e6 Binary files /dev/null and b/fern/assets/images/recipes/og2_summary_shuffling_approaches.png differ diff --git a/fern/assets/images/recipes/og2_throughput_comparison.png b/fern/assets/images/recipes/og2_throughput_comparison.png new file mode 100644 index 0000000000..fe778ea6c5 Binary files /dev/null and b/fern/assets/images/recipes/og2_throughput_comparison.png differ diff --git a/fern/assets/images/sae.png b/fern/assets/images/sae.png new file mode 100644 index 0000000000..1de9f60aff Binary files /dev/null and b/fern/assets/images/sae.png differ diff --git a/fern/assets/images/sp_korthikanti_2022_fig5.png b/fern/assets/images/sp_korthikanti_2022_fig5.png new file mode 100644 index 0000000000..53fb1f042d Binary files /dev/null and b/fern/assets/images/sp_korthikanti_2022_fig5.png differ diff --git a/fern/assets/images/sub_package_graphs/dependency_file_imports.png b/fern/assets/images/sub_package_graphs/dependency_file_imports.png new file mode 100644 index 0000000000..27db22499d Binary files /dev/null and b/fern/assets/images/sub_package_graphs/dependency_file_imports.png differ diff --git a/fern/assets/images/sub_package_graphs/dependency_graph_pyproject.png b/fern/assets/images/sub_package_graphs/dependency_graph_pyproject.png new file mode 100644 index 0000000000..e3f24065bc Binary files /dev/null and b/fern/assets/images/sub_package_graphs/dependency_graph_pyproject.png differ diff --git a/fern/assets/images/sub_package_graphs/dependency_graph_tach.png b/fern/assets/images/sub_package_graphs/dependency_graph_tach.png new file mode 100644 index 0000000000..315b45675a Binary files /dev/null and b/fern/assets/images/sub_package_graphs/dependency_graph_tach.png differ diff --git a/fern/assets/images/tensor_and_pipeline_parallelism.png b/fern/assets/images/tensor_and_pipeline_parallelism.png new file mode 100644 index 0000000000..fffde8ead7 Binary files /dev/null and b/fern/assets/images/tensor_and_pipeline_parallelism.png differ diff --git a/fern/assets/images/tensor_parallelism.png b/fern/assets/images/tensor_parallelism.png new file mode 100644 index 0000000000..8082f2f7e1 Binary files /dev/null and b/fern/assets/images/tensor_parallelism.png differ diff --git a/fern/assets/images/top9_datasets_tissue_distribution.png b/fern/assets/images/top9_datasets_tissue_distribution.png new file mode 100644 index 0000000000..783d4c1e5c Binary files /dev/null and b/fern/assets/images/top9_datasets_tissue_distribution.png differ diff --git a/fern/assets/images/trainer_global_step.png b/fern/assets/images/trainer_global_step.png new file mode 100644 index 0000000000..2375e9a03a Binary files /dev/null and b/fern/assets/images/trainer_global_step.png differ diff --git a/fern/assets/images/training_loss.png b/fern/assets/images/training_loss.png new file mode 100644 index 0000000000..872d133cab Binary files /dev/null and b/fern/assets/images/training_loss.png differ diff --git a/fern/assets/images/validation_loss.png b/fern/assets/images/validation_loss.png new file mode 100644 index 0000000000..2f2b4e2e28 Binary files /dev/null and b/fern/assets/images/validation_loss.png differ diff --git a/fern/assets/images/validation_ppl.png b/fern/assets/images/validation_ppl.png new file mode 100644 index 0000000000..fe7f0c8cb1 Binary files /dev/null and b/fern/assets/images/validation_ppl.png differ diff --git a/fern/assets/images/wandb_tips_tricks/trainer_global_step.png b/fern/assets/images/wandb_tips_tricks/trainer_global_step.png new file mode 100644 index 0000000000..2375e9a03a Binary files /dev/null and b/fern/assets/images/wandb_tips_tricks/trainer_global_step.png differ diff --git a/fern/components/BadgeLinks.tsx b/fern/components/BadgeLinks.tsx new file mode 100644 index 0000000000..76d4da8407 --- /dev/null +++ b/fern/components/BadgeLinks.tsx @@ -0,0 +1,26 @@ +/** + * Badge links for GitHub, License, PyPI, etc. + * Uses a flex wrapper to display badges horizontally and hides Fern's + * external-link icon that otherwise stacks under each badge image. + * Requires the `.badge-links` CSS rule from main.css. + */ +export type BadgeItem = { + href: string; + src: string; + alt: string; +}; + +export function BadgeLinks({ badges }: { badges: BadgeItem[] }) { + return ( +
+ {badges.map((b) => ( + + {b.alt} + + ))} +
+ ); +} diff --git a/fern/components/CustomFooter.tsx b/fern/components/CustomFooter.tsx new file mode 100644 index 0000000000..fab392c407 --- /dev/null +++ b/fern/components/CustomFooter.tsx @@ -0,0 +1,91 @@ +/** + * Custom footer for NVIDIA docs (Fern native header/footer). + * Markup and class names match the original custom-app footer 1:1 so that + * fern/main.css (footer + Built with Fern styles) applies correctly: + * dark mode logo, responsive layout, and Built with Fern tooltip. + */ +export default function CustomFooter() { + const currentYear = new Date().getFullYear(); + const logoUrl = + "https://fern-image-hosting.s3.us-east-1.amazonaws.com/nvidia/NVIDIA_Logo_0.svg"; + + return ( + + ); +} diff --git a/fern/components/NotebookViewer.tsx b/fern/components/NotebookViewer.tsx new file mode 100644 index 0000000000..2f93b4f590 --- /dev/null +++ b/fern/components/NotebookViewer.tsx @@ -0,0 +1,444 @@ +import type { ReactNode } from "react"; + +/** + * NotebookViewer - Renders Jupyter notebook content in Fern docs. + * + * Uses Fern's code block structure (fern-code, fern-code-block, etc.) so input + * and output cells match the default Fern code block styling. + * + * Accepts notebook cells (markdown + code) and optionally a Colab URL. + * Generate data with `fern/scripts/ipynb-to-fern-json.py` from `.ipynb` files. + * + * NOTE: Fern's custom component pipeline uses the automatic JSX runtime. + * Only type-only imports from "react" are used (erased at compile time). + * + * Usage in MDX: + * import { NotebookViewer } from "@/components/NotebookViewer"; + * import notebook from "@/components/notebooks/my-notebook"; + * + * + */ + +export interface CellOutput { + type: "text" | "image"; + data: string; + format?: "plain" | "html"; +} + +export interface NotebookCell { + type: "markdown" | "code"; + source: string; + /** Pre-rendered syntax-highlighted HTML (from Pygments). When present, used instead of escaped source. */ + source_html?: string; + language?: string; + outputs?: CellOutput[]; +} + +export interface NotebookData { + cells: NotebookCell[]; +} + +export interface NotebookViewerProps { + /** Notebook data with cells array. If import fails, this may be undefined. */ + notebook?: NotebookData | null; + /** Optional Colab URL for "Run in Colab" badge */ + colabUrl?: string; + /** Show code cell outputs (default: true) */ + showOutputs?: boolean; +} + +function NotebookViewerError({ message, detail }: { message: string; detail?: string }) { + return ( +
+ NotebookViewer error: {message} + {detail && ( +
+          {detail}
+        
+ )} +
+ ); +} + +function escapeHtml(text: string): string { + if (typeof text !== "string") return ""; + return text + .replace(/&/g, "&") + .replace(//g, ">") + .replace(/"/g, """); +} + +function isSafeUrl(url: string): boolean { + const trimmed = url.trim(); + return ( + trimmed.startsWith("http://") || + trimmed.startsWith("https://") || + trimmed.startsWith("mailto:") || + trimmed.startsWith("#") || + trimmed.startsWith("/") + ); +} + +const UL_CLASS = + "[&>li]:relative [&>li]:before:text-(color:--grayscale-a10) mb-3 list-none pl-3 [&>li]:pl-3 [&>li]:before:absolute [&>li]:before:ml-[-22px] [&>li]:before:mt-[-1px] [&>li]:before:content-['⦁'] [&>li]:before:self-center"; +const OL_CLASS = "mb-3 list-outside list-decimal [&_ol]:!list-[lower-roman]"; + +function renderMarkdown(markdown: string): string { + if (typeof markdown !== "string") return ""; + let html = markdown + .replace(//gi, "\u0000BR\u0000") + .replace(/&/g, "&") + .replace(//g, ">") + .replace(/\u0000BR\u0000/g, "
") + .replace(/\[([^\]]+)\]\(([^)]+)\)/g, (_, text, url) => { + if (!isSafeUrl(url)) return escapeHtml(`[${text}](${url})`); + const isInternal = url.startsWith("/") || url.startsWith("#"); + const attrs = isInternal + ? `href="${escapeHtml(url)}" class="fern-mdx-link"` + : `href="${escapeHtml(url)}" target="_blank" rel="noopener noreferrer" class="fern-mdx-link"`; + const icon = + isInternal + ? "" + : ''; + return `${text}${icon}`; + }) + .replace(/\*\*(.*?)\*\*/g, '$1') + .replace(/\*(.*?)\*/g, "$1") + .replace(/`([^`]+)`/g, "$1"); + html = html + .split("\n") + .map((line) => { + if (/^#### (.*)$/.test(line)) return `

${line.slice(5)}

`; + if (/^### (.*)$/.test(line)) return `

${line.slice(4)}

`; + if (/^## (.*)$/.test(line)) return `

${line.slice(3)}

`; + if (/^# (.*)$/.test(line)) return `

${line.slice(2)}

`; + if (/^- (.*)$/.test(line)) return `
  • ${line.slice(2)}
  • `; + if (/^\d+\. (.*)$/.test(line)) return `
  • ${line.replace(/^\d+\. /, "")}
  • `; + if (line.trim() === "") return ""; + return `

    ${line}

    `; + }) + .join("\n"); + html = html.replace( + /(
  • .*?<\/li>\s*)+/gs, + (m) => `
      ${m.replace(/ data-ol/g, "").trim()}
    ` + ); + html = html.replace( + /(
  • .*?<\/li>\s*)+/gs, + (m) => `
      ${m.replace(/ data-ul/g, "").trim()}
    ` + ); + return html; +} + +function handleCopy(content: string, button: HTMLButtonElement) { + navigator.clipboard.writeText(content).catch(() => {}); + const originalHtml = button.innerHTML; + const originalLabel = button.getAttribute("aria-label") ?? "Copy code"; + button.innerHTML = "Copied!"; + button.setAttribute("aria-label", "Copied to clipboard"); + setTimeout(() => { + button.innerHTML = originalHtml; + button.setAttribute("aria-label", originalLabel); + }, 1500); +} + +const FLAG_ICON = ( + + + + +); + +const SCROLL_AREA_STYLE = `[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}`; + +const BUTTON_BASE_CLASS = + "focus-visible:ring-(color:--accent) rounded-2 inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium transition-colors hover:transition-none focus-visible:outline-none focus-visible:ring-1 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 text-(color:--grayscale-a11) hover:bg-(color:--accent-a3) hover:text-(color:--accent-11) pointer-coarse:size-9 size-7"; + +/** Fern code block structure – matches Fern docs (header with language + buttons, pre with scroll area). */ +function FernCodeBlock({ + title, + children, + className = "", + asPre = true, + copyContent, + showLineNumbers = false, + codeHtml, +}: { + title: string; + children: ReactNode; + className?: string; + /** Use div instead of pre for content (needed when children include block elements like img/div). */ + asPre?: boolean; + /** Raw text to copy when copy button is clicked. When provided, shows a copy button. */ + copyContent?: string; + /** Show line numbers in a table layout (matches Fern's code block structure). */ + showLineNumbers?: boolean; + /** Pre-rendered HTML for each line when showLineNumbers is true. Lines are split by newline. */ + codeHtml?: string; +}) { + const headerLabel = title === "Output" ? "Output" : title.charAt(0).toUpperCase() + title.slice(1); + const wrapperClasses = + "fern-code fern-code-block bg-card-background border-card-border rounded-3 shadow-card-grayscale relative mb-6 mt-4 flex w-full min-w-0 max-w-full flex-col border first:mt-0"; + const preStyle = { + backgroundColor: "rgb(255, 255, 255)", + ["--shiki-dark-bg" as string]: "#212121", + color: "rgb(36, 41, 46)", + ["--shiki-dark" as string]: "#EEFFFF", + }; + + const scrollAreaContent = () => { + if (codeHtml == null) return null; + const lines = codeHtml.split("\n"); + return ( +
    +