一名开发者在Hacker News上发布了一项演示项目,展示如何利用关系型数据库语言从约25行SQL代码中自动推导出FlashAttention内核 1。这一成果依赖于三个正处于开发阶段的SQL扩展库:xarray-sql、ddx以及einfold 1。其中,xarray-sql旨在云环境中以表格形式高效表示PB级数组数据集,ddx为标准SQL添加了类似JAX风格的自动微分功能,而einfold则提供了一个用于在纯SQL中进行快速张量收缩的模块化查询规划器 1。
该项目作者提出了一种理论主张,认为既然“Bitter Lesson”(苦涩教训)是机器学习的核心教条,那么为何不尝试用关系代数对其进行形式化 1。作者强调,将张量程序的逻辑层与物理层分离能够带来更高的正确性和可扩展性 1。此外,该项目还邀请了感兴趣的用户加入其Discord社区,网址为https://xql.systems 1。
A developer showcased a demonstration project on Hacker News that automatically derives the FlashAttention kernel using approximately 25 lines of SQL 1. This approach relies on three under-development SQL extension libraries: xarray-sql, ddx, and einfold 1. The project aims to offer a new perspective on accelerator programming by leveraging the relational model 1.
The core components serve distinct technical functions within this framework. xarray-sql is designed for the efficient representation of petabyte-scale array datasets as tables in the cloud 1. To enable differentiability, ddx adds JAX-style automatic differentiation capabilities to standard SQL 1. Meanwhile, einfold acts as a modular query planner facilitating fast tensor contractions within vanilla SQL environments 1.
The author posits that separating the logical layer from the physical layer in tensor programs can enhance both correctness and scalability 1. Challenging current machine learning paradigms, the post asks why relational algebra is not used to formalize concepts if the Bitter Lesson remains the central dogma 1. Interested parties are invited to join the associated Discord community at https://xql.systems 1.
评论
还没有评论,欢迎留下第一条。