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.2.tar.gz (52.4 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.2-py3-none-any.whl (55.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: zlynx-0.1.2.tar.gz
  • Upload date:
  • Size: 52.4 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.2.tar.gz
Algorithm Hash digest
SHA256 0749d55f2cb3d40e30d7b2b5f4b8187fb26c1a4adc02899b02580f90886131f8
MD5 5e6fe82a9abaf1b4e7cd074145afffa6
BLAKE2b-256 416d0c8315e595ff9320395a553ad06d4abc6eb557f525b79ecc37743518071f

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: zlynx-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 55.1 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1238bd03b368948693b957997e115433414bf32bb8869bc76c9da6c0b8756db8
MD5 050f6fa92d85039a54fbbb4c1bf12431
BLAKE2b-256 88eadb15ad442f3465284d7848db68a7e21b69ff0775f98773286242c28e420e

See more details on using hashes here.

Provenance

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