mratsim
Joined 9 years ago
Joined 9 years ago
gpt-oss-120b: (unknown prefill), ~175 tok/s generation. I don't remember the prefill speed but it certainly was below 10k
Nemotron-3-Super: 14070 tok/s prefill, ~194.5 tok/s generation. (Tested fresh after reload, no caching, I have a screenshot.)
Nemotron-3-Super using NVFP4 and speculative decoding via MTP 5 tokens at a time as mentioned in Nvidia cookbook: https://docs.nvidia.com/nemotron/nightly/usage-cookbook/Nemo...
Also checked and apparently Nvidia Cutlass now supports generic convolutions: https://github.com/NVIDIA/cutlass
And BLS signatures are standards as well: https://www.ietf.org/archive/id/draft-irtf-cfrg-bls-signatur...
Similarly KZG polynomial commitments are generic, the Ethereum specific thing is the trusted setup ceremony which needs to be specialized per protocol.
The finite field backends and the elliptic curves supported are all generic as well: https://github.com/mratsim/constantine/blob/master/constanti...
Then the library defines its own types SecretBool and SecretWord throughough library that cannot be mixed with regular Nim types and are based on uint32/uint64 so the compiler cannot assume 0/1 and do boolean logic.
Assembly is used to avoid compilers getting too smart and reintroducing branches but the no-assembly fallback should still compile without branches.
By convention, all variable-time cryptographic functions are suffixed _vartime.
There is a plan to add automated constant-time checks as well https://github.com/mratsim/constantine/issues/7.
People don't have to comply to GDPR but if they want to serve EU folks then they don't have a choice.
Nim supports variadic generic, it's an arbitrary limitation so that shape and stride small vectors that describe a tebsor can be stack-allocated and fit in a cacheline.
Also at the time, Nim default heap allocator was not compatible with OpenMP.
Edit: it can be configured via a compile-time flag to 8 or 10 or anything: https://github.com/mratsim/Arraymancer/blob/master/src%2Farr...
And lots of funding for then vaporware
Check out my Numpy/PyTorch alternative written in Nim: ergonomics of Python, speed of C, OpenMP, Cuda and OpenCL support - https://github.com/mratsim/Arraymancer