Note
: This model quantizes
Weights and Activations to FP4
. KV cache is
NOT
quantized and remains in
bf16
(original precision).
Quantization Details
Quantization Method
: NVFP4 W4A4 (Weight and Activation only)
Weight Precision
: FP4 (4-bit floating point)
Per-tensor global scales + Per-group (size 16) local quantization scales
Activation Precision
: FP4 (4-bit floating point)
Per-tensor scales with dynamic local quantization
KV Cache
:
bf16
(not quantized, remains in original precision)
Quantization Scheme
: NVFP4 (NVIDIA FP4 format)
Ignored Layers
:
lm_head
only
Calibration Dataset
: CNN/DailyMail
Calibration Samples
: 512
Model Size
Original Model
: ~140GB (bf16)
Quantized Model
: ~40GB (NVFP4 W4A4)
Compression Ratio
: ~3.5x
Usage
Installation
pip install vllm>=0.6.0
With vLLM
from vllm import LLM, SamplingParams
# Load the NVFP4 W4A4 quantized model
llm = LLM(
model="JongYeop/Llama-3.1-70B-Instruct-NVFP4-W4A4",
quantization="fp4"# or "nvfp4"
)
# Generate text
prompts = ["Hello, my name is"]
sampling_params = SamplingParams(temperature=0.7, top_p=0.9, max_tokens=100)
outputs = llm.generate(prompts, sampling_params)
for output in outputs:
print(output.outputs[0].text)
With Transformers (for inspection)
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("JongYeop/Llama-3.1-70B-Instruct-NVFP4-W4A4")
model = AutoModelForCausalLM.from_pretrained(
"JongYeop/Llama-3.1-70B-Instruct-NVFP4-W4A4",
device_map="auto"
)
messages = [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "What is the capital of France?"}
]
input_ids = tokenizer.apply_chat_template(messages, return_tensors="pt").to(model.device)
output = model.generate(input_ids, max_new_tokens=100)
print(tokenizer.decode(output[0], skip_special_tokens=True))
Performance
NVFP4 W4A4 quantization provides:
~3.5x memory reduction
compared to bf16
Faster inference
with FP4-capable hardware (e.g., NVIDIA H100, B200)
Higher compression
than FP8 while maintaining good accuracy
Efficient group-wise quantization
for weights (group size: 16)
Llama-3.1-70B-Instruct-NVFP4-W4A4 huggingface.co is an AI model on huggingface.co that provides Llama-3.1-70B-Instruct-NVFP4-W4A4's model effect (), which can be used instantly with this JongYeop Llama-3.1-70B-Instruct-NVFP4-W4A4 model. huggingface.co supports a free trial of the Llama-3.1-70B-Instruct-NVFP4-W4A4 model, and also provides paid use of the Llama-3.1-70B-Instruct-NVFP4-W4A4. Support call Llama-3.1-70B-Instruct-NVFP4-W4A4 model through api, including Node.js, Python, http.
Llama-3.1-70B-Instruct-NVFP4-W4A4 huggingface.co is an online trial and call api platform, which integrates Llama-3.1-70B-Instruct-NVFP4-W4A4's modeling effects, including api services, and provides a free online trial of Llama-3.1-70B-Instruct-NVFP4-W4A4, you can try Llama-3.1-70B-Instruct-NVFP4-W4A4 online for free by clicking the link below.
JongYeop Llama-3.1-70B-Instruct-NVFP4-W4A4 online free url in huggingface.co:
Llama-3.1-70B-Instruct-NVFP4-W4A4 is an open source model from GitHub that offers a free installation service, and any user can find Llama-3.1-70B-Instruct-NVFP4-W4A4 on GitHub to install. At the same time, huggingface.co provides the effect of Llama-3.1-70B-Instruct-NVFP4-W4A4 install, users can directly use Llama-3.1-70B-Instruct-NVFP4-W4A4 installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
Llama-3.1-70B-Instruct-NVFP4-W4A4 install url in huggingface.co: