mlabonne commited on
Commit
f1716ad
1 Parent(s): c9cfe11

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +33 -0
README.md ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language: en
3
+ ---
4
+
5
+ # dummy-CodeLlama-7b-hf
6
+
7
+ This is a dummy version of the model based on [`codellama/CodeLlama-7b-hf`](https://huggingface.co/codellama/CodeLlama-7b-hf).
8
+
9
+ ## 🧩 Dummy
10
+
11
+ `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.
12
+
13
+ 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.
14
+
15
+ ## 💻 Usage
16
+
17
+ ```python
18
+ # pip install transformers accelerate
19
+
20
+ from transformers import AutoModelForCausalLM, AutoTokenizer
21
+ import torch
22
+
23
+ model = "dummy-CodeLlama-7b-hf"
24
+
25
+ tokenizer = AutoTokenizer.from_pretrained(model)
26
+ model = AutoModelForCausalLM.from_pretrained(
27
+ model,
28
+ low_cpu_mem_usage=True,
29
+ return_dict=True,
30
+ torch_dtype=torch.float16,
31
+ device_map={"": 0},
32
+ )
33
+ ```