tomer-deci commited on
Commit
89289b0
1 Parent(s): b943e32

Added README.md

Browse files
Files changed (1) hide show
  1. README.md +99 -0
README.md ADDED
@@ -0,0 +1,99 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ language:
4
+ - en
5
+ ---
6
+ # DeciLM-7B
7
+
8
+ DeciLM-7B is a 7.04 billion parameter decoder-only text generation model, released under the Apache 2.0 license. At the time of release, DeciLM-7B is the top-performing 7B base language model on the Open LLM Leaderboard. With support for an 8K-token sequence length, this highly efficient model uses variable Grouped-Query Attention (GQA) to achieve a superior balance between accuracy and computational efficiency. The model's architecture was generated using Deci's proprietary Neural Architecture Search technology, AutoNAC.
9
+ ## Model Details
10
+
11
+ ### Model Description
12
+
13
+ Deci developed and released the DeciLM-7B language model, a pre-trained, high-efficiency text generation model with 7 billion parameters. DeciLM-7B is not only the most accurate 7B base model, but it also outpaces all models in its class with a throughput that is up to 4.4x that of Mistral-7B's. An instruct version [DeciLM-7B-instruct](https://huggingface.co/Deci/DeciLM-7B-instruct) has also been released.
14
+
15
+ - **Developed by:** [Deci](https://deci.ai/)
16
+ - **Model type:** DeciLM is an auto-regressive language model using an optimized transformer decoder architecture that includes variable Grouped-Query Attention.
17
+ - **Language(s) (NLP):** English
18
+ - **License:** Apache 2.0
19
+
20
+ ## Model Architecture
21
+
22
+ | Parameters | Layers | Heads | Sequence Length | GQA num_key_value_heads* |
23
+ |:----------|:----------|:----------|:----------|:----------|
24
+ | 7.04 billion | 32 | 32 | 8192 | Variable |
25
+
26
+ *AutoNAC was employed to optimize the selection of the GQA num_key_value_heads for each layer.
27
+
28
+
29
+ ### Model Sources
30
+
31
+ - **Blog:** [DeciLM-7B Technical Blog](https://deci.ai/blog/introducing-DeciLM-7B-the-fastest-and-most-accurate-7b-large-language-model-to-date)
32
+ - **Demo:** [DeciLM-7B-instruct Demo](https://huggingface.co/spaces/Deci/DeciLM-7B-instruct)
33
+ - **Finetuning Notebook:** [DeciLM-7B Finetuning Notebook](https://colab.research.google.com/drive/1kEV6i96AQ94xTCvSd11TxkEaksTb5o3U?usp=sharing)
34
+ - **Text Generation Notebook:** [DeciLM-7B-instruct Text Generation Notebook](https://bit.ly/declm-7b-instruct)
35
+
36
+ ## Uses
37
+
38
+ The model is intended for commercial and research use in English and can be fine-tuned for various tasks and languages.
39
+
40
+ ## How to Get Started with the Model
41
+
42
+ Use the code below to get started with the model.
43
+
44
+ ```bibtex
45
+ import torch
46
+ from transformers import AutoModelForCausalLM, AutoTokenizer
47
+
48
+ model_name = "Deci/DeciLM-7B"
49
+ device = "cuda" # for GPU usage or "cpu" for CPU usage
50
+
51
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
52
+ model = AutoModelForCausalLM.from_pretrained(model_name, torch_dtype=torch.bfloat16, trust_remote_code=True).to(device)
53
+
54
+ inputs = tokenizer.encode("In a shocking finding, scientists discovered a herd of unicorns living in", return_tensors="pt").to(device)
55
+ outputs = model.generate(inputs, max_new_tokens=100, do_sample=True, top_p=0.95)
56
+ print(tokenizer.decode(outputs[0]))
57
+ ```
58
+
59
+ ## Evaluation
60
+
61
+ Below are DeciLM-7B and DeciLM-7B-instruct's Open LLM Leaderboard results.
62
+
63
+ | Model | Average | ARC | HellaSwag | MMLU | TruthfulQA | Winogrande | GSM8K |
64
+ |:----------|:---------:|:---------:|:---------:|:---------:|:---------:|:---------:|:---------:|
65
+ | DecilLM-7B | 61.55 | 59.39 | 82.51 | 59.76 | 40.33 | 79.95 | 47.38 |
66
+ | DecilLM-7B-instruct | 63.19 | 61.01 | 82.37 | 60.24 | 49.75 | 79.72 | 46.02 |
67
+
68
+
69
+
70
+ ### Runtime Benchmarks
71
+
72
+ | Inference Tool | Hardware | Prompt length | Generation length | Generated tokens/sec | Batch Size | Number of Prompts |
73
+ |:----------|:----------|:---------:|:---------:|:---------:|:---------:|:---------:|
74
+ | HuggingFace (PyTorch) | A100 (SXM4-80GB-400W) | 512 | 512 | **1174** | 352 | 352 |
75
+ | HuggingFace (PyTorch) | A100 (SXM4-80GB-400W) | 2048 | 2048 | **328** | 72 | 72 |
76
+ | Infery-LLM | A100 (SXM4-80GB-400W)| 512 | 512 | **4559** | 1024 | 4096 |
77
+ | Infery-LLM | A100 (SXM4-80GB-400W) | 2048 | 2048 | **3997** | 512 | 2048 |
78
+ | Infery-LLM | A10 | 512 | 512 | **1345** | 128 | 512 |
79
+ | Infery-LLM | A10 | 2048 | 2048 | **599** | 32 | 128 |
80
+
81
+ - In order to replicate the results of the Hugging Face benchmarks, you can use this [code example](https://huggingface.co/Deci/DeciLM-7B/blob/main/benchmark_hf_model.py).
82
+ - Infery-LLM, Deci's inference engine, features a suite of optimization algorithms, including selective quantization, optimized beam search, continuous batching, and custom CUDA kernels. To witness the full capabilities of Infery-LLM first-hand, we invite you to engage with our [interactive demo](https://console.deci.ai/infery-llm-demo).
83
+
84
+ ## Ethical Considerations and Limitations
85
+
86
+ DeciLM-7B is a new technology that comes with inherent risks associated with its use. The testing conducted so far has been primarily in English and does not encompass all possible scenarios. Like those of all large language models, DeciLM-7B's outputs are unpredictable, and the model may generate responses that are inaccurate, biased, or otherwise objectionable. Consequently, developers planning to use DeciLM-7B should undertake thorough safety testing and tuning designed explicitly for their intended applications of the model before deployment.
87
+
88
+ ## How to Cite
89
+
90
+ Please cite this model using this format.
91
+
92
+ ```bibtex
93
+ @misc{DeciFoundationModels,
94
+ title = {DeciLM-7B},
95
+ author = {DeciAI Research Team},
96
+ year = {2023}
97
+ url={https://huggingface.co/Deci/DeciLM-7B},
98
+ }
99
+ ```