Scale computed at runtime:
absmax / FP8_E4M3_MAX
per token (row)
No activation scales stored in checkpoint
KV Cache
:
Not quantized
(remains in original precision)
Quantization Format
:
compressed-tensors
(
float-quantized
)
Ignored Layers
:
lm_head
only
Calibration Dataset
: CNN/DailyMail
Calibration Samples
: 512
vLLM CUTLASS FP8 Kernel
This model is optimized for the vLLM CUTLASS FP8 kernel, which fuses dequantization into the GEMM epilogue:
D[m,n] = a_scale[m] * b_scale[n] * fp8_accum[m,n]
a_scale[m]
: per-token activation scale (computed dynamically at runtime)
b_scale[n]
: per-channel weight scale (stored in checkpoint)
fp8_accum[m,n]
: FP8 x FP8 accumulated result
Model Size
Original Model
: ~16GB (FP16)
Quantized Model
: ~8.5GB (FP8 W8A8)
Compression Ratio
: ~1.9x
Usage
Installation
pip install vllm>=0.6.0
With vLLM
from vllm import LLM, SamplingParams
# Load the FP8 W8A8 quantized model
llm = LLM(
model="JongYeop/Llama-3.1-8B-Instruct-FP8-W8A8-Dynamic-Per-Token",
)
# 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-8B-Instruct-FP8-W8A8-Dynamic-Per-Token")
model = AutoModelForCausalLM.from_pretrained(
"JongYeop/Llama-3.1-8B-Instruct-FP8-W8A8-Dynamic-Per-Token",
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
FP8 W8A8 Dynamic Per-Token quantization provides:
~2x memory reduction
compared to FP16
Faster inference
with FP8-capable hardware (e.g., NVIDIA H100, Ada Lovelace)
Better accuracy than per-tensor
due to fine-grained per-token activation scaling
Per-channel weight quantization
preserves weight distribution per output channel
Quantization Recipe
The quantization recipe used for this model is included in the repository as
recipe.yaml
.
Key configuration:
quant_stage:quant_modifiers:QuantizationModifier:ignore: ["lm_head"]
config_groups:group_0:weights:num_bits:8type:float# FP8 E4M3strategy:channel# Per-channel (one scale per output channel)dynamic:falsesymmetric:trueinput_activations:num_bits:8type:float# FP8 E4M3strategy:token# Per-token (one scale per row)dynamic:true# Scales computed at runtimesymmetric:truetargets: ["Linear"]
Llama-3.1-8B-Instruct-FP8-W8A8-Dynamic-Per-Token huggingface.co is an AI model on huggingface.co that provides Llama-3.1-8B-Instruct-FP8-W8A8-Dynamic-Per-Token's model effect (), which can be used instantly with this JongYeop Llama-3.1-8B-Instruct-FP8-W8A8-Dynamic-Per-Token model. huggingface.co supports a free trial of the Llama-3.1-8B-Instruct-FP8-W8A8-Dynamic-Per-Token model, and also provides paid use of the Llama-3.1-8B-Instruct-FP8-W8A8-Dynamic-Per-Token. Support call Llama-3.1-8B-Instruct-FP8-W8A8-Dynamic-Per-Token model through api, including Node.js, Python, http.
Llama-3.1-8B-Instruct-FP8-W8A8-Dynamic-Per-Token huggingface.co is an online trial and call api platform, which integrates Llama-3.1-8B-Instruct-FP8-W8A8-Dynamic-Per-Token's modeling effects, including api services, and provides a free online trial of Llama-3.1-8B-Instruct-FP8-W8A8-Dynamic-Per-Token, you can try Llama-3.1-8B-Instruct-FP8-W8A8-Dynamic-Per-Token online for free by clicking the link below.
JongYeop Llama-3.1-8B-Instruct-FP8-W8A8-Dynamic-Per-Token online free url in huggingface.co:
Llama-3.1-8B-Instruct-FP8-W8A8-Dynamic-Per-Token is an open source model from GitHub that offers a free installation service, and any user can find Llama-3.1-8B-Instruct-FP8-W8A8-Dynamic-Per-Token on GitHub to install. At the same time, huggingface.co provides the effect of Llama-3.1-8B-Instruct-FP8-W8A8-Dynamic-Per-Token install, users can directly use Llama-3.1-8B-Instruct-FP8-W8A8-Dynamic-Per-Token installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
Llama-3.1-8B-Instruct-FP8-W8A8-Dynamic-Per-Token install url in huggingface.co: