Skip to main content

Zlynx is a lightweight, highly-customizable deep learning library built on top of JAX and Flax NNX

Project description

Zlynx

Ask DeepWiki

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

zlynx-0.1.3.tar.gz (52.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

zlynx-0.1.3-py3-none-any.whl (53.4 kB view details)

Uploaded Python 3

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

Hashes for zlynx-0.1.3.tar.gz
Algorithm Hash digest
SHA256 2c07203267dfa984dcdd1f968077a82cb90e7a28658e75b9c4ffabb7e12b5443
MD5 f5612fbc085a2fc1ea4e8efcb7cb0908
BLAKE2b-256 6ab3e9f150486b27e65c79e1f57b0971216fa833a95f9100a91fa789754239ef

See more details on using hashes here.

Provenance

The following attestation bundles were made for zlynx-0.1.3.tar.gz:

Publisher: publish.yml on zlynx-ai/zlynx

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for zlynx-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 088efc486d8a6971470372d79280773ac8df15ac6c04e7b70dc7fea3a8a367aa
MD5 cc2d6ae59495c2337f82091f39a66309
BLAKE2b-256 09197e49aa876d461fbbbfd65ae331031ad8072addc7a61d72b3c34e3fb93b7d

See more details on using hashes here.

Provenance

The following attestation bundles were made for zlynx-0.1.3-py3-none-any.whl:

Publisher: publish.yml on zlynx-ai/zlynx

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page