從 Node.js/Python 到 PTX:首個由 AI 生成的深度學習框架
一項名為 VibeTensor 的研究專案展示了首個完全由 AI 生成的深度學習框架,其涵蓋從 Node.js/Python 綁定到 PTX 組譯的整個流程,證明了 AI 在建構複雜軟體堆疊方面的能力。
Navigation Menu
Search code, repositories, users, issues, pull requests...
Provide feedback
We read every piece of feedback, and take your input very seriously.
Saved searches
Use saved searches to filter your results more quickly
To see all available qualifiers, see our documentation.
The first fully AI generated DL framework
License
Uh oh!
There was an error while loading. Please reload this page.
NVlabs/vibetensor
Folders and files
Latest commit
History
Repository files navigation
VibeTensor
From Node.js/Python to PTX assembly: a research deep-learning runtime fully generated by AI agents.
Warning
Everything in this repo is generated by AI Agent without human editing. Don't use this project for production purpose.
VibeTensor is a PyTorch-inspired eager runtime with a fresh C++20 core (CPU + CUDA), a torch-style Python overlay, and an experimental Node.js / TypeScript API.
Unlike “thin wrappers”, VibeTensor implements its own tensors/storage, dispatcher, autograd engine, CUDA runtime + caching allocator, and plugin ABI.
Scale (at time of writing): ~218 C++/CUDA source files (~60k non-blank lines) plus ~50k non-blank lines of tests (C++ + Python + JS).
Why this repository exists
VibeTensor started as a system-software experiment: can AI agents generate a coherent deep learning stack spanning Python/JS bindings → a C++ runtime → CUDA allocator/streams → GPU kernels?
The project uses a “least intervention” methodology: high-level architectural prompts, with success measured by whether the system builds, passes tests, and produces correct results.
Performance caveat (“Frankenstein Effect”)
VibeTensor is designed correctness-first and is not performance-competitive with PyTorch today. One failure mode we observed is that components can be individually robust but become globally suboptimal when composed (e.g., global serialization in the hot path).
Treat VibeTensor as a research prototype.
Architecture (macro view)

At a high level:
Module Architecture Diagrams
For more detailed architecture of individual modules, see the diagrams in docs/images/:
Project status
VibeTensor is an active research project; APIs and behavior may change without notice.
Current code covers:
Platforms & requirements
Install & build
Editable dev install (recommended)
From the repository root:
This drives CMake via scikit-build-core (build dir: build-py/), building:
Defaults are configured in pyproject.toml; override via -Ccmake.define.* (for example, -Ccmake.define.VBT_BUILD_NODE=OFF).
If CMake can't find node_api.h, set NODE_INCLUDE_DIR=/path/to/include/node (or pass -Ccmake.define.NODEJS_INCLUDE_DIR=...).
Manual CMake build
Wheels (Release)
Quickstart
Python: torch-style overlay
The main user-facing API is vibetensor.torch, a lightweight torch-like overlay built on top of the C++ core.
CUDA helpers (streams, events, memory stats) live under vibetensor.torch.cuda:
For lower-level access (bindings/tests), import the native extension directly:
Node.js / TypeScript (experimental)
The Node addon and JS/TS overlay live under js/vibetensor/.
After an editable install has produced js/vibetensor/vbt_napi.node, you can run the JS tests locally:
A minimal usage example (from js/vibetensor after npm run build):
The JS overlay is fully async: heavy work (CUDA ops, H2D/D2H copies, waits) is scheduled via napi_async_work and does not block the Node event loop.
Note: JS Tensor objects are currently CPU-only; CUDA is exposed via cuda.* (streams/events), explicit h2d/d2h, and DLPack import/export.
Dynamic operators, plugins, and Triton
VibeTensor exposes several extension points:
Simple Python override:
Loading a C/CUDA plugin:
Testing
After an editable install, typical test commands are:
Note: Python tests require numpy; some tests also require torch and/or triton and will skip if unavailable.
C++ tests (CTest)
Python tests (pytest)
Node / JS overlay tests
The Node step is treated as best-effort in CI: when js/vibetensor/vbt_napi.node is missing, JS tests are skipped with a success status.
API parity gate
Repository layout
Credit
License
VibeTensor is licensed under the Apache License, Version 2.0. See pyproject.toml and the repository's license files for details. Vendored third-party code remains under its original licenses.
About
The first fully AI generated DL framework
Topics
Resources
License
Contributing
Uh oh!
There was an error while loading. Please reload this page.
Stars
Watchers
Forks
Releases
Packages
0
Languages
Footer
Footer navigation
相關文章