diff --git a/.idea/workspace.xml b/.idea/workspace.xml
new file mode 100644
index 0000000..9c56ecf
--- /dev/null
+++ b/.idea/workspace.xml
@@ -0,0 +1,155 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {
+ "lastFilter": {
+ "state": "OPEN",
+ "assignee": "longsizhuo"
+ }
+}
+ {
+ "selectedUrlAndAccountId": {
+ "url": "git@github.com:InvolutionHell/involutionhell.github.io.git",
+ "accountId": "7e76acee-1bc6-4dbc-85cc-b6dd67159f8d"
+ }
+}
+ {
+ "associatedIndex": 5
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1758971836294
+
+
+ 1758971836294
+
+
+
+
+
+ 1758987586586
+
+
+
+ 1758987586586
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/docs/ai/MoE/moe-update.md b/app/docs/ai/MoE/moe-update.md
index 821a767..90297d9 100644
--- a/app/docs/ai/MoE/moe-update.md
+++ b/app/docs/ai/MoE/moe-update.md
@@ -1,5 +1,5 @@
---
-title: Theory of MoE
+title: "Theory of MoE"
description: ""
date: "2025-10-05"
tags:
@@ -16,17 +16,21 @@ docId: db3qwg25h6l0bh8f2sdabdqc
给定正的常数 $c_1, c_2$,我们定义:
- $x = \Omega(y)$,如果 $x > c_2 |y|$;
-- $x = \Theta(y)$,如果 $c_1 |y| < x < c_2 |y|$;
-- $x = O(y)$,如果 $x < c_1 |y|$;
-- $x = o(y)$,如果 $\frac{x}{y} \to 0$。
-- O(y):上界,表示“不会比 y 增长得更快”。
-- Ω(y):下界,表示“至少和 y 一样快”。
-- Θ(y):上下界都在 y 的数量级内,表示“和 y 同阶”。
-- o(y):严格比 y 小得多,最终会趋近于 0。
+- $x = \Theta(y)$,如果 $c_1 |y| \lt x \lt c_2 |y|$;
+- $x = O(y)$,如果 $x \lt c_1 |y|$;
+- $x = o(y)$,如果 $\dfrac{x}{y} \to 0$。
+
+其中:
+
+- $O(y)$:上界,表示“不会比 $y$ 增长得更快”。
+- $\Omega(y)$:下界,表示“至少和 $y$ 一样快”。
+- $\Theta(y)$:上下界都在 $y$ 的数量级内,表示“和 $y$ 同阶”。
+- $o(y)$:严格比 $y$ 小得多,最终会趋近于 $0$。
## **重要假设**:
-1. 这个文章只想给出闭式遗忘公式,所以直接简化成线性模型。$f(X)=X^⊤w,w∈R^d$
+1. 这个文章只想给出闭式遗忘公式,所以直接简化成线性模型。$f(X)=X^{\top}w,\; w\in \mathbb{R}^d$
+
2. 这个文章只讨论task-wised的路由方法,数据生成的时候每份数据只加入了一个信号数据,其余都是正态分布噪声。目的也是为了简化模型,然后在实际工程应用中,token会被隐式的送到各个experts,而不采用人为设定的方式。
> ### 数据集生成规则
diff --git a/mdx-components.tsx b/mdx-components.tsx
index b21a161..dc5d3d9 100644
--- a/mdx-components.tsx
+++ b/mdx-components.tsx
@@ -1,9 +1,50 @@
+import Image from "next/image";
+import type { ImageProps } from "next/image";
import defaultMdxComponents from "fumadocs-ui/mdx";
import type { MDXComponents } from "mdx/types";
+import type { ComponentPropsWithoutRef } from "react";
+
+type MdxImageProps = ComponentPropsWithoutRef<"img"> & {
+ src?: ImageProps["src"];
+ width?: number | string;
+ height?: number | string;
+};
+
+function MdxImage({ src, alt = "", width, height, ...rest }: MdxImageProps) {
+ if (!src) {
+ return (
+
+ );
+ }
+ const numericWidth = typeof width === "string" ? Number(width) : width;
+ const numericHeight = typeof height === "string" ? Number(height) : height;
+
+ if (!Number.isFinite(numericWidth) || !Number.isFinite(numericHeight)) {
+ // fallback: 当 width/height 不是可解析数值时,直接使用原生
+ return
;
+ }
+
+ return (
+
+ );
+}
export function getMDXComponents(components?: MDXComponents): MDXComponents {
return {
...defaultMdxComponents,
+ img: MdxImage,
...components,
};
}
diff --git a/next.config.mjs b/next.config.mjs
index 2d45cdf..965a5a6 100644
--- a/next.config.mjs
+++ b/next.config.mjs
@@ -1,11 +1,14 @@
// next.config.mjs
import { createMDX } from "fumadocs-mdx/next";
import createNextIntlPlugin from "next-intl/plugin";
+import { remarkImage } from "fumadocs-core/mdx-plugins";
const withMDX = createMDX({
configPath: "source.config.ts",
+ mdxOptions: {
+ remarkPlugins: [[remarkImage, { onError: "ignore", external: true }]],
+ },
});
-
const withNextIntl = createNextIntlPlugin("./i18n.ts");
/** @type {import('next').NextConfig} */