Zlynx is a lightweight, highly-customizable deep learning library built on top of JAX and Flax NNX
Project description
Zlynx
Zlynx is a lightweight, highly-customizable deep learning library built on top of JAX and Flax NNX. It is designed for researchers and developers who want fine-grained control over model architectures, training loops, and distributed setups without the bloat of massive frameworks.
Quick Start
pip install zlynx
Define your model and load weights
from zlynx import Z
# Define your model architecture
class MyModel(Z): ...
# Load weights from HuggingFace
model, tokenizer = MyModel.load_hf("username/my-model")
# Load from Kaggle
import kagglehub
kagglehub.login()
model, _ = MyModel.load_kaggle("username/model", sharding="fsdp")
Sharding (Optional)
Sharding distributes your model across multiple GPUs/TPUs. Omit for single-device loading:
# Single device (default)
model, tokenizer = MyModel.load_hf("username/my-model")
# Distributed across devices
model, _ = MyModel.load_hf("username/my-model", sharding="fsdp") # shards model weights
model, _ = MyModel.load_hf("username/my-model", sharding="ddp") # shards data
Or use built-in Llama
from zlynx.models.llama import LlamaConfig, LlamaLanguageModel
config = LlamaConfig(vocab_size=32000, hidden_size=512, num_hidden_layers=2)
model = LlamaLanguageModel(config)
Save & Push
model.save("my-model", format="safetensors")
model.push_hf("username/my-model", private=False)
Train
from zlynx import Trainer, TrainerConfig
trainer = Trainer(model, train_dataset, TrainerConfig())
trainer.train()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file zlynx-0.1.3.tar.gz.
File metadata
- Download URL: zlynx-0.1.3.tar.gz
- Upload date:
- Size: 52.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2c07203267dfa984dcdd1f968077a82cb90e7a28658e75b9c4ffabb7e12b5443
|
|
| MD5 |
f5612fbc085a2fc1ea4e8efcb7cb0908
|
|
| BLAKE2b-256 |
6ab3e9f150486b27e65c79e1f57b0971216fa833a95f9100a91fa789754239ef
|
Provenance
The following attestation bundles were made for zlynx-0.1.3.tar.gz:
Publisher:
publish.yml on zlynx-ai/zlynx
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
zlynx-0.1.3.tar.gz -
Subject digest:
2c07203267dfa984dcdd1f968077a82cb90e7a28658e75b9c4ffabb7e12b5443 - Sigstore transparency entry: 1101542301
- Sigstore integration time:
-
Permalink:
zlynx-ai/zlynx@8d801c3daadbbac40e761e19779fec43cc5c1ffa -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/zlynx-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@8d801c3daadbbac40e761e19779fec43cc5c1ffa -
Trigger Event:
push
-
Statement type:
File details
Details for the file zlynx-0.1.3-py3-none-any.whl.
File metadata
- Download URL: zlynx-0.1.3-py3-none-any.whl
- Upload date:
- Size: 53.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
088efc486d8a6971470372d79280773ac8df15ac6c04e7b70dc7fea3a8a367aa
|
|
| MD5 |
cc2d6ae59495c2337f82091f39a66309
|
|
| BLAKE2b-256 |
09197e49aa876d461fbbbfd65ae331031ad8072addc7a61d72b3c34e3fb93b7d
|
Provenance
The following attestation bundles were made for zlynx-0.1.3-py3-none-any.whl:
Publisher:
publish.yml on zlynx-ai/zlynx
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
zlynx-0.1.3-py3-none-any.whl -
Subject digest:
088efc486d8a6971470372d79280773ac8df15ac6c04e7b70dc7fea3a8a367aa - Sigstore transparency entry: 1101542302
- Sigstore integration time:
-
Permalink:
zlynx-ai/zlynx@8d801c3daadbbac40e761e19779fec43cc5c1ffa -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/zlynx-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@8d801c3daadbbac40e761e19779fec43cc5c1ffa -
Trigger Event:
push
-
Statement type: