You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I’d like to share nnx-lm, a Python package for running LLMs on any hardware backends using NNX.
Motivation:
The currently available Flax examples don’t show how to load pretrained weights from HuggingFace safetensors or evaluate/compare runtime performances in a configurable way across various hardware backends and optimization options.
Features:
Native safetensors support to load weights from any model repo (no conversion).
Configurable optimizations through flags to toggle jit and scan and batching.
XLA-specific optimizations e.g., avoiding dynamic tensor shapes in KV caching.
Goal:
Just as how projects like mlx-lm have gained traction by making pretrained models easy to run and extend, nnx-lm aims to offer a similar experience for Flax users but without introducing yet another model zoo.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi Flax team,
I’d like to share nnx-lm, a Python package for running LLMs on any hardware backends using NNX.
Motivation:
The currently available Flax examples don’t show how to load pretrained weights from HuggingFace safetensors or evaluate/compare runtime performances in a configurable way across various hardware backends and optimization options.
Features:
jitandscanand batching.Goal:
Just as how projects like
mlx-lmhave gained traction by making pretrained models easy to run and extend,nnx-lmaims to offer a similar experience for Flax users but without introducing yet another model zoo.I'd love to hear your thoughts. Thank you!
Beta Was this translation helpful? Give feedback.
All reactions