Skip to content

Releases: defai-digital/axquant

v1.6.1

Choose a tag to compare

@github-actions github-actions released this 08 Aug 16:01

Fixed

  • Fused expert shape derivation no longer treats an even Qwen expert count
    as DeepSeek dual w1+w3 gate concat. Multiplicity is taken from
    per-index membership in the fused member list (DeepSeek gate still uses
    multiplicity 2).
  • fused_expert_module skips integrated mtp.* experts, matching
    fused_expert_tensor_target, so the quant predicate does not invent
    mtp.*.switch_mlp.* modules for byte-preserved MTP sidecars.
  • HyperConnection / HyperHead learnable .scale paths no longer expand to
    .scales aliases (avoids ambiguous converted-tensor binding).
  • Qwen exact MTP benchmark profile fails closed when the profile contract is
    not met (no silent mismatch).

Notes / operators

  • Patch over v1.6.0 DeepSeek V4 development convert support. No migration for
    existing non-DeepSeek artifacts.
  • DeepSeek convert still needs an mlx-lm build with deepseek_v4; packs
    remain development evidence only.

v1.6.0

Choose a tag to compare

@github-actions github-actions released this 08 Aug 15:42

Added

  • DeepSeek V4 (model_type=deepseek_v4) as a development-convertible MoE
    family: inspect, plan-manual, and convert on mixed FP4+FP8 Flash sources via
    dequant → affine re-pack under the plan predicate.
  • Experimental 2-bit / 3-bit manual recipes for Flash
    (examples/deepseek-v4-experimental-{2,3}bit-v0.1.yaml).
  • Development model-card product classes for 2bit / 3bit (and
    *-experimental variants).

Changed

  • Convert path handles DeepSeek V4 sanitizer renames: HC tensors, shared-expert
    w1/w2/w3 → proj names, router ffn.gate.biase_score_correction_bias,
    FusedSwitchGLU gate+up fuse, and MultiLinear wo_a reshape.
  • Inventory reconstructs logical parameters for FP4 expert bodies packed in
    I8/U8 (expert_dtype: fp4); HyperConnection learnable .scale is not
    treated as quant metadata.
  • Integrated MTP is byte-preserved into mtp.safetensors without MLX expert
    fusion; protected-MTP verify allows native source packing (including FP4).
  • Convert dequants leftover QuantizedMultiLinear modules that public
    mlx_lm.utils.dequantize_model skips (DeepSeek attn.wo_a).

Notes / operators

  • DeepSeek V4 conversion needs an mlx-lm build that ships
    mlx_lm.models.deepseek_v4 (not all PyPI 0.31.x wheels). See
    docs/compatibility.md.
  • Published Flash packs are development evidence only (not certified).
    2-bit / 3-bit remain experimental; measured BPW is higher than the product
    class because of protected tensors and MTP.
  • No migration step for existing non-DeepSeek artifacts or plans.

v1.5.1

Choose a tag to compare

@github-actions github-actions released this 07 Aug 20:34

Fixed

  • Ext4T layout planner no longer schedules rename_or_move /
    rename_to_canonical when a basename is a name-conflict (same name,
    different content) or when another action already claims the destination
    path, so executing a plan cannot clobber a distinct package.
  • Ext4T preferred_location classifies axquant/logs and axquant/scripts
    before name heuristics (smoke/tmp/candidate), and host_local also
    follows the source logs category, so operational log trees stay
    non-fleet-synced and non-deleteable.
  • Ext4T package indexing skips package-root symlinks (and marks a direct
    symlink fingerprint incomplete) so content hashing cannot collide with
    the real tree and schedule deleting the target while keeping a dangling
    link.
  • Coding-suite and general-holdout overlap now use
    axquant-token-5gram-v2 (same CJK-aware tokenization as
    campaign-overlap), so pure non-ASCII records no longer collapse to
    empty strings and false-positive exact matches. Coding suite manifests
    must be regenerated.
  • GPTQ column encoding uses the joint round(w/s + z) form shared with
    AWQ/portable affine (fixes banker's-rounding half-integer disagreements
    with round(w/s)+z), and the standalone GPTQ plugin packs codes at
    float16 storage scale.

v1.5.0

Choose a tag to compare

@github-actions github-actions released this 07 Aug 16:15

