Metadata-Version: 2.4
Name: gennova-box
Version: 0.1.3a1
Summary: GenNova native engine deployment on Linux/Ascend
Author: GenNova-HUST
License-Expression: LicenseRef-Proprietary
Project-URL: Homepage, https://gennova.sage.org.ai/
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: licenses/Qwen3-LICENSE.txt
Dynamic: license-file

# GenNova Box — Ascend 910C native binary preview

GenNova Box starts the **GenNova native inference engine** using
its canonical `gennova serve transformer` Solution. Model execution uses
GenNova's Ascend graph runtime, native scheduler and numerical/OPP payload.

## Installation

The launcher wheel targets CPython 3.9 / Linux aarch64. This release pairs
with `gennova==0.2.0`, the source-free native runtime tested with two physical
Ascend 910C dies on one dual-die board, with Qwen3-4B and Qwen3-32B BF16. Prepare a separate Python 3.12 / Linux
ARM64 / glibc 2.35+ runtime environment with matched Torch 2.10.0,
Torch-NPU 2.10.0.post4, Triton-Ascend 3.2.2, CANN 9.1 and ATB 9.1.
Read the runtime's PyPI page for its exact environment and supported scope.
Neither package provisions Torch, vendor SDKs, drivers or model weights.

```sh
python3.12 -m pip install gennova==0.2.0
python3.9 -m pip install gennova-box==0.1.3a1
gennova-box start --engine-python /path/to/gennova-runtime/bin/python
gennova-box status
gennova-box stop
```

Successful startup saves the runtime selection, so later `gennova-box start`
uses the same configuration. `GENNOVA_ENGINE_PYTHON` also selects the runtime.
`gennova-box doctor --engine-python /path/to/python` checks the installed
engine version, compiled source-tree/extension identities and complete Ascend native payload
without admitting inference work. A mismatched or absent runtime fails.

This native recipe uses **two idle, authorized physical Ascend 910C dies**
(default `--devices 0,1`), tensor parallel size 2, and Qwen3 4B BF16.
It downloads a pinned native safetensors checkpoint and tokenizer with SHA-256
verification. Hugging Face is tried first, then hf-mirror.com and ModelScope; all mirrors must match the same pinned SHA-256. Model weights
are not inside the wheel. `--checkpoint /path/to/Qwen3-4B` selects an existing
native checkpoint visible to the engine environment. Qwen3-32B BF16 is also
verified with the same TP2 serving configuration; use `--checkpoint /path/to/Qwen3-32B`
for a complete checkpoint at revision `9216db5781bf21249d130ec9da846c4624c16137`.
The default download remains Qwen3-4B. Cross-board TP topologies are unqualified.

## Local service

- API base: `http://127.0.0.1:18181/v1`; model: `gennova-local`.
- Key: `~/.local/share/gennova-box-ascend/api-key.txt`, owner-only permissions.
- Model, logs, settings and state: `~/.local/share/gennova-box-ascend/`;
  override with `GENNOVA_BOX_DATA`.
- Context 1024; one decode request; output ceiling 256; native model is BF16.
- Chat requests require `stream=true`, `temperature=0` and `n=1`; the native
  service supports streaming, greedy, single-completion text only. Nonstreaming
  requests are rejected with HTTP 400.
- Requests can set `chat_template_kwargs={"enable_thinking": false}`.
- CANN environment defaults to `/usr/local/Ascend/ascend-toolkit/set_env.sh`;
  override with `GENNOVA_CANN_ENV`.

GenNova itself owns authenticated HTTP, SSE, model loading, graph capture,
scheduling, execution and shutdown. Box owns the host process lease, physical
device locks, checkpoint preparation and readiness checks. The caller needs
permissions for the device nodes and `/var/lock/gennova-npu`. No startup-at-boot
service is installed. Closing the terminal leaves the service running; use
`gennova-box stop` to request authenticated native shutdown and release it.
Box allows 30 seconds for native drain, then uses bounded signal termination
if the process remains alive. Logs, models and keys are retained.

## Scope and distribution

This native preview replaces the incorrectly selected backend in 0.1.1a1.
Its Linux start path has no llama.cpp build, llama-server process, GGUF inference
or CPU fallback. Windows desktop migration is not part of this wheel.

The Box deployment implementation is Cython-compiled into a native extension;
its wheel contains no proprietary Python/C source or bytecode, and its build
rejects source distributions. Compilation raises reverse-engineering cost,
without guaranteeing source confidentiality. The separately installed GenNova
runtime has its own distribution and third-party license obligations.

This is bounded deployment functionality, not full accuracy, performance,
endurance or production certification. Optional State, D and Autotune
integrations are outside this preview's acceptance scope. Shared runtime State
used for model execution must not be confused with an optional external
GenNova State service. GenNova and Qwen3 retain their Apache-2.0 and
applicable third-party notices; the Box launcher distribution is proprietary.
