Downloads · 30 days
28
29% of all-time downloads
mlabonne/dummy-CodeLlama-7b-hf
dummy-CodeLlama-7b-hf 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 codellama/CodeLlama-7b-hf.
Downloads · 30 days
28
29% of all-time downloads
All-time downloads
95
Public
Parameters
465M
1.9 GB on disk
Likes
0
Public
Click a slice to open those files.
.bin929 MB · 50%
From the Hugging Face model README
This is a dummy version of the model based on codellama/CodeLlama-7b-hf.
dummy-CodeLlama-7b-hf has a size of 888.04 MB instead of the original 12852.88 MB (compression factor of 14.47) 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-CodeLlama-7b-hf"
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},
)