# Pietro Max Marsella

Math & CS @ Stanford  
Flappy Airplanes  
Stanford, California, United States

## At Cognition

- Role: Former Member of Technical Staff (Engineering)
- Joined: Jun 2025
- How they joined: Directly
- Before Cognition: ML Compiler Researcher, Stanford University Department of Computer Science
- Now: Flappy Airplanes (https://www.linkedin.com/in/pietro-max-marsella)
- Overlapped before Cognition with other Cognition people at: Stanford University (https://www.autumn.ai/resources/cognition/worked-together)

## Identity
- LinkedIn: https://www.linkedin.com/in/pietro-max-marsella
- X: @pmmarsella
- GitHub: https://github.com/Marsella8
- Website: https://www.marsella.io/

## Notes
- Pietro Marsella is a co-author of the Kevin-32B blog post, listed with an asterisk indicating equal contribution. (https://cognition.com/blog/kevin-32b)
- Pietro Marsella is affiliated with Stanford University and Cognition AI. (https://cognition.com/blog/kevin-32b)
- Pietro Marsella co-authored work on Kevin-32B, a model trained with multi-turn reinforcement learning for writing CUDA kernels. (https://cognition.com/blog/kevin-32b)
- Pietro Marsella's co-authors on the Kevin-32B work are Carlo Baronio, Ben Pan, and Silas Alberti. (https://cognition.com/blog/kevin-32b)
- Pietro Marsella co-authored the Kevin-32B model, which achieves 65% average correctness across the dataset and solves 89% of it. (https://cognition.com/blog/kevin-32b)
- Pietro Marsella worked on kevin-32b, a model trained with multi-turn reinforcement learning to write fast CUDA kernels, with a blog post on cognition.ai and a paper on arXiv. (https://www.marsella.io/projects)
- Pietro Marsella worked on swe-grep, a model trained with reinforcement learning to do fast (sub 5s) codebase-wide agentic context retrieval, with a blog post on cognition.ai and a Hacker News link. (https://www.marsella.io/projects)
- Pietro Marsella has a project called "kevin-32b" described as "model go brrr". (https://www.marsella.io/)
- Pietro Marsella has a project called "swe-grep" described as "agentic codebase search". (https://www.marsella.io/)
- Pietro Marsella previously worked at Cognition on reinforcement learning for coding models. (https://www.marsella.io/about)
- Marsella8 has a public fork of flexflow/flexflow-train named FlexFlow, described as 'FlexFlow Serve: Low-Latency, High-Performance LLM Serving', written in C++ under Apache License 2.0, last updated on 2026-03-03. (https://github.com/Marsella8?tab=repositories)
- Pietro Marsella co-authored work using KernelBench, a dataset of 250 PyTorch-based classic deep learning tasks. (https://cognition.com/blog/kevin-32b)
- Pietro Marsella gave an excellent performance in the individual competition of the provincial stage of the Olimpiadi di Matematica, representing the province of Milan. (https://www.sempionenews.it/territorio/palazzo-leone-da-perego-premiati-gli-studenti-meritevoli-ai-campionati-legnanesi-di-giochi-matematici/)
- Pietro Marsella, together with Sofia Oliverio, Alberto Randazzo (class 5AS) and Omar Reghiouia (class 5IS), won the title of Italian Champions 2023 in the team competition of the Triennio category at the Campionati Studenteschi di Giochi Logici. (https://www.sempionenews.it/territorio/bianca-fiorella-e-pietro-per-sempre-con-lassegnazione-di-borse-di-studio-ai-liceali-meritevoli/)
- Pietro Marsella created the software that runs D-Orbit's life support system device, which purifies air and monitors air quality data. (https://www.sempionenews.it/territorio/pietro-marsella-dal-galilei-di-legnano-alla-simulazione-su-marte/)
- Pietro Marsella plans to return to D-Orbit at the end of school to work on new projects. (https://www.sempionenews.it/territorio/pietro-marsella-dal-galilei-di-legnano-alla-simulazione-su-marte/)
- Pietro Marsella's work was connected to D-Orbit, the Fino Mornasco company founded in 2011 and a world leader in space logistics, which tested a life support system for the SMOPS mission at the Mars Desert Research Station in Utah. (https://www.sempionenews.it/territorio/pietro-marsella-dal-galilei-di-legnano-alla-simulazione-su-marte/)
- Pietro Marsella did a summer internship at D-Orbit, a space logistics company based in Fino Mornasco. (https://www.legnanonews.com/aree-geografiche/legnano/2022/04/20/un-po-di-legnano-potrebbe-andare-su-marte-grazie-a-pietro-marsella-studente-del-galilei/1023633/)
- In January 2022, ing. Cazzaniga, Pietro Marsella's mentor at D-Orbit, told him his Life Support System worked perfectly and had been chosen as the device to test in the SMOPs mission. (https://www.legnanonews.com/aree-geografiche/legnano/2022/04/20/un-po-di-legnano-potrebbe-andare-su-marte-grazie-a-pietro-marsella-studente-del-galilei/1023633/)
- During his exchange abroad in the first semester of the year, Pietro Marsella stayed in contact with D-Orbit and continued contributing to the project. (https://www.sempionenews.it/territorio/pietro-marsella-dal-galilei-di-legnano-alla-simulazione-su-marte/)
- Pietro Marsella did a stage at D-Orbit during the previous summer that was supposed to last 2 weeks but ended up lasting the entire summer. (https://www.sempionenews.it/territorio/pietro-marsella-dal-galilei-di-legnano-alla-simulazione-su-marte/)
- Public headline says "Math & CS @ Stanford". (https://www.linkedin.com/in/pietro-max-marsella)
- Pietro Marsella is doing ML compiler research at FlexFlow. (https://www.marsella.io/about)
- Pietro Marsella previously worked at D-Orbit on software for satellites' optical payloads. (https://www.marsella.io/about)
- Marsella8 has a public GitHub repository named FlexFlow, forked from flexflow/flexflow-train, described as 'FlexFlow Serve: Low-Latency, High-Performance LLM Serving' and written in C++. (https://github.com/Marsella8)
- Sophomore at Stanford studying Math and CS, with active research in machine learning compilers and domain specific languages; this comes from the profile summary and preserves the person's own positioning. (https://www.linkedin.com/in/pietro-max-marsella)
- Pietro Marsella posted that to express full training runs in a single kernel, they had to build general control-flow primitives. (https://x.com/pmmarsella/status/2112994752660652113)
- Pietro Marsella stated that their framework lets them efficiently run weirder, more dynamic, fine-grained workloads than any other framework, and that they can run DOOM. (https://x.com/pmmarsella/status/2112994752660652113)
- Pietro Marsella invited people to join them if they want to build the future of GPU systems. (https://x.com/pmmarsella/status/2112994752660652113)
- Kushal Thaman credited Pietro Marsella as the incredibly kind and smart kernel wizard from Dairago. (https://x.com/pmmarsella/status/2112994752660652113)
- Joonhyuk Lee referred to Pietro Marsella as pietro max (thinking) marsella. (https://x.com/pmmarsella/status/2112994752660652113)
- Ellen Xu replied to Pietro Marsella's thread with a smiley. (https://x.com/pmmarsella/status/2112994752660652113)
- Pietro Marsella wrote a post titled 'gpus' asking how long a GPU is worth running for (wip). (https://www.marsella.io/post-its)
- Marsella8 owns a public repository named merlo written in C, last updated on 2026-03-20. (https://github.com/Marsella8?tab=repositories)
- The latest commit to merlo was authored by Marsella8 about 8 months ago on Mar 20, 2026. (https://github.com/Marsella8/merlo)
- Marsella8 owns a public repository named taso-sparse written in Common Lisp, last updated on 2026-03-17. (https://github.com/Marsella8?tab=repositories)
- Pietro Marsella wrote a post titled 'birds' listing Italian bird names: merlo, civetta, passero, gru, quaglia, gazza, rondine, airone, picchio, colomba. (https://www.marsella.io/post-its)
- Pietro Marsella wrote a post titled 'gold' noting that all the gold ever mined fits into a cube with side length 22m (73ft) and that gold mines increase the global reserve by 2 to 3% each year. (https://www.marsella.io/post-its)
- Marsella8 owns a public repository named libellula written in Python under the MIT License, last updated on 2026-02-15. (https://github.com/Marsella8?tab=repositories)
- Marsella8 owns a public repository named spization written in Python under an 'Other' license, last updated on 2026-02-15. (https://github.com/Marsella8?tab=repositories)
- The spization repository's latest commit by Marsella8 was titled 'final cmt' on 2026-02-15. (https://github.com/Marsella8/spization)
- Pietro Marsella wrote a post titled 'quines' stating 'I like quines!' and listing 8½, Compilers (with dangerous consequences!), and RepRap. (https://www.marsella.io/post-its)
- Pietro Marsella wrote that quines are inherently unstable since every change of features in the object must be corresponded by a change in how it's computed, and should be approached as a fixed point problem. (https://www.marsella.io/post-its)
- Marsella8 owns a public repository named Marsella8.github.io written in HTML, last updated on 2026-01-19. (https://github.com/Marsella8?tab=repositories)
- Marsella8 owns a public repository named sat written in Haskell, last updated on 2026-01-18. (https://github.com/Marsella8?tab=repositories)
- Pietro Marsella wrote a note titled "A History of Western Philosophy" described as a "Highly opinionated tour of 2500 years of philosophy". (https://www.marsella.io/)
- Pietro Marsella built merlo, which performs inference on SmolLM2-135M on 2 Raspberry Pi Zero W to hit 3 tokens/s. (https://www.marsella.io/projects)
- Pietro Marsella wrote a post titled 'moon-bird-plane' referencing Tigros' Parking Lot. (https://www.marsella.io/post-its)
- Marsella8 owns a public repository named lazier-matmul written in Python, last updated on 2025-12-11. (https://github.com/Marsella8?tab=repositories)
- Pietro Marsella wrote a post titled 'shared-substructure' about exploiting common substructure to reduce representation size, citing E-Graphs (my beloved), Binary Decision Diagrams, and Neural Networks and all other compressors. (https://www.marsella.io/post-its)
- The Marsella8/civetta repository has 10 commits, with the latest commit titled "updates" on 2025-11-21. (https://github.com/Marsella8/civetta)
- Marsella8 owns a public repository named civetta written in Rust, last updated on 2025-11-20. (https://github.com/Marsella8?tab=repositories)
- Marsella8 owns a public repository named passero written in Rust, last updated on 2025-11-20. (https://github.com/Marsella8?tab=repositories)
- Pietro Marsella wrote a post titled 'civetta' about things he learned while writing civetta. (https://www.marsella.io/post-its)
- Pietro Marsella authored the open-source repository civetta at https://github.com/Marsella8/civetta. (https://www.marsella.io/post-its, https://github.com/Marsella8/civetta)
- Pietro Marsella wrote that models are a composition of differential operators, so when building an autograd engine you only have to write the explicit backward for a small set of 'axiomatic' operators. (https://www.marsella.io/post-its)
- Pietro Marsella wrote that the computation graph represents (almost) everything, including input tensors and the loss. (https://www.marsella.io/post-its)
- Pietro Marsella wrote that all ops that do memory wrangling during the backward pass are just redirections on the gradients. (https://www.marsella.io/post-its)
- Pietro Marsella wrote that very few 'axiomatic' ops are needed, and even matmul is not a fundamental op. (https://www.marsella.io/post-its)
- Pietro Marsella wrote that one thing the computation graph cannot capture properly is pipelining. (https://www.marsella.io/post-its)
- Pietro Marsella wrote that a lot of parallelism is just defining a dimension across which you slice the tensor. (https://www.marsella.io/post-its)
- Pietro Marsella wrote that ReLU is the simplest nonlinear since in backprop it is literally just a 0-1 filter. (https://www.marsella.io/post-its)
- Pietro Marsella wrote that normal softmax is too numerically unstable even for toy models, so things interacting with softmax need to be phrased using log probs. (https://www.marsella.io/post-its)
- Pietro Marsella wrote that scalars are just 0 dim tensors, with indexing done with an empty slice. (https://www.marsella.io/post-its)
- Pietro Marsella wrote that an easy way to store activations for the backward pass is to write the backward function as a nested function of the forward function and capture the computed value via the closure. (https://www.marsella.io/post-its)
- Pietro Marsella wrote that there are two interfaces: non-parametric functions and parametric functions (modules). (https://www.marsella.io/post-its)
- Marsella8 owns a public repository named lazy-matmuls written in Python, last updated on 2025-11-15. (https://github.com/Marsella8?tab=repositories)
- Pietro Marsella wrote a post titled 'decomposition' about decomposing complex high dimensional objects into a reduction of simpler, one-dimensional objects, citing Taylor Expansion, DFT (and friends), and SVD. (https://www.marsella.io/post-its)
- The first commit to Marsella8/civetta, titled "first cmt", was made on 2025-10-28. (https://github.com/Marsella8/civetta)
- Marsella8 owns a public repository named gg-bench written in Python, last updated on 2025-10-03. (https://github.com/Marsella8?tab=repositories)
- Pietro Marsella wrote a post titled 'bete' about two opposing tendencies with respect to raw materials, including EROI and the bet that tendency #2 can outpace #1. (https://www.marsella.io/post-its)
- Pietro Marsella wrote a note titled "Material World" described as "sand, salt, iron, copper, oil, lithium". (https://www.marsella.io/)
- Pietro Marsella wrote a post titled "Canonical Forms (very work in progress)" with the description "Semantic equivalence is a tricky one!". (https://www.marsella.io/)
- Pietro Marsella wrote a post titled "Lazy Matrices (work in progress)" with the description "Semantically equivalent, runtime inequivalent". (https://www.marsella.io/)
- The spization repository includes a Nix flake added on 2025-03-31. (https://github.com/Marsella8/spization)
- Pietro Marsella wrote a note titled "A Brief History of Intelligence" described as "Existing -> Steering -> Reinforcing -> Simulating -> Mentalizing -> Speaking". (https://www.marsella.io/)
- Marsella8 has a public fork of lockshaw/proj named proj written in Python, last updated on 2025-01-24. (https://github.com/Marsella8?tab=repositories)
- Pietro Marsella built civetta, which implements everything needed for supervised training (autograd, dataloaders, optimizers, …). (https://www.marsella.io/projects)
- Pietro Marsella built passero, which implements an env template and various classical RL algorithms. (https://www.marsella.io/projects)
- Pietro Marsella wrote a note titled "Gödel Escher Bach" described as "An eternal golden braid". (https://www.marsella.io/)
- The spization repository's first commit was on 2024-08-29. (https://github.com/Marsella8/spization)
- Pietro Marsella built spization, a library for working with Series Parallel Structures. (https://www.marsella.io/projects)
- Pietro Marsella said that during the mission he would, among other activities supporting the other experiments, test a Life Support System device capable of sanitizing air extremely effectively and quickly. (https://www.sempionenews.it/territorio/pietro-marsella-dal-galilei-di-legnano-alla-simulazione-su-marte/)
- Pietro Marsella's Life Support System was to be tested in the SMOPs (Space Medicine Operations) mission simulating an excursion on Mars. (https://www.legnanonews.com/aree-geografiche/legnano/2022/04/20/un-po-di-legnano-potrebbe-andare-su-marte-grazie-a-pietro-marsella-studente-del-galilei/1023633/)
- The device programmed by Pietro Marsella can clean the air and monitor its quality, providing important data. (https://www.legnanonews.com/aree-geografiche/legnano/2022/04/20/un-po-di-legnano-potrebbe-andare-su-marte-grazie-a-pietro-marsella-studente-del-galilei/1023633/)
- Pietro Marsella's internship was originally meant to last two weeks, but the company asked him to stay for the whole summer. (https://www.legnanonews.com/aree-geografiche/legnano/2022/04/20/un-po-di-legnano-potrebbe-andare-su-marte-grazie-a-pietro-marsella-studente-del-galilei/1023633/)
- Pietro Marsella designed the software architecture and then wrote the program using the Python language. (https://www.legnanonews.com/aree-geografiche/legnano/2022/04/20/un-po-di-legnano-potrebbe-andare-su-marte-grazie-a-pietro-marsella-studente-del-galilei/1023633/)
- Pietro Marsella focused heavily on monitoring the particles captured by the purifier, as they are fundamental to studying bacterial growth in space. (https://www.legnanonews.com/aree-geografiche/legnano/2022/04/20/un-po-di-legnano-potrebbe-andare-su-marte-grazie-a-pietro-marsella-studente-del-galilei/1023633/)
- While on a cultural exchange in the United States, Pietro Marsella continued improving the software architecture while staying in contact with the company. (https://www.legnanonews.com/aree-geografiche/legnano/2022/04/20/un-po-di-legnano-potrebbe-andare-su-marte-grazie-a-pietro-marsella-studente-del-galilei/1023633/)
- Pietro Marsella was described as «molto orgoglioso» (very proud) of this achievement, which he saw as only a starting point for a future in space. (https://www.legnanonews.com/aree-geografiche/legnano/2022/04/20/un-po-di-legnano-potrebbe-andare-su-marte-grazie-a-pietro-marsella-studente-del-galilei/1023633/)
- Pietro Marsella designed the software architecture and implemented it using the Python language. (https://www.sempionenews.it/territorio/pietro-marsella-dal-galilei-di-legnano-alla-simulazione-su-marte/)
- Previous roles include Member of Technical Staff at Cognition; ML Compiler Researcher at Stanford University Department of Computer Science; System Software Engineer at D-Orbit; Software Engineer at D-Orbit. (https://www.linkedin.com/in/pietro-max-marsella)
- Pietro Marsella has a project called "merlo" described as "wip!". (https://www.marsella.io/)
- Pietro Marsella has a project called "spization" described as a "library for working with Series Parallel Structures". (https://www.marsella.io/)
- Pietro Marsella wrote the self-introduction "hi, i'm pietro : )" and "I like computers etc.". (https://www.marsella.io/)
- Pietro Marsella is from a little town in Italy called Dairago. (https://www.marsella.io/about)
- Pietro Marsella likes compilers, formal languages, and machine learning. (https://www.marsella.io/about)
- Pietro Marsella is currently an undergrad at Stanford studying math and CS. (https://www.marsella.io/about)
- Marsella8 has a public Python repository named spization. (https://github.com/Marsella8)
- Marsella8 has a public Python repository named proj, forked from lockshaw/proj. (https://github.com/Marsella8)
- Marsella8 has a public Python repository named lazy-matmuls. (https://github.com/Marsella8)
- Marsella8 has a public HTML repository named Marsella8.github.io. (https://github.com/Marsella8)
- Marsella8 has a public Python repository named gg-bench. (https://github.com/Marsella8)
- Marsella8's GitHub account has 5 followers and is following 3 users. (https://github.com/Marsella8)
- Marsella8 has earned the GitHub Pull Shark achievement. (https://github.com/Marsella8)
- Marsella8 has earned the Pull Shark achievement on GitHub. (https://github.com/Marsella8?tab=repositories)
- Pietro Marsella owns the GitHub repository Marsella8/merlo, which has no description, website, or topics provided. (https://github.com/Marsella8/merlo)
- The merlo repository has 0 stars, 0 watchers, and 0 forks. (https://github.com/Marsella8/merlo)
- The merlo repository has 1 contributor, Marsella8. (https://github.com/Marsella8/merlo)
- The merlo repository's languages are C at 82.8%, OpenQASM at 8.5%, Assembly at 3.1%, Python at 2.8%, and Makefile at 2.8%. (https://github.com/Marsella8/merlo)
- The merlo repository contains folders firmware, include, libpi, py, src, and tests, plus files .gitignore, Makefile, README.md, and REPORT.md. (https://github.com/Marsella8/merlo)
- The merlo repository has 29 commits on its main branch. (https://github.com/Marsella8/merlo)
- Marsella8 wrote in the merlo README: "Good ADTs? Generics? Never heard of that." (https://github.com/Marsella8/merlo)
- Marsella8 wrote in the merlo README: "You can embed invariants through types in order to leverage the compiler for increased safety? hahaha we have void\* buddy it's plenty already." (https://github.com/Marsella8/merlo)
- Marsella8 wrote in the merlo README: "Oh wanna do a simple string operation? That will be 20 lines of code and 3 mallocs, please." (https://github.com/Marsella8/merlo)
- Marsella8 wrote in the merlo README: "Hey dude so what is the size of that size\_t\* arr you got there? I don't know man, ask the other argument haha why would I know?" (https://github.com/Marsella8/merlo)
- Pietro Marsella owns the GitHub repository Marsella8/spization, a simple Python package for Graph Series-Parallel-ization. (https://github.com/Marsella8/spization)
- Pietro Marsella is a contributor to the spization repository under the GitHub handle Marsella8. (https://github.com/Marsella8/spization)
- Colin Unger (GitHub handle lockshaw) is a contributor to the spization repository alongside Marsella8. (https://github.com/Marsella8/spization)
- The spization repository has 0 stars, 2 watchers, and 0 forks. (https://github.com/Marsella8/spization)
- The spization repository is written primarily in Python (98.9%). (https://github.com/Marsella8/spization)
- The spization repository has 45 commits on the master branch. (https://github.com/Marsella8/spization)
- Pietro Marsella owns the GitHub repository Marsella8/civetta, which has no description, website, or topics provided. (https://github.com/Marsella8/civetta)
- The Marsella8/civetta repository has 0 stars, 0 watchers, and 0 forks. (https://github.com/Marsella8/civetta)
- The Marsella8/civetta repository contains a src folder, .gitignore, Cargo.lock, Cargo.toml, and TODO.md. (https://github.com/Marsella8/civetta)
- Location is Stanford, California, United States. (https://www.linkedin.com/in/pietro-max-marsella)

## Experience
- Member of Technical Staff at Cognition (Jun 2025 - Dec 2025): RL for code generation
- ML Compiler Researcher at Stanford University Department of Computer Science (Mar 2024 - Jul 2025): Machine Learning Compiler Research for the FlexFlow project.
- System Software Engineer at D-Orbit (Jun 2022 - Aug 2023): Software developer for optical payload for ION satellites, Technology Transfer & Prototyping Division
- Software Engineer at D-Orbit (Jun 2021 - Aug 2021): Software developer of Alcor, a space-grade air purifier

## Education
- Stanford University - BA / BS, Mathematics & Computer Science - (Jan 2023 - Dec 2027)

## Sources
- https://www.linkedin.com/in/pietro-max-marsella
- https://x.com/pmmarsella/status/2112994752660652113
- https://github.com/Marsella8?tab=repositories
- https://github.com/Marsella8/spization
- https://cognition.com/blog/kevin-32b
- https://www.marsella.io/projects
- https://www.legnanonews.com/aree-geografiche/legnano/2022/04/20/un-po-di-legnano-potrebbe-andare-su-marte-grazie-a-pietro-marsella-studente-del-galilei/1023633/
- https://www.sempionenews.it/territorio/bianca-fiorella-e-pietro-per-sempre-con-lassegnazione-di-borse-di-studio-ai-liceali-meritevoli/
- https://github.com/Marsella8
- https://www.marsella.io/
- https://github.com/Marsella8/civetta
- https://www.marsella.io/post-its
- https://www.marsella.io/about
- https://www.sempionenews.it/territorio/pietro-marsella-dal-galilei-di-legnano-alla-simulazione-su-marte/
- https://github.com/Marsella8/merlo
- https://www.sempionenews.it/territorio/palazzo-leone-da-perego-premiati-gli-studenti-meritevoli-ai-campionati-legnanesi-di-giochi-matematici/
- https://x.com/pmmarsella


Researched with Autumn (https://www.autumn.ai) from public sources. Updated 2026-11-04. Profile: https://www.autumn.ai/resources/cognition/people/pietro-marsella · Everyone at Cognition: https://www.autumn.ai/resources/cognition/people
