EdgeRock-4B-NVFP4

EdgeRock's constant-memory reasoning architecture with packed NVFP4 weights.

This text checkpoint uses NVIDIA Model Optimizer's W4A16 NVFP4 format: E2M1 4-bit weights, one FP8 E4M3 scale per 16 values, and an FP32 global scale per matrix. Activations use BF16. The 256 large backbone and RMA linear matrices are quantized; the tied embedding/output head, admission networks, small recurrent gates, and normalization parameters retain their source precision. History capacities and RMA update rules are preserved.

Source: rockmatrix-ai/EdgeRock@a6a53a5573f1. See the EdgeRock project for the architecture, technical report, and visual frontend.

Package and validation

Item Result
Packed checkpoint size 3.504 GB
BF16 source checkpoint size 9.156 GB
Weight-file reduction 61.7%
Matrices matching NVIDIA Model Optimizer's decoder exactly 256/256
Unquantized tensors matching the source exactly 290
Arithmetic and long-context memory smoke checks 3/3
Fresh-process reload: maximum probe-logit difference 0

The Safetensors checkpoint contains packed 4-bit data and scales. validation.json records prompts, generated answers, and test settings. These conversion checks do not replace the source model's full benchmark evaluation.

Load on a CUDA GPU

The included reference loader expands NVFP4 weights to BF16 once during loading and executes EdgeRock's original architecture. File size is therefore smaller than runtime weight memory. This path was validated on a Hopper GPU; it does not benchmark native FP4 kernels or establish Blackwell runtime compatibility for EdgeRock's custom RMA layers.

python -m pip install -r requirements.txt
import sys
from huggingface_hub import snapshot_download
from transformers import AutoTokenizer

folder = snapshot_download("hkust-aaron/EdgeRock-4B-NVFP4")
sys.path.insert(0, folder)
from load_nvfp4 import load_nvfp4

tokenizer = AutoTokenizer.from_pretrained(folder, trust_remote_code=True)
model = load_nvfp4(folder)
text = tokenizer.apply_chat_template(
    [{"role": "user", "content": "Calculate 17 * 23. Give only the answer."}],
    tokenize=False, add_generation_prompt=True,
)
inputs = tokenizer(text, return_tensors="pt", add_special_tokens=False).to("cuda")
output = model.generate(**inputs, max_new_tokens=2048, do_sample=False)
print(tokenizer.decode(output[0, inputs.input_ids.shape[1]:], skip_special_tokens=True))

Use the included loader for this validated reference path. Generic AutoModelForCausalLM.from_pretrained runtime support for EdgeRock's NVFP4 checkpoint has not been validated.

Reproduce the conversion

Download the pinned source revision and run the included converter on a CUDA GPU:

python quantize.py --source /path/to/EdgeRock --output /path/to/EdgeRock-4B-NVFP4

The converter uses Model Optimizer 0.47.0's W4A16_NVFP4_CFG and export_hf_checkpoint. nvfp4_config.json lists quantized modules; hf_quant_config.json retains the official export configuration. Source revision, file hashes, and package versions are recorded in provenance.json.

License

Weights retain the EdgeRock Model License 1.0; code retains Apache-2.0. See NOTICE for source notices. Changes comprise NVFP4 weight quantization, conversion and reference-loading scripts, and packaged generation settings.

Downloads last month
15
Safetensors
Model size
3B params
Tensor type
BF16
·
U8
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for hkust-aaron/EdgeRock-4B-NVFP4

Quantized
(16)
this model

Collection including hkust-aaron/EdgeRock-4B-NVFP4