Changed

  • The flagship formal-host identifier is now df-macbookpro-m5 (was
    mbp-m5), following the owner's canonical DNS naming for the certification
    machine (df-macbookpro-m5.defai.digital, Apple M5 Max MacBook Pro). The
    identifier is a schema literal on the formal host contract, host evidence,
    preflight, reproduction review, and hardware authorization records; it is
    the mandatory certified-claim hardware scope id, the required
    hardware-df-macbookpro-m5 archive record name, and the exact string
    campaign-preflight compares against the machine's live hostname. No
    campaign was ever frozen and no claim was ever rendered under the old id,
    so nothing published or bound is invalidated. Documents and audits citing
    mbp-m5 as the formal host now read df-macbookpro-m5.

v1.4.1

Choose a tag to compare

@github-actions github-actions released this 07 Aug 04:40

Fixed

  • campaign-overlap --id-field is now repeatable and tried in order per
    record (default id, then task_id), so one overlap run can span
    mixed-schema campaign datasets — calibration corpora keyed by id
    alongside strict QualityTask suites keyed by task_id. Previously a
    single id field applied to every file, and no field exists in both
    shapes: QualityTask (extra="forbid") rejects an added id, and the
    frozen calibration dataset cannot gain a task_id without invalidating
    its digest bindings. Reports are unchanged (record ids never leave the
    loader), so existing overlap reports stay reproducible.

v1.4.0

Choose a tag to compare

@github-actions github-actions released this 06 Aug 23:55

Install

Install this release from PyPI: axquant 1.4.0.

Fixed

  • campaign-overlap normalization now tokenizes non-ASCII scripts
    (axquant-token-5gram-v2): ASCII word runs stay whole tokens and every
    other letter (CJK, Kana, Hangul, accented Latin) becomes a
    single-character token, so shingles exist for unspaced scripts. The v1
    normalizer dropped every non-[a-z0-9_] character, which made any
    CJK-only record — including the shipped reference calibration
    dataset's multilingual rows — fail closed with "normalizes to empty
    text" and blocked flagship campaign freezes. ASCII-only inputs produce
    byte-identical reports under v2; CampaignOverlapReport now records
    the v2 algorithm id. The Qwen3-Next coding-suite normalizer is
    unchanged.

Changed

  • Quantized MTP sidecars now emit AX Engine's executable MLX-packed layout
    (mlx-affine-packed-u32): mx.quantize uint32-packed codes plus BF16 group
    scales/biases under the engine's <base>.scales / <base>.biases key
    convention, each tensor verified by an mx.dequantize round trip against
    the BF16-cast source. This replaces the 1.3.0 axquant-portable-affine-u8
    format, which no runtime could execute (the capability gate always refused,
    so no artifact was ever produced in it). Reading the engine's
    mtp_take_weight loader showed the executable contract already exists —
    AXQuant now targets it instead of inventing a second layout.

Added

  • quantize-mtp-sidecar --runtime-json stamps mtp_sidecar_bits into
    mtplx_runtime.json (via annotate_mtp_runtime_sidecar_bits) so the engine
    dequantizes packed projections at the declared width instead of the 4-bit
    default; sidecar bits are restricted to the engine runtime contract
    (2/4/6/8).
  • The capability probe records the engine's reported supported_bits and
    packing when present (ax-engine mtp-capability output), and sidecar
    quantization fails closed when the requested bits or emitted packing fall
    outside the reported capability.
  • benchmark-kernels --from-ax-engine ingests the engine's
    ax-engine.kernel-latency-raw.v1 document (emitted by the new
    axquant-kernel-latency-probe microbench) into a host-scoped
    axquant.kernel-latency.v1 table with runtime=ax-engine entries; the
    planner's latency provider now infers the runtime from single-runtime
    tables, so engine tables plug into plan --latency-table directly.

