mgoin / Mixtral-8x7B-Instruct-v0.1-FP8

huggingface.co
Total runs: 4
24-hour runs: 0
7-day runs: 2
30-day runs: 4
Model's Last Updated: September 21 2024

Introduction of Mixtral-8x7B-Instruct-v0.1-FP8

Model Details of Mixtral-8x7B-Instruct-v0.1-FP8

vllm (pretrained=/home/mgoin/code/llm-compressor/examples/quantizing_moe/Mixtral-8x7B-Instruct-v0.1-FP8,tensor_parallel_size=2), gen_kwargs: (None), limit: None, num_fewshot: 5, batch_size: auto
|Tasks|Version|     Filter     |n-shot|  Metric   |   |Value |   |Stderr|
|-----|------:|----------------|-----:|-----------|---|-----:|---|-----:|
|gsm8k|      3|flexible-extract|     5|exact_match|↑  |0.6338|±  |0.0133|
|     |       |strict-match    |     5|exact_match|↑  |0.6293|±  |0.0133|
Creation
from typing import List

from transformers import AutoTokenizer

from llmcompressor.modifiers.quantization import QuantizationModifier
from llmcompressor.transformers import SparseAutoModelForCausalLM, oneshot
from llmcompressor.transformers.compression.helpers import calculate_offload_device_map

MODEL_ID = "mistralai/Mixtral-8x7B-Instruct-v0.1"
NUM_GPUS = 2

# Adjust based off number of desired GPUs
device_map = calculate_offload_device_map(
    MODEL_ID, reserve_for_hessians=True, num_gpus=NUM_GPUS, torch_dtype="auto"
)

model = SparseAutoModelForCausalLM.from_pretrained(
    MODEL_ID, device_map=device_map, torch_dtype="auto"
)
tokenizer = AutoTokenizer.from_pretrained(MODEL_ID)


# Dataset config parameters
DATASET_ID = "open_platypus"
MAX_SEQ_LENGTH = 2048
NUM_CALIBRATION_SAMPLES = 512

# Save location of quantized model
OUTPUT_DIR = f"{MODEL_ID.split('/')[-1]}-FP8"
SAVE_COMPRESSED = True

layers_to_ignore: List[str] = [
    "lm_head",
    "re:.*block_sparse_moe.gate",  # does not quantize well
]

recipe = QuantizationModifier(
    scheme="FP8", targets="Linear", ignore=layers_to_ignore
)


oneshot(
    model=model,
    tokenizer=tokenizer,
    dataset=DATASET_ID,
    recipe=recipe,
    max_seq_length=MAX_SEQ_LENGTH,
    num_calibration_samples=NUM_CALIBRATION_SAMPLES,
    save_compressed=SAVE_COMPRESSED,
    overwrite_output_dir=True,
    output_dir=OUTPUT_DIR,
)

# Confirm generations of the quantized model look sane.
print("========== SAMPLE GENERATION ==============")
input_ids = tokenizer("Hello my name is", return_tensors="pt").input_ids.to("cuda")
output = model.generate(input_ids, max_new_tokens=20)
print(tokenizer.decode(output[0]))
print("==========================================")

Runs of mgoin Mixtral-8x7B-Instruct-v0.1-FP8 on huggingface.co

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

More Information About Mixtral-8x7B-Instruct-v0.1-FP8 huggingface.co Model

Mixtral-8x7B-Instruct-v0.1-FP8 huggingface.co

Mixtral-8x7B-Instruct-v0.1-FP8 huggingface.co is an AI model on huggingface.co that provides Mixtral-8x7B-Instruct-v0.1-FP8's model effect (), which can be used instantly with this mgoin Mixtral-8x7B-Instruct-v0.1-FP8 model. huggingface.co supports a free trial of the Mixtral-8x7B-Instruct-v0.1-FP8 model, and also provides paid use of the Mixtral-8x7B-Instruct-v0.1-FP8. Support call Mixtral-8x7B-Instruct-v0.1-FP8 model through api, including Node.js, Python, http.

Mixtral-8x7B-Instruct-v0.1-FP8 huggingface.co Url

https://huggingface.co/mgoin/Mixtral-8x7B-Instruct-v0.1-FP8

mgoin Mixtral-8x7B-Instruct-v0.1-FP8 online free

Mixtral-8x7B-Instruct-v0.1-FP8 huggingface.co is an online trial and call api platform, which integrates Mixtral-8x7B-Instruct-v0.1-FP8's modeling effects, including api services, and provides a free online trial of Mixtral-8x7B-Instruct-v0.1-FP8, you can try Mixtral-8x7B-Instruct-v0.1-FP8 online for free by clicking the link below.

mgoin Mixtral-8x7B-Instruct-v0.1-FP8 online free url in huggingface.co:

https://huggingface.co/mgoin/Mixtral-8x7B-Instruct-v0.1-FP8

Mixtral-8x7B-Instruct-v0.1-FP8 install

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

Mixtral-8x7B-Instruct-v0.1-FP8 install url in huggingface.co:

https://huggingface.co/mgoin/Mixtral-8x7B-Instruct-v0.1-FP8

Url of Mixtral-8x7B-Instruct-v0.1-FP8

Mixtral-8x7B-Instruct-v0.1-FP8 huggingface.co Url

Provider of Mixtral-8x7B-Instruct-v0.1-FP8 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