Downloads · 30 days
43
0% of all-time downloads
mlabonne/dummy-llama-2
dummy-llama-2 is a text generation model from mlabonne. Use it when you need the model to write or continue text. It is set up for transformers.
This is a dummy version of the model based on meta-llama/Llama-2-7b-hf.
Downloads · 30 days
43
0% of all-time downloads
All-time downloads
15.6K
Public
Parameters
465M
1.9 GB on disk
Likes
9
Public
Click a slice to open those files.
.bin929 MB · 50%
How the weights are stored.
F16465M · 100%
From the Hugging Face model README
This is a dummy version of the model based on meta-llama/Llama-2-7b-hf.
dummy-llama-2 has a size of 929.07 MB instead of the original 13476.98 MB (compression factor of 14.51) but keeps the base model's functionality.
The purpose of this dummy version is to be used for debugging, so you don't have to download the entire original model. Do not use it for inference.
# pip install transformers accelerate
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
model = "dummy-llama-2"
tokenizer = AutoTokenizer.from_pretrained(model)
model = AutoModelForCausalLM.from_pretrained(
model,
low_cpu_mem_usage=True,
return_dict=True,
torch_dtype=torch.float16,
device_map={"": 0},
)