Fixed

  • Quantized MTP sidecar bits are restricted to {4, 6, 8} — the intersection
    of the engine loader's tolerance with AXQuant's own mtp_sidecar_bits
    runtime contract. Previously a 2-bit sidecar could be produced that
    AXQuant's inspector and runtime validators would then reject.
  • benchmark-kernels --from-ax-engine refuses documents reporting packing
    methods the toolkit does not recognize instead of silently relabeling them
    as affine measurements.
  • annotate_mtp_runtime_sidecar_bits (and --runtime-json help) now states
    that stamping rewrites the file and therefore invalidates any recorded
    sha256 binding to the original — stamp packaging copies, not validated
    bundles.
  • KV serving-quality reports reject a boolean quantized_layers_active in
    the execution summary instead of counting true as one active layer.
  • The flagship M7 MTP-admissibility helper guards its own evidence loads
    (unreadable files become named gate issues if reached), and a regression
    test pins the audit-level contract: a damaged benchmark bundle aborts the
    whole audit with a named checksum error rather than emitting gate verdicts
    against a tampered evidence set.

v1.3.0

Choose a tag to compare

@automatosx automatosx released this 06 Aug 21:57

AXQuant v1.3.0

AXQuant 1.3.0 strengthens evidence-led post-training quantization on Apple Silicon. It adds
measured interaction and kernel-latency signals to planning, formalizes MTP A/B admissibility,
and keeps all new performance choices fail-closed when the required evidence is absent.

Highlights

  • Measured interaction selection. refine-select --interaction uses development-role
    measurements only and rejects formal-holdout or incomplete dataset provenance.
  • Kernel-latency-aware planning. benchmark-kernels records host-scoped decode/prefill
    latency, while plan --latency-table uses it only to break quality near-ties. Plans without a
    table retain their prior deterministic behavior.
  • Formal MTP evidence. MTP on/off comparisons must bind the same frozen host, controls,
    datasets, seeds, checkpoint, and zero-fallback execution before they can authorize a claim.
  • Opt-in quantized Qwen 3.6 MTP sidecar. quantize-mtp-sidecar preserves the existing
    byte-preserved default and requires a recorded passing AX Engine capability check before it can
    emit the portable-affine sidecar.
  • Measured KV serving-quality reports. The new report binds an exact executed per-layer KV
    plan to short- and long-context retention against BF16 KV.

Safety and compatibility

  • Experimental 2/3-bit assignments are limited to robust MLP/expert projections; attention and
    protected roles retain 4-bit-or-higher candidates.
  • Converted-checkpoint verification now accepts only documented MLX output identity transforms
    and remains fail-closed on membership, precision, parameter-count, metadata, or shape drift.
  • Qwen3-ASR and Qwen3-VL paths have stricter normalization, backend, and media-generation smoke
    checks.
  • Existing serialized plans preserve their recorded hardware-profile semantics. Re-plan to opt
    into the new ax-engine-apple-silicon-affine-dwq-v3 defaults and gptq-act method.

Installation

Download the wheel below and install it with:

python -m pip install axquant-1.3.0-py3-none-any.whl

Or install the immutable tag directly:

python -m pip install "axquant @ git+https://github.com/defai-digital/axquant.git@v1.3.0"

Verification

Download SHA256SUMS.txt alongside the wheel or sdist and verify it with:

shasum -a 256 -c SHA256SUMS.txt

The tag points to commit d35b19453f9077e00d0654f2e22de8a257b696fa.

Availability

PyPI publishing remains intentionally gated until the project’s Trusted Publisher is configured.
The release assets below are the canonical v1.3.0 distributions.

For the complete change list, see CHANGELOG.md.

v1.2.0

Choose a tag to compare

@github-actions github-actions released this 05 Aug 04:37

Added

  • analyze --capture-points: measured probing on plain dense backbones (MiniCPM5, Qwen3 dense,
    Mistral, …) via --capture-points output; the default ("output", "hidden") fails closed
    with a hint on those layouts.
  • refine --lm-head-floor, matching plan; the governed 8bit path still requires measured
    support.
  • Structured mtp_sidecar_bits runtime contracts in copied (byte-preserved) MTP sidecar
    metadata.
  • New evaluation task categories: JSON, tool-use, multilingual, and long-context.

Changed

  • Calibration evidence is checksum-bound end to end: AWQ/GPTQ analysis records the
    activation-capture manifest digest, tokenized-cache manifest digest, cache key, and dataset
    ID; the planner carries the bindings; conversion rejects a mismatched capture and packages
    activation_capture_manifest.json with the checkpoint; publication preparation and release
    audit independently revalidate it.
  • Completed capture directories are immutable (completion.json present → no overwrite), and
    every committed resume chunk is validated against checkpoint row accounting.
  • scripts/hf_to_mlx_bf16.py requires --revision <40-char SHA>, converts into a staging
    directory, atomically renames on success, and writes axquant_source.json with the immutable
    source identity.
  • Mixed-precision plans are labeled by target BPW instead of inheriting a flat storage-class
    name.

