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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bananamendr-1.0.2.tar.gz.
File metadata
- Download URL: bananamendr-1.0.2.tar.gz
- Upload date:
- Size: 36.0 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ca35e32280734f640f2a91da95330ad66078961a088bd3dd67b1f84de11be7fc
|
|
| MD5 |
246368d24f8d0ebdea82fbe92be4056a
|
|
| BLAKE2b-256 |
721fd1ad68b23434c5db528b49b380cda883b1057d0dd6416e41a6247669f97d
|
File details
Details for the file bananamendr-1.0.2-cp39-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: bananamendr-1.0.2-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
451b82cf01961733bf8ee151ebd5f20cfab26aefecdc9aef7d4ed660642e7b23
|
|
| MD5 |
385045345a4bb91aea3b902d83588c50
|
|
| BLAKE2b-256 |
80e5e97d44b4e0ece23a2e03fd72270f61673c42240ba1e9915f9fe59ba3e3aa
|