Skip to main content

bananamendr (Python)

Local CPU inference for the BananaMind-2 chat checkpoints — Nano, Mini and Pro (Preview) — with no PyTorch at runtime. The Rust core reads the published model.safetensors and tokenizer.json directly. One abi3 wheel serves every CPython ≥ 3.9.

Greedy decoding is token-exact against Hugging Face transformers.

This module takes paths only — it never downloads anything. For checkpoint fetching, a config file and an OpenAI-compatible server, install bananamendy.

pip install bananamendr
import bananamendr

model = bananamendr.Model("ref/BananaMind-2-Nano-Chat")
print(model.config["model_type"], model.config["num_hidden_layers"])

generation = model.chat(
    [{"role": "user", "content": "Why is the sky blue?"}],
    max_new_tokens=64,
    temperature=0.0,               # greedy; the Python API defaults to greedy
)
print(generation.text, generation.tokens_per_second)

# Streaming: the callback receives (decoded delta, token id) per step.
model.generate("Once upon a time", on_token=lambda text, token: print(text, end=""))

Also available: tokenize, detokenize, apply_chat_template, logits, generate_tokens.

License

Apache-2.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bananamendr-1.0.1.tar.gz (31.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bananamendr-1.0.1-cp39-abi3-macosx_11_0_arm64.whl (1.7 MB view details)

Uploaded CPython 3.9+macOS 11.0+ ARM64

File details

Details for the file bananamendr-1.0.1.tar.gz.

File metadata

  • Download URL: bananamendr-1.0.1.tar.gz
  • Upload date:
  • Size: 31.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for bananamendr-1.0.1.tar.gz
Algorithm Hash digest
SHA256 ff04e8820fd4edd2f91955e109484a71eb8d26c6cc094430b55abbe5d03fac21
MD5 b966e3d0e7c22cd0bca76ab4b74ea683
BLAKE2b-256 f79808172cfcce91a088cb1957ffdf904994a7ec2a25b43619d4b9d2dd84486b

See more details on using hashes here.

File details

Details for the file bananamendr-1.0.1-cp39-abi3-macosx_11_0_arm64.whl.

File metadata

  • Download URL: bananamendr-1.0.1-cp39-abi3-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 1.7 MB
  • Tags: CPython 3.9+, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for bananamendr-1.0.1-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5b156695ee21611badb96ac528400f46f94b1713143101a62f43d8fc939e1f12
MD5 1a075a7d5c763ecce56efc18913a2c96
BLAKE2b-256 5050e0985843eda06e786b1508a795aa8526512ef693dae48a09709131cca47b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page