Fixed

  • Qwen3-Next adapter: fused switch_mlp/switch_glu 3-D weights now classify as expert.
    Pre-fix artifacts may have retained most expert weights at BF16 and must be regenerated.
  • Capture resume now fails closed on binding drift (model, cache, --max-rows, segments, token
    budget) instead of silently mixing runs.
  • AWQ/GPTQ convert-time refinement no longer crashes on bfloat16 module weights (the default
    dtype of real checkpoints).
  • Affine/DWQ/AWQ quantizers build the per-group grid from the float16-stored scale (rounded
    up, never down), restoring the documented ≤ scale/2 per-element round-trip bound.
  • plan/refine inject BF16 for policy-preserved tensors (norms, LM head, vision) when 16 is
    omitted from --bits, matching manual planning, instead of failing per tensor; manual
    tied-weight harmonization now refreshes scale/outlier strategies and stored BPW.
  • Feasibility audits require MTP evidence only from MTP-declaring architectures, making the
    Qwen3-Next direct-track N0 gate satisfiable with tool-produced reports.
  • Measured probe/KV-probe runs no longer abort when the calibration token count leaves a
    single-token trailing replay batch.
  • The kv-exec runtime check now fails when executed per-layer KV bits differ from the plan
    (previously reported but not enforced), and benchmark trial timeouts kill the whole
    AX Engine process group instead of orphaning the generation.
  • MTP benchmark aggregates pair numerators and denominators over counter-reporting trials
    only, instead of inflating effective_tokens_per_forward when some trials lack counters.
  • prepare_development_model_card sanitizes the manifest's calibration reference along with
    the plan's (local-path leak that also broke the release-audit M1 equality invariant).
  • Release audit records issues instead of crashing on wheels missing axquant/__init__.py,
    corrupt measurement-set or calibration files, and non-scalar benchmark metadata; hardware
    registry checks record all-failed raw benchmarks instead of raising.
  • --kv-default-bits rejects sub-policy-floor values (2/3) at parse time instead of failing
    late in planning.
  • scripts/hf_to_mlx_bf16.py writes the lm_head-synthesized shard aside and swaps atomically;
    saving onto the mmap-backed source silently corrupted every tensor in the shard.
  • Ext4T scripts: union-sync verification compares content only (mtime-only differences no
    longer deadlock syncs), empty-array expansions no longer crash stock macOS bash 3.2 under
    set -u, shell-config marker blocks no longer corrupt an rc file lacking a trailing
    newline, live log/publish directories are moved aside before migrate-and-delete, and
    --status/argument handling exit correctly.
  • Architecture-gate errors and inventory warnings name the adapter registry instead of
    hardcoding Qwen 3.6 (the checks were already registry-wide).
  • Ext4T planning treats axquant/logs packages as host-local: layout moves only — no
    cross-host mirroring, duplicate deletion, or fingerprint-driven renames of mutable log
    trees; index loading reports the exact file and line for corrupt or incomplete records.

See the v1.1.x → v1.2.0 migration guide for action items.

v1.1.1

Choose a tag to compare

@automatosx automatosx released this 03 Aug 15:28

AXQuant v1.1.1 is a stability release for the AWQ/GPTQ calibration path introduced in v1.1.0 — no new quantization algorithms. Certification remains evidence-gated; this release does not claim certified public model releases.

Fixed

  • BF16 capture crash: capture-activations failed on every real BF16 checkpoint because np.asarray rejects bfloat16 MLX buffers at the PEP 3118 check. Activations are now cast inside MLX before numpy export. Found by a real-model smoke on Mac Studio M2 Ultra; tiny fp32 fixtures never exercised it. Regression tests cover both the conversion and its premise.
  • GPTQ peak memory: Hessian accumulated in float32 (float64 only on factorization retry), diagonal damping without materializing identity matrices, group-level (not full-width) static grids, and prompt freeing of intermediates — measured 6.7 GB → 4.7 GB peak RSS at in = 8192 (−30%), identical numerical output.

