Skill: GSAP - HyperFrames 动画引擎

GitHub: greensock/gsap-skills 官网: gsap.com 核心定位 GSAP (GreenSock Animation Platform) 是专业的 JavaScript 动画库,HyperFrames 使用它作为主要动画引擎。 重要更新:GSAP 完全免费,包括所有插件。自 Webflow 收购 GSAP 后,所有插件(包括 formerly Club-only 的 SplitText、MorphSVG 等)对所有人都免费使用,包括商业用途。 安装 Claude Code 插件市场(推荐) 1 2 /plugin marketplace add greensock/gsap-skills /reload-plugins npx skills(通用) 1 npx skills add https://github.com/greensock/gsap-skills HyperFrames Contract HyperFrames 通过 window.__timelines 控制 GSAP,所有 timeline 必须遵循此约定: 1 2 3 4 5 6 7 8 9 window.__timelines = window.__timelines || {}; const tl = gsap.timeline({ paused: true })); // 构建动画 tl.from(".title", { y: 48, opacity: 0, duration: 0.6, ease: "power3.out" }, 0); tl.to(".accent", { scaleX: 1, duration: 0.5, ease: "power2.out" }, 0.25); // 注册 — key 必须与 data-composition-id 匹配 window.__timelines["main"] = tl; 关键规则: ...

May 28, 2026 · 4 min · 691 words · Me

Skill: HyperFrames - 用 HTML 制作视频

GitHub: heygen-com/hyperframes 文档: hyperframes.heygen.com 核心定位 HyperFrames 是一个开源的 HTML 视频渲染框架,用「写 HTML 来渲染视频」的方式工作。最大的特点是 AI-First——AI Agent 天然会写 HTML,不需要额外学习。 与 Remotion 的核心区别: 特性 HyperFrames Remotion 编写方式 HTML + CSS + GSAP React 组件 (TSX) 构建步骤 无,.html 直接可用 需要 bundler 动画精度 Seekable,帧级精确 依赖 wall-clock 开源许可 Apache 2.0(完全开源) 自定义许可证(需付费) HyperFrames 借鉴了 Remotion 的设计思路,代码中保留了对其首创模式的致谢注释。两者的核心分歧在于:Agent 主要写什么。Remotion 选择 React 组件,HyperFrames 选择 HTML。 安装 Claude Code 插件市场(推荐) 1 2 /plugin marketplace add heygen-com/hyperframes /reload-plugins npx skills(通用) 1 npx skills add heygen-com/hyperframes CLI 工具 1 2 3 4 5 6 7 8 9 10 11 12 # 全局安装 CLI npm install -g hyperframes # 初始化新项目 hyperframes init my-video cd my-video # 开发预览 hyperframes preview # 浏览器预览,live reload # 渲染输出 hyperframes render # 输出 MP4 前置要求:Node.js >= 22, FFmpeg ...

May 28, 2026 · 4 min · 662 words · Me

[Deterministic RL] 确定性问题的来源 & Reproducible RL

理解LLM推理中deterministic问题来源 Wiki上对deterministic算法的定义是: “a deterministic algorithm is an algorithm that, given a particular input, will always produce the same output.” 而我们在文中要讨论的,即对于LLM这个context下的deterministic问题,我会先从inference角度(即重复给定一个确定的input,模型的推理为什么无法给定确定的输出)进行问题的理解,再进一步讨论RL工程中的training & inference之间差异,可能会导致RL训练的崩溃问题,并继续讨论业界现在已有的解决方案、与还在working-in-progress的工作。 浮点数的非结合性 thinking machines lab针对batch invariant讨论的文章,详细地解释了在LLM推理中不确定性的来原,即因为精度有限,GPU浮点数运算中的结合性通常不成立: $$(a+b)+c \neq a+(b+c) $$ 这篇arxiv文章,则更深入得说明了这个问题: Floating-point arithmetic in GPUs exhibits non-associativity, meaning (a+b)+c≠a+(b+c) due to finite precision and rounding errors. This property directly impacts the computation of attention scores and logits in the transformer architecture, where parallel operations across multiple threads can yield different results based on execution order. ...

November 20, 2025 · 6 min · 1157 words · Me

[vLLM-Ascend] MC2技术深度解析:从MoE架构到通信融合优化

源码分析依赖vllm-ascend在2025/9/20号的main分支,阅读请注意时效性。 阅读建议: 了解MoE基本架构和关键推导 初步了解集合通信各原语的含义 对通算掩盖这类性能优化有基础的了解 概述 MC2(Merged Compute and Communication)是vLLM Ascend项目中针对昇腾NPU优化的核心技术,专门解决MoE(Mixture of Experts)模型在专家并行推理中的通信瓶颈问题。本文档从MoE架构基础出发,深入分析MC2的设计原理、技术实现和性能优化。 1. MoE架构基础与挑战 1.1 MoE模型基本原理 1.1.1 什么是MoE? **MoE(Mixture of Experts)**是一种神经网络架构,通过将模型参数分散到多个"专家"网络中,根据输入动态选择部分专家进行计算。这种架构在保持高模型容量的同时,降低了计算复杂度。 1.1.2 MoE的数学表达 给定输入 $\mathbf{x} \in \mathbb{R}^{d}$,MoE层的输出可以表示为: $$ \mathbf{y} = \text{MoE}(\mathbf{x}) = \sum_{i=1}^{N} g_i(\mathbf{x}) \cdot E_i(\mathbf{x}) $$其中: $N$ 是专家总数 $E_i(\cdot)$ 是第 $i$ 个专家网络 $g_i(\mathbf{x})$ 是门控网络对专家 $i$ 的权重 1.1.3 稀疏激活机制 为了提高效率,MoE通常采用稀疏激活机制,只选择 Top-K 个专家: $$ \mathbf{y} = \sum_{i \in \text{Top-K}(\mathbf{x})} \frac{g_i(\mathbf{x})}{\sum_{j \in \text{Top-K}(\mathbf{x})} g_j(\mathbf{x})} \cdot E_i(\mathbf{x}) $$详见附录A.1 MoE输出公式推导 其中 $\text{Top-K}(\mathbf{x})$ 表示根据门控权重选择的 Top-K 个专家索引。 ...

September 20, 2025 · 20 min · 4183 words · Me

[VeRL,SGLang] RL训推显存管理优化

SGLang团队的博客:https://hebiao064.github.io/rl-memory-management Overview 上述是简化的在线RL训练流程,隐去了reference和critic model,并且用基础的reward function而非reward model来说明流程。实际上就是policy model存在的training engine和rollout engine上需要进行优化。 从简化的PPO流程开始: 1 2 3 4 5 6 7 8 9 for prompts, pretrain_batch in dataloader: # Stage 1: Rollout generation (inference) batch = actor.generate_sequences(prompts) # Stage 2: Prepare experience batch = reference.compute_log_prob(batch) batch = reward.compute_reward(batch) # Reward function or model batch = compute_advantages(batch, algo_type) # Stage 3: Actor training actor_metrics = actor.update_actor(batch) 每一个iter相当于是actor model进行一次rollout再进行training,而veRL因为rollout和training共部署,所以两边可能不用version的actor model是在相同的GPU组上的,这导致了虽然资源共享但是显存管理会变得更复杂。 显存问题 训练阶段显存 FSDP(fully sharded + full activation checkpointing)下,每个GPU占据显存: 每个GPU的峰值显存:~48GB 推理阶段显存 During inference, the full model is typically loaded (not sharded): ...

September 17, 2025 · 2 min · 404 words · Me