Honey I SNARKED the GPT - EZKL Blog
This post is written in collaboration with Bianca Gănescu a Master’s student at Imperial College London (supervised by Jonathan Passerat-Palmbach) who was instrumental in making this happen, and Jason Morton. I am the lead developer on EZKL (stylized and pronounced Ezekiel), a library which enables users to convert computational graphs represented in the Open Neural Network Exchange (ONNX) format to a (Halo2-KZG) ZK-SNARK circuit. Since starting the project in August of 2022 we’ve come a long way in terms of the breadth of models we support, our proving performance, and also the community of folks building and researching on top of our tool! Bianca, as part of her Master’s thesis, wanted to get nanoGPT into a ZK-SNARK using our tooling. This post is a high level overview of the steps it took to make that happen. The sections below are somewhat technical and assume some knowledge of how the Halo2 API is structured. A question we often get is how we manage to get large models into a Halo
:first-child{mt:0!} _:where(pre){p:20;_r:8;_overflow:auto} _:where(pre,code:not(.highlight_*)){bg:fade-2;_bg:fade-92!@dark} _:where(strong,b,a,code:not(.highlight_*),mark,del){font:fade-92;_font:fade-12@dark} _:where(table){width:full;_border-spacing:0} _:where(td){v:baseline} _:where(td,th):first-child{pl:0} _:where(td,th):last-child{pr:0} _:where(td,th){bb:1;solid;fade-92/.06;_p:6;_b:fade-4/.04@dark} _:where(th){font:fade-78;_font:14;_text:left;_font:fade-12@dark} _:where(th,p_code,li_code,a,mark){font:semibold;_font:medium@dark} _:where(ul){list-style-type:disc} _:where(ul,ol,blockquote){pl
Explore this link on the map →saved by
related reading
- A High-Level Technical Overview of Fully Homomorphic Encryption || Math ∩ Programmingjeremykun.com
- Google's Fully Homomorphic Encryption Compiler — A Primer || Math ∩ Programmingjeremykun.com
- Hardware Acceleration for Zero Knowledge Proofs - Paradigmparadigm.xyz
- 17 misconceptions about SNARKs - a16z cryptoa16zcrypto.com
- Pearl Whitepaperpearlresearch.ai
- ZK-Friendly Hash Functions | Zellic — Researchzellic.io
- Explaining Halo 2 - Electric Coin Companyelectriccoin.co
- ZK Machine Learning - HackMDhackmd.io
- Zero Knowledge Canon, part 1 & 2 - a16z cryptoa16zcrypto.com
- Background in ZK - Circom 2 Documentationdocs.circom.io
- ZKML Research Initiatives - HackMDhackmd.io
- Planting trees on-chain - EZKL Blogblog.ezkl.xyz