needle-rs
Copyright (c) 2026 Abdalrahman Ibrahim

This product is licensed under the MIT License; see LICENSE.

--------------------------------------------------------------------------
Relationship to the upstream Needle project
--------------------------------------------------------------------------

needle-rs is an independent re-implementation, in Rust, of the inference path
of Needle by Cactus Compute:

    https://github.com/cactus-compute/needle

That project is licensed under the Apache License, Version 2.0. needle-rs
contains **no source code** from it. The Rust implementation was written from
the upstream Python/JAX sources read as a specification, together with the
published paper and the shipped model containers; the correspondence is
verified numerically rather than by sharing code, and the parity fixtures
under `tests/` are generated by running upstream's own reference.

No file in this repository is a copy, translation or modification of an
upstream file, and no upstream file is redistributed in source or binary form.
The `needle/` directory, when present in a working tree, is an untracked local
checkout of the upstream repository used only to generate parity fixtures; it
is excluded from version control and from every published artifact.

--------------------------------------------------------------------------
Model weights
--------------------------------------------------------------------------

Model weights are **not** part of this distribution. They are downloaded by
the user from Cactus Compute's own repositories and carry their own terms:

    Needle 3   Cactus-Compute/needle3    Apache-2.0
    Needle 2   Cactus-Compute/needle2    MIT
    Needle 1   Cactus-Compute/needle     MIT

The one exception is the SafeTensors conversion of the Needle 1 checkpoint
hosted at `Abdalrahman/needle-rs-safetensors`, which is a format conversion of
upstream's Needle 1 weights and is redistributed under those weights' terms.
It exists because Needle 1 shipped as a Flax checkpoint that no Rust runtime
could read; Needle 2 and Needle 3 need no such conversion, because needle-rs
reads upstream's own `.cact` containers directly.

If you publish work that uses the models, cite the upstream paper — see the
Citation section of README.md.
