Show HN: Glowstick – type level tensor shapes in stable rust

Hi HN,

In the past few years I've become more interested in machine learning. Since I'm sure the same is true for many here, I wanted to share this project I've been working on: glowstick uses type-directed metaprogramming to keep track of tensor shapes in Rust's type system and determine which operations are permitted or not at compile time.

I find Rust has a lot of strengths when it comes to ML applications, but waiting until runtime to find shape related issues feels a bit strange since normally I don't run the code all that often while developing. Given Rust has fancy types available, I figured I'd try my hand at using them to address this.

I've added integration crates for the two ML frameworks I use most frequently, candle and burn, and included examples of implementing llama 3.2 in each using typed shapes for much of the model internals and inference loop. Mixtures of static and dynamic dimensions should be supported well enough for most applications at this point, though there are of course still improvements to be made.

Any feedback is appreciated!


Comments URL: https://news.ycombinator.com/item?id=44225922

Points: 20

# Comments: 0

https://github.com/nicksenger/glowstick

Creată 1mo | 9 iun. 2025, 18:30:18


Autentifică-te pentru a adăuga comentarii

Alte posturi din acest grup

A Typology of Canadianisms

A Dictionary of Canadianisms on Historical Principles https://dchp.arts.ubc.ca/


Comments URL:

10 iul. 2025, 02:30:08 | Hacker news
Show HN: Petrichor – a free, open-source, offline music player for macOS

I have a large collection of music files gathered over the years, so I was sorely missing a decent offline music player that can serve as a frontend for the collection. I tried several Mac apps ov

10 iul. 2025, 02:30:07 | Hacker news
Show HN: I built a social media app at 11 using AI and a phone

Hi HN, I'm 11 years old and I'm learning to code with the help of AI. I recently created my own social media app inspired by TikTok and short videos. I built it from scratch using my Android phone

10 iul. 2025, 02:30:05 | Hacker news