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.4.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.4-py3-none-any.whl (53.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: zlynx-0.1.4.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.4.tar.gz
Algorithm Hash digest
SHA256 1fac76a70927ea7e8b797c128cd44cbf733f9f2f31019457b051bdf5e153cb34
MD5 bd775eecb2e192e83b00aeb1676bfa25
BLAKE2b-256 dadb89fe81a67d1deabb865986bc34194fcb9ff279d1cebed239adde8167da21

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: zlynx-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 53.3 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 18e268b827ab3bbe8147bf2ed69f82fc73690dd14d86338bcd1e69be2a29bf92
MD5 37f9eaffbb6d64c23e302ce075b594e3
BLAKE2b-256 b834e19a0f00cdbc62db255e9e4cacbdb8384c881d4729d25a95d59091996475

See more details on using hashes here.

Provenance

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