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.5.tar.gz (48.6 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.5-py3-none-any.whl (51.0 kB view details)

Uploaded Python 3

File details

Details for the file zlynx-0.1.5.tar.gz.

File metadata

  • Download URL: zlynx-0.1.5.tar.gz
  • Upload date:
  • Size: 48.6 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.5.tar.gz
Algorithm Hash digest
SHA256 d72043f39cee99f13f2df6b5170b65b8d0b98d77dea5237dd567952be6a3dbce
MD5 8563a46ab760b3cd9137b384208dbfe6
BLAKE2b-256 d1f0cc29b75e8f25031c5c570a7748b1fef18fe6bbc7ab056c602d72641b4d5f

See more details on using hashes here.

Provenance

The following attestation bundles were made for zlynx-0.1.5.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.5-py3-none-any.whl.

File metadata

  • Download URL: zlynx-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 51.0 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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 1f5d6fbc581c52b1b58675fe2f991b0e8c543fd991be2cd6010a78aa6f1e7e38
MD5 d1905f8f8a7f72be04ee80cd271fef7f
BLAKE2b-256 659c14a667908e328a85d7c1d9b69fe8119e02875d6a2b0bf1988b5d0992e21f

See more details on using hashes here.

Provenance

The following attestation bundles were made for zlynx-0.1.5-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