Comments (2)
Hmm unfortunately I cannot repro this (Flax 0.8.5). My printout yields this:
This can be reproed by opening any empty colab.
Foo Summary
┏━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━┓
┃ path ┃ module ┃ inputs ┃ outputs ┃ flops ┃ vjp_flops ┃ params ┃
┡━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━╇━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━┩
│ │ Foo │ float32[16,9] │ float32[16,2] │ 1504 │ 4460 │ │
├─────────┼────────┼───────────────┼───────────────┼───────┼───────────┼──────────────────────┤
│ Dense_0 │ Dense │ float32[16,9] │ float32[16,4] │ 1216 │ 3620 │ bias: float32[4] │
│ │ │ │ │ │ │ kernel: float32[9,4] │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ 40 (160 B) │
├─────────┼────────┼───────────────┼───────────────┼───────┼───────────┼──────────────────────┤
│ Dense_1 │ Dense │ float32[16,4] │ float32[16,2] │ 288 │ 840 │ bias: float32[2] │
│ │ │ │ │ │ │ kernel: float32[4,2] │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ 10 (40 B) │
├─────────┼────────┼───────────────┼───────────────┼───────┼───────────┼──────────────────────┤
│ │ │ │ │ │ Total │ 50 (200 B) │
└─────────┴────────┴───────────────┴───────────────┴───────┴───────────┴──────────────────────┘
from flax.
The code does work on the pinned package configurations on Colab and Kaggle, but fails to run when installed with the same package versions on a local machine. The provided data is based on a new install of flax, jax and jaxlib cuda on a mamba environment using pip. (Though that shouldn't affect it).
For reference, the Colab and Kaggle runtime use system level CuDA packages while the pip installed versions come with their own CuDA wheels.
Here's the minimal dependency list anyways.
Package Version
------------------------ ---------
absl-py 2.1.0
asttokens 2.4.1
chex 0.1.86
decorator 5.1.1
etils 1.7.0
exceptiongroup 1.2.0
executing 2.0.1
flax 0.8.4
fsspec 2024.6.0
importlib_resources 6.4.0
ipython 8.25.0
jax 0.4.26
jax-cuda12-pjrt 0.4.26
jax-cuda12-plugin 0.4.26
jaxlib 0.4.26
jedi 0.19.1
markdown-it-py 3.0.0
matplotlib-inline 0.1.7
mdurl 0.1.2
ml-dtypes 0.4.0
msgpack 1.0.8
nest-asyncio 1.6.0
numpy 2.0.0
nvidia-cublas-cu12 12.5.2.13
nvidia-cuda-cupti-cu12 12.5.39
nvidia-cuda-nvcc-cu12 12.5.40
nvidia-cuda-nvrtc-cu12 12.5.40
nvidia-cuda-runtime-cu12 12.5.39
nvidia-cudnn-cu12 8.9.7.29
nvidia-cufft-cu12 11.2.3.18
nvidia-cusolver-cu12 11.6.2.40
nvidia-cusparse-cu12 12.4.1.24
nvidia-nccl-cu12 2.22.3
nvidia-nvjitlink-cu12 12.5.40
opt-einsum 3.3.0
optax 0.2.2
orbax-checkpoint 0.5.20
parso 0.8.4
pexpect 4.9.0
pickleshare 0.7.5
pip 24.0
prompt_toolkit 3.0.47
protobuf 5.27.2
ptyprocess 0.7.0
pure-eval 0.2.2
Pygments 2.18.0
PyYAML 6.0.1
rich 13.7.1
scipy 1.14.0
setuptools 70.1.1
six 1.16.0
stack-data 0.6.2
tensorstore 0.1.63
toolz 0.12.1
traitlets 5.14.3
typing_extensions 4.12.2
wcwidth 0.2.13
wheel 0.43.0
zipp 3.19.2
from flax.
Related Issues (20)
- Using `vmap` on the loss function change results
- Cannot load checkpoint saved in flax 0.5.3 with flax 0.6.1
- Not sure if flax use the GPU HOT 2
- New python venv fails to pip install the flax mnist example requirements HOT 3
- Best practice of dealing with sporadic FrozenDict conversions? HOT 2
- NNX + mutable state + JIT = "Cannot mutate <module name> from a different trace level"
- `serialization.from_state_dict` does not restore to jax.Arrays HOT 1
- Exceptions are not pickle-able
- Force `fp32` in `attention.MultiHeadDotProductAttention` for softmax operator HOT 1
- Will nnx.MultiHeadAttention support flash att? HOT 3
- `save_checkpoint` fails with the most recent orbax release HOT 2
- Suboptimal default initialization of q/k/v projections in `nn.MultiHeadDotProductAttention` HOT 2
- lstm error HOT 2
- Feature request: Mixture of Experts example HOT 1
- Significant performance difference of NNX relative to equinox HOT 15
- typo in nnx_basics.md HOT 3
- Opaque XLA crash when initializing model HOT 1
- Is there anyway to analyze activations in flax? HOT 1
- Docs: please clarify how to vmap nnx.Module over batch dimension HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flax.