Skip to content

Commit 20f34fa

Browse files
author
Masoud
authored
docs: README cleanup after Ray-Rust integration (#14)
* readme cleanup; completed todo items 1 and 2, starting on 3. * feat: Ray-Rust integration for distributed proving - Add prove_chunk CLI binary (zkml/src/bin/prove_chunk.rs) - Add Python wrapper (python/rust_prover.py) - Update simple_distributed.py with real prover support - Add clap and hex dependencies Refs #9, #12 * updated readme after completing 3 in next steps --------- Signed-off-by: Masoud <masoud@anyscale.com>
1 parent 2660aa1 commit 20f34fa

File tree

2 files changed

+17
-119
lines changed

2 files changed

+17
-119
lines changed

README.md

Lines changed: 17 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ Extension of [zkml](https://github.com/uiuc-kang-lab/zkml) for distributed provi
1919
- [Implementation](#implementation)
2020
- [How Distributed Proving Works](#how-distributed-proving-works)
2121
- [Structure](#structure)
22-
- [Implementation Status](#implementation-status)
2322
- [Quick Start](#quick-start)
2423
- [Testing and CI](#testing-and-ci)
2524
- [Testing](#testing)
@@ -100,35 +99,16 @@ With Merkle trees, only the root is public—**O(1) public values**. The next ch
10099

101100
```
102101
distributed-zkml/
103-
├── src/ # Distributed proving code (this repo)
104-
│ ├── distributed/ # Chunk execution and Merkle proofs
105-
│ └── ray/ # Ray integration for batch inference
102+
├── python/ # Python wrappers for Rust prover
103+
│ └── rust_prover.py # Python interface to prove_chunk CLI
106104
├── tests/ # Tests
107-
│ ├── simple_distributed.py # Distributed proving simulation/test
105+
│ ├── simple_distributed.py # Distributed proving with Ray
108106
│ └── aws/ # AWS GPU tests
109-
└── zkml/ # zkml git submodule (modified with Merkle tree support)
107+
└── zkml/ # zkml (modified with Merkle tree + chunk proving)
108+
├── src/bin/prove_chunk.rs # CLI for chunk proof generation
109+
└── testing/ # Rust test suites
110110
```
111111

112-
This is a separate Rust crate that extends zkml. The `zkml/` directory is a git submodule containing a modified version of zkml with Merkle tree support for intermediate value commitments.
113-
114-
### Implementation Status
115-
116-
#### Merkle Tree Integration
117-
118-
- Binary Merkle tree implementation (`zkml/src/commitments/merkle.rs`)
119-
- Builds binary tree from intermediate values
120-
- Uses Poseidon hashing for efficient circuit operations
121-
122-
- Chunk execution (`zkml/src/layers/dag.rs`)
123-
- `forward_chunk()` - Execute layers in a range
124-
- `forward_chunk_with_merkle()` - Execute chunk and build Merkle tree
125-
126-
- Tests (`zkml/testing/`)
127-
- Merkle tree tests (3/3 pass)
128-
- Chunk execution tests (3/3 pass)
129-
130-
Current status: Code compiles, all tests pass. Ready for integration with proof generation.
131-
132112
## Quick Start
133113

134114
### Build
@@ -144,20 +124,28 @@ cd ..
144124
cargo build
145125
```
146126

147-
### Run Test/Simulation
127+
### Run Distributed Proving
148128

149129
```bash
150-
# Test/simulation with placeholder implementations
130+
# Simulation mode (fast, no actual proofs)
151131
python3 tests/simple_distributed.py \
152132
--model zkml/examples/mnist/model.msgpack \
153133
--input zkml/examples/mnist/inp.msgpack \
154134
--layers 4 \
155135
--workers 2
136+
137+
# Real mode (generates actual ZK proofs, ~2-3s per chunk)
138+
python3 tests/simple_distributed.py \
139+
--model zkml/examples/mnist/model.msgpack \
140+
--input zkml/examples/mnist/inp.msgpack \
141+
--layers 4 \
142+
--workers 2 \
143+
--real
156144
```
157145

158146
## Testing and CI
159147

160-
### Testing
148+
### General
161149

162150
#### Python Tests (pytest)
163151

tests/README_tests.md

Lines changed: 0 additions & 90 deletions
This file was deleted.

0 commit comments

Comments
 (0)