jaxtyping
tiny-cuda-nn
jaxtyping | tiny-cuda-nn | |
---|---|---|
8 | 9 | |
1,298 | 3,826 | |
4.9% | 1.2% | |
8.2 | 4.3 | |
5 days ago | 10 days ago | |
Python | C++ | |
GNU General Public License v3.0 or later | GNU General Public License v3.0 or later |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
jaxtyping
-
Python type hints may not be not for me in practice
You want runtime typechecking.
See either beartype [1] or typeguard [2]. And if you're doing any kind of array-based programming (JAX or not), then jaxtyping [3].
[1] https://github.com/beartype/beartype/
[2] https://github.com/agronholm/typeguard
[3] https://github.com/patrick-kidger/jaxtyping
-
Writing Python like it's Rust
Try using [jaxtyping](https://github.com/google/jaxtyping).
It also supports numpy/pytorch/etc.
-
Writing Python like it’s Rust
Since you mention ML use-cases, you might like jaxtyping.
-
Scientific computing in JAX
jaxtyping: rich shape & dtype annotations for arrays and tensors (also supports PyTorch/TensorFlow/NumPy);
-
[D] Have their been any attempts to create a programming language specifically for machine learning?
Heads-up that my newer jaxtyping project now exists.
-
Returning to snake's nest after a long journey, any major advances in python for science ?
As other folks have commented, type hints are now a big deal. For static typing the best checker is pyright. For runtime checking there is typeguard and beartype. These can be integrated with array libraries through jaxtyping. (Which also works for PyTorch/numpy/etc., despite the name.)
- Type annotations and runtime checking for shape and dtype
tiny-cuda-nn
-
[D] Have their been any attempts to create a programming language specifically for machine learning?
In the opposite direction from your question is a very interesting project, TinyNN all implemented as close to the metal as possible and very fast: https://github.com/NVlabs/tiny-cuda-nn
-
A CUDA-free instant NGP renderer written entirely in Python: Support real-time rendering and camera interaction and consume less than 1GB of VRAM
This repo only implemented the rendering part of the NGP but is more simple and has a lesser amount of code compared to the original (Instant-NGP and tiny-cuda-nn).
- Tiny CUDA Neural Networks: fast C++/CUDA neural network framework
- Making 3D holograms this weekend with the very “Instant” Neural Graphics Primitives by nvidia — made this volume from 100 photos taken with an old iPhone 7 Plus
- NVlabs/tiny-CUDA-nn: fast C++/CUDA neural network framework
-
Small Neural networks in Julia 5x faster than PyTorch
...a C++ library with a CUDA backend. But these high-performance building blocks might only be saturating the GPU fully if the data is large enough.
I haven't looked at implementing these things, but I imagine uf you have smaller networks and thus less data, the large building blocks may not be optimal. You may for example want to fuse some operations to reduce memory latency from repeated memory access.
In PyTorch world, there are approaches for small networks as well, there is https://github.com/NVlabs/tiny-cuda-nn - as far as I understand from the first link in the README, it makes clever use of the CUDA shared memory, which can hold all the weights of a tiny network (but not larger ones).
- [R] Instant Neural Graphics Primitives with a Multiresolution Hash Encoding (Training a NeRF takes 5 seconds!)
- Tiny CUDA Neural Networks
- Real-Time Neural Radiance Caching for Path Tracing
What are some alternatives?
torchtyping - Type annotations and dynamic checking for a tensor's shape, dtype, names, etc.
instant-ngp - Instant neural graphics primitives: lightning fast NeRF and more
plum - Multiple dispatch in Python
blis - BLAS-like Library Instantiation Software Framework
diffrax - Numerical differential equation solvers in JAX. Autodifferentiable and GPU-capable. https://docs.kidger.site/diffrax/
madtypes - Python Type that raise TypeError at runtime
RecursiveFactorization
MindsDB - AGI's query engine - Platform for building AI that can learn and answer questions over federated data.
juliaup - Julia installer and version multiplexer
esm - Evolutionary Scale Modeling (esm): Pretrained language models for proteins
RecursiveFactorization.jl