Added

  • Resumable activation capture: segmented replay (--segment-batches) with a binding-verified capture_progress.json; an interrupted capture resumes byte-identically instead of starting over. Final artifacts are deflate-compressed, can be grouped into shard archives (--modules-per-shard), and load_capture_activations now fails closed without the completion.json marker.
  • Real-hardware integration tests: tests/test_integration_mac.py (marker integration, Apple Silicon only) drives tokenize → capture → measured AWQ/GPTQ probe → GPTQ plan → real mlx_lm.convert end to end, plus a resume byte-equality smoke. Run with pytest -m integration.
  • CI: macos-14 job runs the full MLX test suite on Apple Silicon; Ubuntu job runs ruff + mypy. README badge added.
  • Signed release artifacts: a v* tag workflow builds sdist/wheel, emits SHA256SUMS.txt, and signs dists with keyless Sigstore build-provenance attestation. Note: this workflow ships in v1.1.1 itself, so attestations begin with the next tag.
  • Docs: docs/migration-v1.1.md (v1.0.x → v1.1.x renames and state invalidation), docs/compatibility.md (environment matrix), docs/known-issues.md.

Verification

  • 528 tests passing locally (macOS arm64, Python 3.13, mlx 0.32.0) and on Mac Studio M2 Ultra (Python 3.12), including the new integration tests; ruff and strict mypy clean.
  • Real-model smoke on Mac Studio M2 Ultra (MiniCPM5-1B BF16, 168 modules): tokenized cache → activation capture → measured probe — mean task-loss delta at 4-bit: GPTQ 0.0000 vs affine 0.0015, the first real-model confirmation that the GPTQ refinement materially reduces measured degradation.

Known limitations carried forward

  • Measured probing through the CLI still defaults capture_points to ("output", "hidden"); plain dense backbones (non-multimodal layouts such as MiniCPM5/Qwen3-dense) only expose logits, so CLI measured probing on those families fails closed today. The library API accepts capture_points=("output",) and works (used by the smoke above). A CLI escape hatch is planned for a follow-up.
  • The v* release workflow ships in this tag, so signed dist attestations begin with the next release; v1.1.1 itself carries source artifacts only.

v1.1.0

Choose a tag to compare

@automatosx automatosx released this 03 Aug 07:12

AXQuant v1.1.0 adds GPTQ Hessian error-compensated quantization and completes the AWQ calibration path end to end. Certification remains evidence-gated; this release does not claim certified public model releases.

Added

  • GPTQ (src/axquant/gptq.py) — classic second-order error compensation (damped Cholesky, LazyBatchUpdates) as a weight pre-transform before portable MLX-LM affine packing; bits 2/3/4/6/8, group sizes 32/64/128. Registered as GptqPlugin in the numpy reference registry.
  • capture-activations — new pipeline stage that replays a verified tokenized calibration cache through the BF16 model and records per-module Linear input activations into a checksum-bound ActivationCaptureManifest (axquant.activation-capture.v1). load_capture_activations fails closed on model identity, shape, or checksum drift.
  • Measured AWQ/GPTQ probinganalyze --methods awq,gptq --calibration-activations <dir> produces measured AWQ/GPTQ candidates, with hardware costs normalized against the affine packing control.
  • Convert-time AWQ/GPTQ from the CLIconvert --calibration-activations <dir> loads the capture artifact and executes refinement before affine packing, with per-module execution records. This makes AWQ plans convertible end to end for the first time.
  • Planner integration — GPTQ in the default hardware profile, gptq-hessian scale strategy, role-policy ranking after AWQ for attention/MLP, GPTQ in the refine-awq-dwq ladder, and a GPTQ release-audit evidence kind.

Changed

  • The conversion calibration mapping is method-agnostic: convert_model(awq_activations=...) is renamed to calibration_activations= and shared by AWQ and GPTQ.
  • MLX probe backend version bumped (axquant-mlx-isolated-probe-v4v5); prior probe resume state is invalidated.
  • Packaging classifier reconsidered for the 1.x line: Beta is kept, as certified Hub model release evidence (MTP speed, size floors) remains open.

Verification

  • 516 tests passing, including MLX-gated end-to-end coverage of capture, measured AWQ/GPTQ probing, and GPTQ conversion; ruff check, ruff format --check, and strict mypy src clean.
  • On synthetic correlated-activation fixtures, GPTQ reduces output reconstruction error by roughly half versus plain RTN at 4-bit.