mojo:The Modular Platform (includes MAX & Mojo)

The Modular Platform (includes MAX & Mojo)

分支14Tags16
文件最后提交记录最后更新时间
[Cursor] Small Rule cleanups - Fixup file patterns that don't match anything - Remove the "No Bazel" rule :) MODULAR_ORIG_COMMIT_REV_ID: 2ed0397d5930088eb4e6ca7327913019ece11eeb 11 个月前
[External] [docs] Fix 404 links in PR template (#85982) [External] [docs] Fix 404 links in PR template ## Linked issue N/A -- trivial. ## Type of change <!-- Check all that apply. --> - [ ] Bug fix (non-breaking change that fixes an issue) - [ ] Performance improvement (includes benchmark results below) - [x] Documentation update - [ ] New feature or public API (requires prior proposal or issue approval) - [x] Refactor / internal cleanup (no user-visible change) - [ ] Build, CI, or tooling change ## Motivation This improves the UX for the Modular community by ensuring the PR template links do not 404 on GitHub. ## What changed Fixed the PR template links to be absolute links. ## Testing Tested links manually. For example (before / after): <img width="577" height="143" alt="Screenshot 2026-05-10 at 8 21 35 PM" src="https://github.com/user-attachments/assets/32c11a80-0e4d-41ba-a141-9f278655869d" /> <img width="1174" height="602" alt="Screenshot 2026-05-10 at 8 22 19 PM" src="https://github.com/user-attachments/assets/af26278e-bc02-43a6-a92e-f0b638929913" /> I left the currently broken links in this PR description as an example to compare to for the reviewers. ## Checklist - [ ] The linked issue above has been reviewed by a maintainer and is agreed-upon, or this is a trivial fix that does not need prior approval - [x] PR is small and focused — I've split larger changes into a sequence of smaller PRs where possible (see [pull request sizes](../mojo/CONTRIBUTING.md#about-pull-request-sizes)) - [x] I ran `./bazelw run format` to format my changes - [ ] I added or updated tests to cover my changes - [ ] If AI tools assisted with this contribution, I have included an `Assisted-by:` trailer in my commit message or this PR description (see [AI Tool Use Policy](../AI_TOOL_POLICY.md)) ORIGINAL_AUTHOR=Piper <piperchester@users.noreply.github.com> ORIGINAL_USER=@piperchester Co-authored-by: Piper <piperchester@users.noreply.github.com> Closes modular/modular#6515 MODULAR_ORIG_COMMIT_REV_ID: 0e5b84200f0118edb6eb81b60d9fb625169f86f6 14 天前
[Release] Pin lockfiles to Mojo 1.0.0b2.dev2026052706, MAX 26.4.0.dev2026052706 10 小时前
[Docs] Add MODULAR_AUTO_CAST_WEIGHTS to environment variables doc Adds a new "Weight loading" section to the environment variables reference page documenting the new `MODULAR_AUTO_CAST_WEIGHTS` variable. The variable controls auto-casting of loaded weights between `float32` and `bfloat16` when the checkpoint and module dtypes don't match. MODULAR_ORIG_COMMIT_REV_ID: 5251ddf483189d068757c307e6c2d0b0bf0df102 10 小时前
[Release] Pin lockfiles to Mojo 1.0.0b2.dev2026052706, MAX 26.4.0.dev2026052706 10 小时前
[Release] Pin lockfiles to Mojo 1.0.0b2.dev2026052706, MAX 26.4.0.dev2026052706 10 小时前
[bazel] Update rules_mojo This required reworking the link hack for future bazel versions MODULAR_ORIG_COMMIT_REV_ID: f177ad9956a8a738f4ecbd59941f82d7bb49f35a 3 个月前
[benchmarks] update setup_gpu_clocks.sh Was missing a few pieces of configuration: power limits and vboost. MODULAR_ORIG_COMMIT_REV_ID: b522e13236d2ca831af93ad1ff4bacba9d1ac9a0 11 天前
[max] Leverages canonical KV cache client We do this so we can pick up changes made my maintainers automatically. MODULAR_ORIG_COMMIT_REV_ID: 22f65e036131c46d7e5c369b3cd8f19a72508351 1 个月前
[Release] Fix tests referencing mojopkg MODULAR_ORIG_COMMIT_REV_ID: 9f2a4ea8823226fdca56b1a034eee053a5210097 7 天前
[bazel] Bump to latest version MODULAR_ORIG_COMMIT_REV_ID: c20d5f9d53d1e4a5ed2ede8946d14e293e5ab2b2 20 天前
[bazel] Make clang-tidy config open source MODULAR_ORIG_COMMIT_REV_ID: 7b7bea7fb0fc1b403f692b4210b3259a1fff230e 4 个月前
[bazel] Make clang-tidy config open source MODULAR_ORIG_COMMIT_REV_ID: 7b7bea7fb0fc1b403f692b4210b3259a1fff230e 4 个月前
[External] [MAX] Add Clip implementation for Flux.1 pipeline This PR adds the CLIP model components needed to support the Flux1 pipeline. It introduces a dedicated CLIP architecture package, a model interface layer to standardize integration, and supporting dtype/norm utilities so the CLIP stack can be wired consistently with the rest of MAX’s modules. This PR is made by splitting Clip implementation from the original modular/modular#5786). - New CLIP architecture with core model implementation, common model wrapper, and configuration objects under `max/python/max/pipelines/architectures/clip/`. - A new shared base model interface (`max/python/max/pipelines/lib/interfaces/max_model.py`) to align intialization and execution methods of models. - Dtype extension helpers (`max/python/max/dtype/dtype_extension.py`) and exports to support new model components. - Module V3 LayerNorm implementation and registry updates to enable CLIP’s normalization requirements. This model implementation does NOT serve as a standalone executable model. It is expected to be executed within the Flux1 pipeline. (Will update the related PR link later) MODULAR_ORIG_COMMIT_REV_ID: 5848cc5c9bc10d5504de40c26d2e454f306c164b 3 个月前
[lint] Delete markdownlint We are using `rumdl` now! MODULAR_ORIG_COMMIT_REV_ID: 4631183927eb60270d89de55df8a6a85af720de9 1 个月前
[CI] Add shellcheckrc config file to OSS setup This wasn't using the same config internally so there was a desync. MODULAR_ORIG_COMMIT_REV_ID: 134e98abd22e95180e46699c83af2bf4653e293d 5 个月前
[MAX] Move PatchMergerMLP into vision Transformer and unify weight adapters Refactors the KimiK2_5 vision pipeline so that PatchMergerMLP is a mandatory sub-module of the vision Transformer rather than a separate multimodal_projector on the top-level KimiK2_5 module. Consolidates the vision tower and projector weight mappings into a single KIMIK2_5_VISION_MAPPING dict and adds support for both checkpoint naming conventions (mm_projector.proj.{0,2} and multi_modal_projector.linear_{1,2}). Transformer uses self.patch_embed, self.encoder, and self.patch_merger as registered sublayers for weight loading; *_shards are runtime lists only and are not part of the module tree. The integration test now uses these weight names (patch_embed.*, encoder.*, patch_merger.*) directly. Remove the unused values from VisionConfig. MODULAR_ORIG_COMMIT_REV_ID: 4dcde3a2e4014c2c7a6f06bc7d0b5be32fdb9f77 2 个月前
[Docs] Fix typos in CONTRIBUTING.md and broken links in AI_TOOL_POLICY.md - Fix three pronoun typos in CONTRIBUTING.md ("our" → "your", "you're" → "your") - Fix missing preposition in CONTRIBUTING.md ("due any" → "due to any") - Fix two broken self-reference links in AI_TOOL_POLICY.md that still point to the old `oss/modular/` path after Copybara sync to the public repo root ## Testing Verified links resolve correctly on GitHub. Text-only changes, no code impact. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> MODULAR_ORIG_COMMIT_REV_ID: 426061b40eb53512880ea602ac6b59148a4d3596 1 个月前
[Kernels] kbench: preload libubsan via ctypes for shared-lib mode under UBSan kbench's \`libKGENCompilerRTShared.so\` (transitively dlopen'd via the user .so it builds) leaves \`__ubsan_handle_*_abort\` references unresolved (\`-Wl,-z,undefs\`). When loaded into a non-instrumented Python interpreter, those symbols can't resolve and dlopen fails. Fix at the loader site: ship libubsan as a runfile of the kbench \`modular_py_binary\` (under \`--config=ubsan\` only), set \`KBENCH_LIBUBSAN_PATH\` so the runtime knows where to find it, and \`ctypes.CDLL(libubsan_path, mode=RTLD_GLOBAL)\` once before opening any user .so. Subsequent dlopens then resolve the handlers against the now-loaded libubsan. Drop the \`target_compatible_with\`-based UBSan workaround on the kbench target — shared-lib mode now works end to end under UBSan. Drop the subprocess fallback added previously: it was a workaround for the broken shared-lib mode and is no longer needed. Add \`test_shared_lib_dlopen_resolves_sanitizer_runtime\` as a regression test that ctypes-loads a Mojo .so directly to guard the loader-side preload wiring. MODULAR_ORIG_COMMIT_REV_ID: 81a0d411a62a2e22de359fdef6e187d1cb477765 25 天前
[Kernels][NFC] Organize GPU benchmarks into subdirectories matching src/ structure Move GPU benchmark files from a flat directory into subdirectories that mirror the max/kernels/src/ structure. Generic GPU micro-benchmarks (elementwise, reduce, stencil, vec_add, launch, memcpy, pdl_copy) remain at the gpu/ top level. MODULAR_ORIG_COMMIT_REV_ID: c7156189df81f237f29e2ff215d54d3e4974f6bd 1 个月前
[Pipelines] Compile multi-model pipelines' models in parallel I observe that pipelines with multiple models (currently mostly vision models) spend a lot of their compilation time pinned to a single core. This is not an efficient use of time. We have two pieces of work, so at least have each one pinned to one core. This slows down each compile from about 70 seconds to 90 seconds, but because those 90 seconds are overlapped, this still saves about 50 seconds overall. MODULAR_ORIG_COMMIT_REV_ID: 9b7b1e12e297132f15c560e9510af673b322f18c 1 年前
[docs][lint] Upgrade rumdl version to 1.95 w/ necessary format fixes Summary of rule changes from the previous version (or see the [full changelog](https://github.com/rvben/rumdl/blob/main/CHANGELOG.md)): **MD013 (Line Length) Fixes**: v0.1.85: Fixed the core bug driving this upgrade: tables nested inside list items were reclassified as prose content and reflowed, producing false positives at the list-item start line. v0.1.85: Added a stricter GFM table evidence requirement before classifying a list-item continuation line as a table row (prevents false table matches on lines with literal |). v0.1.81: Stop warning on under-limit list items in normalize mode. v0.1.88: Preserve wildcard asterisks during reflow. v0.1.87: Keep closing quote with parenthetical splits; treat parentheticals as semantic units in semantic-line-breaks mode. v0.1.68: Fix line-length boundary check when indentation is stripped; preserve indentation of list continuation lines after nested lists; recognize "St." as an abbreviation. v0.1.85: New heading-line-length, code-block-line-length, and stern config options. **MD060 (Table Alignment) Fixes**: v0.1.92: Accept single-space empty cells in compact style. v0.1.85: Add aligned-delimiter option for markdownlint parity. v0.1.20: Fix idempotency bug where ATX headings with pipes were misidentified as table rows. **New rules**: Version | Rule | Description -- | -- | -- v0.1.67 | MD077 | Over-indented tight continuation lines v0.1.75 | MD075 | Orphaned table rows / headerless pipe content v0.1.29 | MD077 | List continuation indent v0.1.22 | MD075 | List item spacing consistency v0.1.94 | MD080 | Heading anchor collision v0.1.93 | MD078/079 | Quarto chunk labels MODULAR_ORIG_COMMIT_REV_ID: 1a86185ce891d7019fc158a1c019d8f5d559a58c 6 天前
[Pipelines] Compile multi-model pipelines' models in parallel I observe that pipelines with multiple models (currently mostly vision models) spend a lot of their compilation time pinned to a single core. This is not an efficient use of time. We have two pieces of work, so at least have each one pinned to one core. This slows down each compile from about 70 seconds to 90 seconds, but because those 90 seconds are overlapped, this still saves about 50 seconds overall. MODULAR_ORIG_COMMIT_REV_ID: 9b7b1e12e297132f15c560e9510af673b322f18c 1 年前
[bazel] Remove JS dependencies MODULAR_ORIG_COMMIT_REV_ID: 682da6ab9c794f36ce464d0934ab995ebf2682c3 1 个月前
[CI] Update smoke test runner configuration MODULAR_ORIG_COMMIT_REV_ID: fd4941c23780f9577a1f6a6113b34c4280b038af 12 天前
[bazel] Move REPO.bazel This was accidentally put in the wrong place MODULAR_ORIG_COMMIT_REV_ID: 3c713c66744e555a322e240650ff3113262df685 3 个月前
[bazel] Fix shasum command for Linux in bazelw Use sha256sum on Linux and shasum on macOS, since shasum is not available by default on some Linux systems (Arch, Fedora). MODULAR_ORIG_COMMIT_REV_ID: 656e03415b37ca04e35d5c6ee2b712691d1b8ccc 21 天前
[docs] Remove folder field Must instead be defined in the admin console. MODULAR_ORIG_COMMIT_REV_ID: 52bbabc0687ca1dc3075fd35bc53f2a30b1bc61f 2 个月前
[MAX] Add ty extension to documentation (#87172) MODULAR_ORIG_COMMIT_REV_ID: d32ecaaa6f37ed3285bbb76e90069e0e6d074384 10 小时前

[关于 Modular] | [MAX 文档] | [Mojo 文档] | [贡献指南]


🤝 加入我们的 月度社区会议

Modular 平台

面向 AI 开发与部署的统一平台,包含 MAX🧑‍🚀 和 Mojo🔥。

Modular 平台是一套开放且完全集成的 AI 库与工具套件,可加速模型服务并扩展生成式 AI 部署。它抽象了硬件复杂性,让您无需修改任何代码,就能以业界领先的 GPU 和 CPU 性能运行最受欢迎的开源模型。

快速开始

您无需克隆此仓库。

您可以使用 pipconda 等包管理器(如 uvpixi)安装 Modular,然后使用您选择的模型启动兼容 OpenAI 的端点。

要开始使用 Modular 平台并通过 MAX 框架部署模型,请参阅 快速入门指南

Note

** nightly 版本与稳定版本** 如果您克隆了仓库并希望使用稳定版本,请运行 git checkout max/vX.X 以匹配相应版本。

main 分支跟踪 nightly 构建版本。

更多信息,请参阅 分支说明

模型端点启动并运行后,您可以使用 我们兼容 OpenAI 的 REST API 开始发送模型推理请求。

在我们的 模型库 中探索所有可通过 Modular 部署的模型。

部署容器

MAX 容器是我们兼容 Kubernetes 的 Docker 容器,便于部署,它使用 MAX 框架内置的推理服务器。我们为 NVIDIA 和 AMD GPU 环境提供了单独的容器,以及一个适用于两者的统一容器。

例如,您可以使用以下命令为 NVIDIA GPU 启动容器:

docker run --gpus=1 \
    -v ~/.cache/huggingface:/root/.cache/huggingface \
    -p 8000:8000 \
    modular/max-nvidia-full:latest \
    --model google/gemma-3-27b-it

如需了解更多信息,请参阅我们的 MAX 容器文档Modular Docker Hub 仓库

开始使用 Mojo

开始使用 Mojo 无需克隆此仓库。

要安装 Mojo 并开始学习这门语言,请参阅 Mojo 快速入门Mojo 网站 还提供了全面的语言指南,包括教程、语言参考和 API 参考。

关于本仓库

我们正不断将 Modular Platform 的更多部分开源,您可以在此仓库中找到所有相关内容。截至 2025 年 5 月,本仓库包含超过 450,000 行代码,来自 6000 多位贡献者,为开发人员提供了生产级别的参考实现和工具,以便通过新算法、操作和硬件目标扩展 Modular Platform。

它很可能是全球最大的开源 CPU 和 GPU 内核仓库

主要内容包括:

分支

  • main 分支与 nightly 构建保持同步,可能存在新 bug。此分支用于 贡献

  • MAX 发布分支命名为 max/vX.X

  • Mojo 发布分支命名为 mojo/vX.X.X(Mojo 采用 PEP 440 版本方案)。

  • 对于 MAX 26.3 / Mojo 1.0.0b1 之前的稳定版本,MAX/Mojo 合并发布分支命名为 modular/vX.X

贡献

我们接受对 Mojo 标准库MAX AI 内核MAX 模型架构、代码示例、Mojo 文档等方面的贡献。

首先,请阅读 贡献指南,然后参考以下关于如何在仓库中进行开发的文档:

  • /max/docs:供在 MAX 框架代码库中工作的开发人员使用的文档。
  • /mojo/stdlib/docs:供在 Mojo 标准库中工作的开发人员使用的文档。

我们也欢迎您提交错误报告。如果您遇到 bug,请在此提交 issue

新闻与公告

[2026/3] Modular Platform 26.2 带来了最先进的图像生成技术,在 FLUX.2 模型上实现了超过 4 倍的速度提升,扩展了对 NVIDIA B300、Jetson Thor、DGX Spark 以及 AMD RDNA 消费级 GPU 的硬件支持,并且 Mojo 语言进行了升级,借助 AI 编码助手,编写 GPU 内核变得更加轻松。

[2026/2] 我们宣布 BentoML 正式加入 Modular。我们致力于开源建设,并将通过 Bento 自身的开源项目 扩展对开源 AI 的支持。阅读 2026 年 2 月的 AMA 问答,了解更多关于我们计划的信息。

[2026/1] Modular Platform 26.1 标志着 MAX Python API 正式脱离实验阶段,它具备类 PyTorch 的即时执行模式以及面向生产环境的 model.compile() 功能,同时稳定了 MAX LLM Book,并扩展了对 Apple 硅基 GPU 的支持。Mojo 新增了编译时反射、线性类型、类型化错误以及改进的错误消息,朝着 1.0 版本稳步迈进。

[2025/12] Mojo 1.0 路线图 正式公布,计划于 2026 年上半年发布,并包含了大量关于预期功能的详细信息。

[2025/12] 我们举办了 MAX 框架深度解析Meetup,重新介绍了 MAX 框架,并向社区展示了即将到来的变化。

[2025/11] Modular Platform 25.7 提供了完全开放的 MAX Python API,扩展了对 NVIDIA Grace 超级芯片的硬件支持,改善了 Mojo GPU 编程体验,以及更多其他功能。

[2025/11] 我们在 PyTorch 2025 + LLVM 开发者大会 上与社区会面,征集社区关于 Modular 平台如何减少碎片化并提供统一 AI 堆栈的意见和建议。

[2025/09] Modular 完成 2.5 亿美元融资,用于扩展 AI 的统一计算层。至此,Modular 的总融资额达到 3.8 亿美元,估值达 16 亿美元。

[2025/09] Modular Platform 25.6 提供了从笔记本电脑到数据中心 GPU 的统一计算层,在 NVIDIA Blackwell (B200) 和 AMD MI355X 上实现了行业领先的吞吐量。

[2025/08] Modular Platform 25.5 通过与 SF Compute 的合作引入了大规模批处理推理,并开源发布了 MAX Graph API 等更多功能。

[2025/08] 我们在 洛斯阿尔托斯Meetup 上进行了演讲,内容包括 Chris Lattner 关于 AI 计算民主化的探讨以及 Inworld AI 关于生产环境语音 AI 的分享。

[2025/06] 宣布与 AMD 达成合作——Modular Platform 现已在 AMD 的 MI300 和 MI325 GPU 产品组合中全面可用。

[2025/06] Modular 黑客周末活动 汇聚了众多开发者,共同使用 Mojo 和 MAX 构建自定义内核、模型架构以及 PyTorch 自定义算子。

[2025/05] 超过 100 名工程师齐聚 AGI House,参加我们首届 GPU 内核黑客松活动,其中包括 Modular 和 Anthropic 工程师的精彩演讲。


社区与活动

我们定期在全球范围内举办线上线下聚会。在这些聚会中,我们会分享Modular团队的最新动态,展示社区贡献,邀请嘉宾分享专业知识,并解答社区问题。

加入我们!

渠道 链接
💬 Discord discord.gg/modular
💬 论坛 forum.modular.com
📅 聚会小组 meetup.com/modular-meetup-group
🎥 社区会议 即将举行的社区会议

即将举行的活动将在我们的Meetup页面Discord上发布。社区会议记录将发布在我们的YouTube频道。

联系我们

如果您想与团队和其他社区成员交流,请发送消息至我们的Discord频道论坛版块

许可协议

本仓库及其贡献基于Apache License v2.0(含LLVM例外条款)授权(详见LLVM 许可协议)。Modular、MAX和Mojo的使用及分发受Modular社区许可协议约束。

第三方许可协议

您需自行负责检查和验证所下载的相关软件及库(如Huggingface)的第三方许可协议。

感谢贡献者