Downloads · 30 days
10
6% of all-time downloads
adamo1139/OpenHermes-2.5-Mistral-7B-FP8-Dynamic
OpenHermes-2.5-Mistral-7B-FP8-Dynamic is a machine learning model from adamo1139. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as apache-2.0.
Downloads · 30 days
10
6% of all-time downloads
All-time downloads
175
Public
Parameters
7.2B
7.5 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors7.5 GB · 100%
How the weights are stored.
F8_E4M37B · 96%
From the Hugging Face model README
Creation script
from llmcompressor.transformers import SparseAutoModelForCausalLM
from transformers import AutoTokenizer
from llmcompressor.transformers import oneshot
from llmcompressor.modifiers.quantization import QuantizationModifier
MODEL_ID = "teknium/OpenHermes-2.5-Mistral-7B"
model = SparseAutoModelForCausalLM.from_pretrained(
MODEL_ID, device_map="auto", torch_dtype="auto")
tokenizer = AutoTokenizer.from_pretrained(MODEL_ID)
# Configure the simple PTQ quantization
recipe = QuantizationModifier(
targets="Linear", scheme="FP8_DYNAMIC", ignore=["lm_head"])
# Apply the quantization algorithm.
oneshot(model=model, recipe=recipe)
# Save the model.
SAVE_DIR = MODEL_ID.split("/")[1] + "-FP8-Dynamic"
model.save_pretrained(SAVE_DIR)
tokenizer.save_pretrained(SAVE_DIR)