Metadata-Version: 2.4
Name: padic-ml
Version: 0.0.1
Summary: JAX library for differentiable training of p-adic neural networks
Author: Padic ML Authors
License-Expression: Apache-2.0
Project-URL: Homepage, https://github.com/google-deepmind/padic-ml
Project-URL: Repository, https://github.com/google-deepmind/padic-ml
Keywords: jax,p-adic,berkovich,machine learning,optimization
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Scientific/Engineering :: Mathematics
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: jax
Requires-Dist: jaxtyping
Requires-Dist: sympy
Provides-Extra: test
Requires-Dist: absl-py; extra == "test"
Requires-Dist: numpy; extra == "test"
Dynamic: license-file

# padic-ml

**WORK IN PROGRESS. Paper code is being refactored into this library.
Thanks for your patience!**

This is a JAX library for differentiable training of _p_-adic neural networks,
implementing methods described in *Continuous Optimization for p-adic Models*
(arXiv 2026).

Install with `pip install padic-ml`.

**Disclaimer:** This is not an officially supported Google product.

## Usage

`PArray` is an array primitive for "learnable" _p_-adic numbers (points in the _p_-adic injective hull $\Gamma_p$ in Berkovich space).

With radius 0 (no second argument), these become ordinary _p_-adic numbers $\mathbb{Q}_p$.

```python
>>> import padic_ml as pml
>>> p1 = pml.array([3, 4], radius=[1, 3], p=3)
>>> p2 = pml.array([7, 1], p=3)
>>> p1*p2
PArray(unit=Array([7, 4], dtype=int32), valuation=Array([1, 0], dtype=int32), log_radius=Array([0., 1.], dtype=float32), p=3)
```
