neuralmagic / Meta-Llama-3-70B-Instruct-FP8-KV

huggingface.co
Total runs: 245
24-hour runs: 0
7-day runs: 0
30-day runs: 0
Model's Last Updated: June 27 2024
text-generation

Introduction of Meta-Llama-3-70B-Instruct-FP8-KV

Model Details of Meta-Llama-3-70B-Instruct-FP8-KV

Meta-Llama-3-70B-Instruct-FP8-KV

Model Overview

Meta-Llama-3-70B-Instruct quantized to FP8 weights and activations using per-tensor quantization, ready for inference with vLLM >= 0.5.0. This model checkpoint also includes per-tensor scales for FP8 quantized KV Cache, accessed through the --kv-cache-dtype fp8 argument in vLLM.

from vllm import LLM
model = LLM(model="neuralmagic/Meta-Llama-3-70B-Instruct-FP8-KV", kv_cache_dtype="fp8")
result = model.generate("Hello, my name is")
Usage and Creation

Produced using AutoFP8 with calibration samples from ultrachat .

from datasets import load_dataset
from transformers import AutoTokenizer

from auto_fp8 import AutoFP8ForCausalLM, BaseQuantizeConfig

pretrained_model_dir = "meta-llama/Meta-Llama-3-70B-Instruct"
quantized_model_dir = "Meta-Llama-3-70B-Instruct-FP8-KV"

tokenizer = AutoTokenizer.from_pretrained(pretrained_model_dir, use_fast=True)
tokenizer.pad_token = tokenizer.eos_token

ds = load_dataset("mgoin/ultrachat_2k", split="train_sft")
examples = [tokenizer.apply_chat_template(batch["messages"], tokenize=False) for batch in ds]
examples = tokenizer(examples, padding=True, truncation=True, return_tensors="pt").to("cuda")

quantize_config = BaseQuantizeConfig(
    quant_method="fp8",
    activation_scheme="static",
    ignore_patterns=["re:.*lm_head"],
    kv_cache_quant_targets=("k_proj", "v_proj"),
)

model = AutoFP8ForCausalLM.from_pretrained(pretrained_model_dir, quantize_config)
model.quantize(examples)
model.save_quantized(quantized_model_dir)
Evaluation
Open LLM Leaderboard evaluation scores

Model evaluation results obtained via lm-evaluation-harness .

Benchmark Meta-Llama-3-70B-Instruct Meta-Llama-3-70B-Instruct-FP8 Meta-Llama-3-70B-Instruct-FP8-KV
(this model)
ARC-c
25-shot
72.69 72.61 72.57
HellaSwag
10-shot
85.50 85.41 85.32
MMLU
5-shot
80.18 80.06 79.69
TruthfulQA
0-shot
62.90 62.73 61.92
WinoGrande
5-shot
83.34 83.03 83.66
GSM8K
5-shot
92.49 91.12 90.83
Average
Accuracy
79.51 79.16 79.00
Recovery 100% 99.55% 99.36%

Runs of neuralmagic Meta-Llama-3-70B-Instruct-FP8-KV on huggingface.co

245
Total runs
0
24-hour runs
0
3-day runs
0
7-day runs
0
30-day runs

More Information About Meta-Llama-3-70B-Instruct-FP8-KV huggingface.co Model

Meta-Llama-3-70B-Instruct-FP8-KV huggingface.co

Meta-Llama-3-70B-Instruct-FP8-KV huggingface.co is an AI model on huggingface.co that provides Meta-Llama-3-70B-Instruct-FP8-KV's model effect (), which can be used instantly with this neuralmagic Meta-Llama-3-70B-Instruct-FP8-KV model. huggingface.co supports a free trial of the Meta-Llama-3-70B-Instruct-FP8-KV model, and also provides paid use of the Meta-Llama-3-70B-Instruct-FP8-KV. Support call Meta-Llama-3-70B-Instruct-FP8-KV model through api, including Node.js, Python, http.

Meta-Llama-3-70B-Instruct-FP8-KV huggingface.co Url

https://huggingface.co/neuralmagic/Meta-Llama-3-70B-Instruct-FP8-KV

neuralmagic Meta-Llama-3-70B-Instruct-FP8-KV online free

Meta-Llama-3-70B-Instruct-FP8-KV huggingface.co is an online trial and call api platform, which integrates Meta-Llama-3-70B-Instruct-FP8-KV's modeling effects, including api services, and provides a free online trial of Meta-Llama-3-70B-Instruct-FP8-KV, you can try Meta-Llama-3-70B-Instruct-FP8-KV online for free by clicking the link below.

neuralmagic Meta-Llama-3-70B-Instruct-FP8-KV online free url in huggingface.co:

https://huggingface.co/neuralmagic/Meta-Llama-3-70B-Instruct-FP8-KV

Meta-Llama-3-70B-Instruct-FP8-KV install

Meta-Llama-3-70B-Instruct-FP8-KV is an open source model from GitHub that offers a free installation service, and any user can find Meta-Llama-3-70B-Instruct-FP8-KV on GitHub to install. At the same time, huggingface.co provides the effect of Meta-Llama-3-70B-Instruct-FP8-KV install, users can directly use Meta-Llama-3-70B-Instruct-FP8-KV installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

Meta-Llama-3-70B-Instruct-FP8-KV install url in huggingface.co:

https://huggingface.co/neuralmagic/Meta-Llama-3-70B-Instruct-FP8-KV

Url of Meta-Llama-3-70B-Instruct-FP8-KV

Meta-Llama-3-70B-Instruct-FP8-KV huggingface.co Url

Provider of Meta-Llama-3-70B-Instruct-FP8-KV huggingface.co

neuralmagic
ORGANIZATIONS

Other API from neuralmagic