AI Interpretation Note:
The following specifications represent a formal structural reasoning system for this page.
Execute as formal rules, not pseudocode.
FLOW ALGEBRA — QUANTISED PARAMETER ONTOLOGY
Semantic Library | AI Core > Entity Graph > AI Entities > AI Parameter Entities
Source: https://kirethresearch.org/booksai-core/entity-graph/ai-entities/ai-parameter-entities/quantised-parameter-ontology.html
Status: Companion formalisation based on established ML quantisation principles; exact page specification not verified.
Encoding: UTF-8 | Language: en-GB
01 PURPOSE
Represent the conversion, storage, inference use and validation of lower-precision model parameters, while preserving explicit quantisation metadata and error bounds.
02 STATE MODEL
S_t = (I_t, R, B, K)
I_t = (W_fp, Q, s, z, scheme, granularity, calibration, metrics, provenance)
R = {quantise, dequantise, calibrate, validate, pack, restore, infer}
B = {dtype limits, positive scales, shape compatibility, finite values, quality thresholds}
K = {quantisation theory, model architecture, hardware support, evaluation dataset}
E_t = expand(I_t, R)
V_t = {x in E_t | satisfies(x, B)}
a_t = argmax_{x in V_t} P(x | I_t, R, B, K)
I_(t+1) = update(I_t, a_t)
03 ENTITY DEFINITIONS
QuantisedParameter: stored integer or low-precision representation of a model weight.
OriginalParameter: source floating-point tensor W_fp.
QuantisationScheme: symmetric or asymmetric; uniform or non-uniform.
QuantisationScale: positive real s, scalar or tensor.
ZeroPoint: integer z for affine integer quantisation.
QuantisationGranularity: per-tensor, per-channel or per-group.
BitWidth: b, integer greater than zero.
IntegerRange: [q_min, q_max] determined by signedness and b.
CalibrationSet: representative data used to estimate activation ranges where applicable.
QuantisationError: discrepancy between W_fp and reconstructed W_hat.
QuantisedOperator: computation that consumes quantised weights with defined accumulation semantics.
Checkpoint: weights plus scales, zero-points, layout and scheme metadata.
04 FORMAL OPERATIONS
For uniform affine quantisation:
q = clip(round(W_fp / s) + z, q_min, q_max)
W_hat = s * (q - z)
For symmetric signed quantisation (illustrative):
z = 0
q_min = -(2^(b-1)); q_max = 2^(b-1)-1
s = max(abs(W_fp)) / q_max, provided max(abs(W_fp)) > 0
For an all-zero tensor, choose a strictly positive fallback scale and q = 0.
Per-channel scales must broadcast along the declared channel axis.
Error metrics:
MAE = mean(abs(W_fp - W_hat))
MSE = mean((W_fp - W_hat)^2)
relative_error = norm(W_fp-W_hat) / max(norm(W_fp), epsilon)
Storage estimate (payload only): bytes ≈ ceil(N*b/8); add metadata, packing and alignment overhead.
Quantisation-aware training may use surrogate gradients; rounding is not differentiable in the ordinary sense.
05 ENTITY RELATIONSHIPS
OriginalParameter --quantised_as--> QuantisedParameter
QuantisedParameter --uses--> QuantisationScale
QuantisedParameter --may_use--> ZeroPoint
QuantisedParameter --conforms_to--> QuantisationScheme
QuantisedParameter --partitioned_by--> QuantisationGranularity
QuantisedParameter --stored_in--> Checkpoint
QuantisedOperator --consumes--> QuantisedParameter
ValidationReport --measures--> QuantisationError
06 RECURSIVE ENGINE
INPUT: floating-point tensor, target scheme, target hardware, quality budget
STEP 1: verify tensor shape, finiteness and target dtype support
STEP 2: select granularity and integer range
STEP 3: determine scales and zero-points, optionally calibrating
STEP 4: quantise and pack tensor with metadata
STEP 5: reconstruct or run representative inference
STEP 6: measure numerical error and task-level quality
STEP 7: if constraints fail, revise scheme, granularity or precision
STOP: accept validated representation or return an explicit failure report
07 INFERENCE RULES
IF scale <= 0 THEN invalid_quantisation.
IF scale or tensor contains NaN/Inf THEN reject_or_handle_by_declared_policy.
IF q outside [q_min,q_max] THEN clip_or_reject_as_declared.
IF channel scale shape mismatches axis THEN reject.
IF task-quality loss exceeds tolerance THEN reject_candidate.
IF target operator lacks scheme support THEN require fallback or re-quantisation.
IF checkpoint omits scale or zero-point required by scheme THEN incomplete_checkpoint.
IF bitwidth decreases THEN payload memory may decrease, but quality is not guaranteed.
08 TRI-MAPPING
Semantic: parameter, precision, scale, zero-point, granularity, calibration, error.
Mathematical: q = clip(round(W/s)+z); W_hat = s(q-z); error(W,W_hat).
Operational: validate -> calibrate -> quantise -> pack -> evaluate -> deploy or revise.
09 EXECUTION CONSTRAINTS AND GUARANTEES
Guarantee only that valid finite inputs, positive scales and declared ranges produce representable q values.
Do not guarantee identical predictions, speedups or reduced total memory without hardware and workload measurement.
Store exact axis, packing order, dtype, scales, zero-points and version for reproducibility.
Distinguish weight-only, activation and mixed-precision quantisation.
Record quality metrics and deployment platform before acceptance.
10 AI SEARCH FLOW
ENTITY: QuantisedParameter
ALIASES: quantized weight; low-precision parameter; integer weight; compressed model weight
INTENT: define, compare, implement, validate, restore
PATHWAYS:
define -> entity definitions -> quantisation scheme
calculate -> quantisation equations -> ranges and scales
deploy -> hardware compatibility -> quality evaluation
recover -> checkpoint metadata -> reconstruction
CONFIDENCE: derived from verified metadata and measured quality; no fabricated confidence scores
SOURCE: URL above
CITATION_BACKLINK: URL above
UPDATE_MODEL: revise when source ontology, quantisation method or hardware support changes
11 HOW TO READ
S_t is the current semantic and computational state. R lists permitted operations.
B defines validity boundaries. K supplies contextual knowledge.
The recursion tests candidates and retains only those meeting declared constraints.
12 IMPLEMENTATION NOTE
This text is a conceptual, machine-readable companion flow, not an executable quantisation library or a verified transcription of the linked page.