qxgb
QXGBoost: quantized XGBoost Classifier for FPGA Deployment.
qxgb provides QXGBClassifier inheriting from xgboost.XGBClassifier with quantization aware training and registers the Alkaid tracer plugin for converting trained (Q)XGBoost boosters into RTL designs with Alkaid.
Installation
pip install qxgb
Quick Start
from qxgb import QXGBClassifier
model = QXGBClassifier(
scale=4,
bias=2,
n_estimators=32,
max_depth=3,
)
model.fit(X_train, y_train)
y_pred = model.predict(X_test)
hw_bst = model.ibooster() # Integer booster
from alkaid.converter import trace_model
from alkaid.trace import FVArray, trace
inp = FVArray.new(16).quantize(0, 8, 0).as_new()
_, out = trace_model(hw_bst, inputs=inp, mode='mux')
comb = trace(inp, out)
hw_pred = comb.predict(X_test) # == y_pred
Examples
Notebook examples are in examples/:
jsc.ipynbmnist.ipynbnid.ipynb
License
LGPLv3. See LICENSE.
Metadata
Release files for qxgb 0.1.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 | |
|---|---|---|---|---|
| qxgb-0.1.0.tar.gz | 16.8 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| qxgb-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 27.8 kB
Release files / qxgb-0.1.0.tar.gz
| Download URL | qxgb-0.1.0.tar.gz |
|---|---|
| Size | 16.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9b5e0a4702d3b9e6e0322f2bde56012bc2a9f5686e4be7d53d00fc28d19d2826
|
|
BLAKE2b-256 checksum How to use checksums |
ea760b9ad17df97f558568017cdef7f39c396b22bbab3a05f4f4f52b316cfc53
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 20, 2026.
Transparency logRelease files / qxgb-0.1.0-py3-none-any.whl
| Download URL | qxgb-0.1.0-py3-none-any.whl |
|---|---|
| Size | 11.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6d3752ada9cee3c02a3564a644520b8892ee31e4f32f4de00cfac240a0fc2463
|
|
BLAKE2b-256 checksum How to use checksums |
249c0b6c121db898afb5684cf924f976c33db475d01741cebb5d2891b1894a8e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 20, 2026.
Transparency logSecurity for qxgb 0.1.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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for qxgb-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 20, 2026.
Transparency logA 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.