tomer-deci commited on
Commit
5201b17
1 Parent(s): 24a66a7

Added README.md

Browse files
Files changed (1) hide show
  1. README.md +101 -0
README.md ADDED
@@ -0,0 +1,101 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ language:
4
+ - en
5
+ datasets:
6
+ - Open-Orca/SlimOrca
7
+ ---
8
+ # DeciLM-7B-instruct
9
+
10
+ DeciLM-7B-instruct is a model for short-form instruction following. It is built by LoRA fine-tuning on the [SlimOrca dataset](https://huggingface.co/datasets/Open-Orca/SlimOrca).
11
+ ## Model Details
12
+
13
+ ### Model Description
14
+
15
+ DeciLM-7B-instruct is a derivative of the recently released [DeciLM-7B](https://huggingface.co/Deci/DeciLM-7B) language model, a pre-trained, high-efficiency generative text model with 7 billion parameters. DeciLM-7B-instruct is one the best 7B instruct models obtained using simple LoRA fine-tuning, without relying on preference optimization techniques such as RLHF and DPO.
16
+
17
+ - **Developed by:** [Deci](https://deci.ai)
18
+ - **Model type:** DeciLM is an auto-regressive language model using an optimized transformer decoder architecture that includes variable Grouped-Query Attention.
19
+ - **Language(s) (NLP):** English
20
+ - **License:** Apache 2.0
21
+
22
+ ## Model Architecture
23
+
24
+ | Parameters | Layers | Heads | Sequence Length | GQA num_key_value_heads* |
25
+ |:----------|:----------|:----------|:----------|:----------|
26
+ | 7.04 billion | 32 | 32 | 8192 | Variable |
27
+
28
+ *AutoNAC was employed to optimize the selection of the GQA num_key_value_heads for each model layer.
29
+
30
+
31
+ ### Model Sources
32
+
33
+ - **Blog:** [DeciLM-7B Technical Blog](https://deci.ai/blog/introducing-DeciLM-7B-the-fastest-and-most-accurate-7b-large-language-model-to-date)
34
+ - **Demo:** [DeciLM-7B-instruct Demo](https://huggingface.co/spaces/Deci/DeciLM-7B-instruct)
35
+ - **Finetuning Notebook:** [DeciLM-7B Finetuning Notebook](https://colab.research.google.com/drive/1kEV6i96AQ94xTCvSd11TxkEaksTb5o3U?usp=sharing)
36
+ - **Text Generation Notebook:** [DeciLM-7B-instruct Text Generation Notebook](https://bit.ly/declm-7b-instruct)
37
+
38
+ ## Uses
39
+
40
+ The model is intended for commercial and research use in English.
41
+
42
+ ## How to Get Started with the Model
43
+
44
+ Use the code below to get started with the model.
45
+
46
+ ```bibtex
47
+ import torch
48
+ from transformers import AutoModelForCausalLM, AutoTokenizer
49
+
50
+ model_name = "Deci/DeciLM-7B-instruct"
51
+ device = "cuda" # for GPU usage or "cpu" for CPU usage
52
+
53
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
54
+ model = AutoModelForCausalLM.from_pretrained(model_name, torch_dtype=torch.bfloat16, trust_remote_code=True).to(device)
55
+
56
+ inputs = tokenizer.encode("In a shocking finding, scientists discovered a herd of unicorns living in", return_tensors="pt").to(device)
57
+ outputs = model.generate(inputs, max_new_tokens=100, do_sample=True, top_p=0.95)
58
+ print(tokenizer.decode(outputs[0]))
59
+ ```
60
+
61
+ ## Evaluation
62
+
63
+ Below are DeciLM-7B and DeciLM-7B-instruct's evaluation results.
64
+
65
+ | Model | Average | ARC | HellaSwag | MMLU | TruthfulQA | Winogrande | GSM8K |
66
+ |:----------|:---------:|:---------:|:---------:|:---------:|:---------:|:---------:|:---------:|
67
+ | DecilLM-7B | 61.55 | 59.39 | 82.51 | 59.76 | 40.33 | 79.95 | 47.38 |
68
+ | DecilLM-7B-instruct | 63.19 | 61.01 | 82.37 | 60.24 | 49.75 | 79.72 | 46.02 |
69
+
70
+
71
+
72
+ ### Runtime Benchmarks
73
+
74
+ | Inference Tool | Hardware | Prompt length | Generation length | Generated tokens/sec | Batch Size | Number of Prompts |
75
+ |:----------|:----------|:---------:|:---------:|:---------:|:---------:|:---------:|
76
+ | HuggingFace (PyTorch) | A100 (SXM4-80GB-400W) | 512 | 512 | **1174** | 352 | 352 |
77
+ | HuggingFace (PyTorch) | A100 (SXM4-80GB-400W) | 2048 | 2048 | **328** | 72 | 72 |
78
+ | Infery-LLM | A100 (SXM4-80GB-400W)| 512 | 512 | **4559** | 1024 | 4096 |
79
+ | Infery-LLM | A100 (SXM4-80GB-400W) | 2048 | 2048 | **3997** | 512 | 2048 |
80
+ | Infery-LLM | A10 | 512 | 512 | **1345** | 128 | 512 |
81
+ | Infery-LLM | A10 | 2048 | 2048 | **599** | 32 | 128 |
82
+
83
+ - 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).
84
+ - 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).
85
+
86
+ ## Ethical Considerations and Limitations
87
+
88
+ DeciLM-7B-instruct 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.
89
+
90
+ ## How to Cite
91
+
92
+ Please cite this model using this format.
93
+
94
+ ```bibtex
95
+ @misc{DeciFoundationModels,
96
+ title = {DeciLM-7B-instruct},
97
+ author = {DeciAI Research Team},
98
+ year = {2023}
99
+ url={https://huggingface.co/Deci/DeciLM-7B-instruct},
100
+ }
101
+ ```