Sheaf is a functional language for differentiable computation. It is inspired by Clojure and is designed to operate within the Python/JAX machine learning ecosystem.
Sheaf has three main goals:
- Clojure Paradigm: Homoiconicity (code is data), immutability and minimalist syntax.
- Native XLA Performance: Sheaf code runs on GPUs/TPUs through JAX.
- Seamless Interop with Python: Compiled to pure JAX functions natively callable from Python.
Sample code:
(defn transformer-block [x layer-p config]
(as-> x h
(-> h ;; 1. Self-Attention
(layer-norm (get layer-p :ln1) 2)
(multi-head-attention layer-p config)
(first) ;; Attention output
(+ h)) ;; Residual 1
(-> h ;; 2. MLP
(layer-norm (get layer-p :ln2) 2)
(mlp (get layer-p :mlp))
(+ h)))) ;; Residual 2
Python interoperability
from sheaf import Sheaf
shf = Sheaf("mlp.shf")
for x, y in zip(X, shf.forward(X, params)):
print(f" {x} -> {y[0]:.3f}")
Metadata
Release files for sheaf-lang 1.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sheaf_lang-1.2.0.tar.gz | 79.0 kB | Without provenance | Details for sheaf_lang-1.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sheaf_lang-1.2.0-py3-none-any.whl | Python 3 | none | any | Details for sheaf_lang-1.2.0-py3-none-any.whl |
Total release size: 161.3 kB
Release files / sheaf_lang-1.2.0.tar.gz
| Download URL | sheaf_lang-1.2.0.tar.gz |
|---|---|
| Size | 79.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
54bfd3b38314f874a5958d909d34e0c068e4bc04808b2cb2a3a6f5815b96ae29
|
|
BLAKE2b-256 checksum How to use checksums |
ff08d73cb62bc2e9156e8d906bb1d9596d81952b4733c8d5b3535ca66647b44b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.2
|
Release files / sheaf_lang-1.2.0-py3-none-any.whl
| Download URL | sheaf_lang-1.2.0-py3-none-any.whl |
|---|---|
| Size | 82.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7e7fbab6f2251bf420daff31882c94740efd63c7bbadfdf659afb2dfde537986
|
|
BLAKE2b-256 checksum How to use checksums |
e47d87719dc20b610c8708749c6c9708489553d1f989cfd3bb7449801aa35543
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.2
|
Security for sheaf-lang 1.2.0
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.