Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Metoryx

Metoryx is a neural network library for JAX that combines the functional init/apply style with a flexible model definition. It cleanly separates logic (pure functions) from state (parameters) while keeping the workflow intuitive and easy to extend. If you value reusability, testability, and compatibility with the JAX ecosystem, Metoryx is for you.

Features

  • Flexible model definitions: Define models in a Pythonic, PyTorch-like style.
  • Seamless JAX integration: Transform models into pure init/apply functions that work with jax.jit, jax.vmap, and jax.pmap.
  • Easy customization: Implement LoRA, transfer learning, and other techniques with minimal boilerplate; parameters are regular Python objects you can inspect and modify.

Installation

pip install metoryx

Quick Example

Define a model by subclassing mx.Module.

import jax
import jax.numpy as jnp

import metoryx as mx


class MyModel(mx.Module):
    def __init__(self):
        super().__init__()
        self.dense1 = mx.Dense(16, 128)
        self.dense2 = mx.Dense(128, 10)

    def __call__(self, x):
        x = self.dense1(x)
        x = mx.relu(x)
        return self.dense2(x)


model = MyModel()

# Model instance is a Python object that can be manipulated freely.
model.dense2 = mx.Dense(128, 5)  # Replace the last layer
model.dense1.kernel.value = jnp.zeros((16, 128), jnp.float32)  # Set initial weights directly

# Transform the module into JAX-native pure functions.
init, apply = mx.transform(model)

# Create PRNG keys
rng = jax.random.PRNGKey(0)
init_rng, apply_rng = jax.random.split(rng)

# Initialize parameters
variables = init(init_rng)

# Forward pass (with JIT compilation)
x = jnp.zeros((16,))
y, new_variables = jax.jit(apply)(variables, apply_rng, x)

More examples can be found in metoryx/examples.

Future Plans

  • More layers and utilities (e.g., RNNs, attention, parameterized activation functions)
  • Advanced features (e.g., mixed precision)
  • Better documentation and tutorials
  • Expanded examples
  • Expanded test coverage

Metadata

Release files for metoryx 0.0.1a0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for metoryx 0.0.1a0
File Size Uploaded Provenance Actions
metoryx-0.0.1a0.tar.gz 22.9 kB Without provenance Details for metoryx-0.0.1a0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for metoryx 0.0.1a0
File Interpreter ABI Platform Actions
metoryx-0.0.1a0-py3-none-any.whl Python 3 none any Details for metoryx-0.0.1a0-py3-none-any.whl

Total release size: 50.3 kB

Release files / metoryx-0.0.1a0.tar.gz

Download URL metoryx-0.0.1a0.tar.gz
Size 22.9 kB
Tags Source
SHA-256 checksum
How to use checksums
78d2079149cdba6d5613bdf0ab94fa7b08667628d31a6ed9fab96bc68bac0a83
BLAKE2b-256 checksum
How to use checksums
87488c70a91da7393d385d32a2d8df154393e27ca83092e263f5eb55a00699a9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.14

Release files / metoryx-0.0.1a0-py3-none-any.whl

Download URL metoryx-0.0.1a0-py3-none-any.whl
Size 27.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
72f469c3c95b68bf9864febde1a4b230517639b32802f1fa448f757ca7d87ad3
BLAKE2b-256 checksum
How to use checksums
126b2e7599031ea850f4622faca78ed123708b7aacb57dcc35475eac5e11e6cd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.14

Security for metoryx 0.0.1a0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page