RthItalia/nano_compact_3b_qkvfp16 is the validated compact self-contained variant derived from Qwen/Qwen2.5-3B-Instruct.
This release is not the old overlay artifact zip. It is the final exported Hugging Face folder that loads directly with transformers plus trust_remote_code=True.
What This Variant Is
This runtime uses a mixed policy:
q_proj, k_proj, v_proj: fp16
o_proj and most of the remaining body: Nano compact format
model.embed_tokens: quantized single copy
lm_head: tied custom head over the quantized embeddings
The goal of this policy is practical balance between:
disk size
VRAM footprint
quality relative to the true 8bit baseline
Validated Runtime Envelope
model size: 2.3432 GB
allocated after load: 2.3432 GB
peak generation VRAM: about 2.44 GB
True 8bit baseline used for comparison:
allocated after load: 3.1703 GB
peak generation VRAM: about 3.21 GB
Quality Claim
The quality claim for this release is intentionally narrow:
it was compared against the true 8bit baseline on a small internal prompt suite
it is not claimed to match the full original model in every task
it is not claimed to outperform the base model
More aggressive variants reached better size or VRAM numbers, but failed the quality gate against the true 8bit reference. qkvfp16 was the first variant that restored acceptable behavior on the validation smoke suite while preserving a substantial memory advantage.
bitsandbytes is not required for this final exported winner variant at runtime.
Important Notes
trust_remote_code=True is required.
The custom runtime uses a NanoTiedHead implementation that ties output logits to the quantized embedding table without registering the embedding module twice.
Custom linear layers use chunked forward paths to keep peak VRAM under control.
Limitations
Validation was narrow and engineering-driven, not a full benchmark suite.
This release is specifically tuned around Qwen/Qwen2.5-3B-Instruct.
It should be treated as a compact experimental runtime artifact, not as a general scientific proof of broader architectural claims.
License Note
This release should be described as a dual-license or dual-layer research distribution.
Built with Qwen.
The intended reading is:
Qwen-derived materials retain the relevant Qwen Research License obligations
Nano-specific runtime, packaging, and documentation changes are additional repository-authored research components
For redistributed copies, keep:
LICENSE
NOTICE
clear indication of modified files where applicable
The Hugging Face metadata still stays at license: other because this is not accurately described by a single simple SPDX identifier.