mgoin / Meta-Llama-3-8B-Instruct-pruned50-quant-ds

huggingface.co
Total runs: 3
24-hour runs: 0
7-day runs: -2
30-day runs: 1
Model's Last Updated: June 29 2024
text-generation

Introduction of Meta-Llama-3-8B-Instruct-pruned50-quant-ds

Model Details of Meta-Llama-3-8B-Instruct-pruned50-quant-ds

Llama 3 8B Instruct that has been compressed in one-shot to 50% sparsity and INT8 weights+activations using SparseGPT, SmoothQuant, and GPTQ.

Made with SparseML+DeepSparse=1.7. Install with pip install deepsparse~=1.7 "sparseml[transformers]"~=1.7 "numpy<2" .

Here is the script used for SparseML compression:

from datasets import load_dataset
from sparseml.transformers import (
    SparseAutoModelForCausalLM,
    SparseAutoTokenizer,
    load_dataset,
    compress,
)

model = SparseAutoModelForCausalLM.from_pretrained(
    "meta-llama/Meta-Llama-3-8B-Instruct", device_map="auto"
)
tokenizer = SparseAutoTokenizer.from_pretrained("meta-llama/Meta-Llama-3-8B-Instruct")
dataset = load_dataset("garage-bAInd/Open-Platypus")


def format_data(data):
    instruction = tokenizer.apply_chat_template(
        [{"role": "user", "content": data["instruction"]}],
        tokenize=False,
        add_generation_prompt=True,
    )
    return {"text": instruction + data["output"]}


dataset = dataset.map(format_data)

recipe = """
compression_stage:
    run_type: oneshot
    oneshot_modifiers:
        QuantizationModifier:
            ignore:
                # These operations don't make sense to quantize
                - LlamaRotaryEmbedding
                - LlamaRMSNorm
                - SiLUActivation
                - QuantizableMatMul
                # Skip quantizing the layers with the most sensitive activations
                - model.layers.1.mlp.down_proj
                - model.layers.31.mlp.down_proj
                - model.layers.14.self_attn.q_proj
                - model.layers.14.self_attn.k_proj
                - model.layers.14.self_attn.v_proj
            post_oneshot_calibration: true
            scheme_overrides:
                # Enable channelwise quantization for better accuracy
                Linear:
                    weights:
                        num_bits: 8
                        symmetric: true
                        strategy: channel
                # For the embeddings, only weight-quantization makes sense
                Embedding:
                    input_activations: null
                    weights:
                        num_bits: 8
                        symmetric: false
        SparseGPTModifier:
            sparsity: 0.5
            quantize: True
            targets: ['re:model.layers.\\d*$']
"""

compress(
    model=model,
    tokenizer=tokenizer,
    dataset=dataset,
    recipe=recipe,
    output_dir="./one-shot-checkpoint",
)

Runs of mgoin Meta-Llama-3-8B-Instruct-pruned50-quant-ds on huggingface.co

3
Total runs
0
24-hour runs
0
3-day runs
-2
7-day runs
1
30-day runs

More Information About Meta-Llama-3-8B-Instruct-pruned50-quant-ds huggingface.co Model

Meta-Llama-3-8B-Instruct-pruned50-quant-ds huggingface.co

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

Meta-Llama-3-8B-Instruct-pruned50-quant-ds huggingface.co Url

https://huggingface.co/mgoin/Meta-Llama-3-8B-Instruct-pruned50-quant-ds

mgoin Meta-Llama-3-8B-Instruct-pruned50-quant-ds online free

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

mgoin Meta-Llama-3-8B-Instruct-pruned50-quant-ds online free url in huggingface.co:

https://huggingface.co/mgoin/Meta-Llama-3-8B-Instruct-pruned50-quant-ds

Meta-Llama-3-8B-Instruct-pruned50-quant-ds install

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

Meta-Llama-3-8B-Instruct-pruned50-quant-ds install url in huggingface.co:

https://huggingface.co/mgoin/Meta-Llama-3-8B-Instruct-pruned50-quant-ds

Url of Meta-Llama-3-8B-Instruct-pruned50-quant-ds

Meta-Llama-3-8B-Instruct-pruned50-quant-ds huggingface.co Url

Provider of Meta-Llama-3-8B-Instruct-pruned50-quant-ds huggingface.co

mgoin
ORGANIZATIONS

Other API from mgoin

huggingface.co

Total runs: 351
Run Growth: 67
Growth Rate: 19.09%
Updated:February 07 2025
huggingface.co

Total runs: 15
Run Growth: 3
Growth Rate: 20.00%
Updated:September 30 2023