Downloads · 30 days
40
46% of all-time downloads
nm-testing/llama2.c-stories15M-pruned_50.2of4-uncompressed
llama2.c-stories15M-pruned_50.2of4-uncompressed is a machine learning model from nm-testing. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
This repo contains model files for llama2.c 15M tinystories optimized for NM-vLLM, a high-throughput serving engine for compressed LLMs.
Downloads · 30 days
40
46% of all-time downloads
All-time downloads
87
Public
Parameters
24.4M
158 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors97.6 MB · 96%
From the Hugging Face model README
This repo contains model files for llama2.c 15M tinystories optimized for NM-vLLM, a high-throughput serving engine for compressed LLMs.
This model was pruned with SparseGPT, using llm-compressor.
Install llm-compressor:
pip install llmcompressor
from llmcompressor.transformers import oneshot
from llmcompressor.transformers import SparseAutoModelForCausalLM
hf_model_stub = "Xenova/llama2.c-stories15M"
calibration_dataset = "open_platypus"
output_directory = f"{hf_model_stub.split('/')[-1]}-pruned_50.2of4-uncompressed"
model = SparseAutoModelForCausalLM.from_pretrained(hf_model_stub, torch_dtype="auto", device_map="auto")
recipe = """
test_stage:
obcq_modifiers:
SparseGPTModifier:
sparsity: 0.5
sequential_update: true
mask_structure: "2:4"
targets: ['re:model.layers.\d*$']
"""
oneshot(
model=model,
dataset=calibration_dataset,
recipe=recipe,
output_dir=output_directory,
)
model.save_pretrained(output_directory, save_compressed=False)
For further support, and discussions on these models and AI in general, join Neural Magic's Slack Community