MiniTensor: 一个轻量且高性能的张量操作库
MiniTensor: A Lightweight, High-Performance Tensor Operations Library
AI总结:
MiniTensor是一个轻量且高性能的张量操作库,结合Python API和Rust引擎,提供高效的张量运算和微分功能,包大小远小于主流框架。
摘要:
我们介绍了MiniTensor,一个开源的张量操作库,专注于极简主义、正确性和性能。MiniTensor暴露了一个熟悉的PyTorch-like Python API,同时在Rust引擎中执行关键性能代码。核心支持密集的n维张量、广播、缩减、矩阵乘法、反向模式自动微分、一组紧凑的神经网络层和标准优化器。在本文中,我们描述了MiniTensor架构的设计,包括其高效的内存管理、动态计算图用于梯度以及通过PyO3与Python的集成。我们还比较了安装足迹与PyTorch和TensorFlow,以证明MiniTensor仅达到几个兆字节的包大小,比主流框架小几个数量级,同时保留了进行CPU上的研究和开发所需的基本要素。该仓库可在https://github.com/neuralsorcerer/minitensor找到。
英文摘要:
We present MiniTensor, an open source tensor operations library that focuses on minimalism, correctness, and performance. MiniTensor exposes a familiar PyTorch-like Python API while it executes performance critical code in a Rust engine. The core supports dense $n$ dimensional tensors, broadcasting, reductions, matrix multiplication, reverse mode automatic differentiation, a compact set of neural network layers, and standard optimizers. In this paper, we describe the design of MiniTensor's architecture, including its efficient memory management, dynamic computation graph for gradients, and integration with Python via PyO3. We also compare the install footprint with PyTorch and TensorFlow to demonstrate that MiniTensor achieves a package size of only a few megabytes, several orders of magnitude smaller than mainstream frameworks, while preserving the essentials needed for research and development on CPUs. The repository can be found at https://github.com/neuralsorcerer/minitensor
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。