Deci
/

NajeebDeci commited on
Commit
5c63f79
1 Parent(s): 3fc5339

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +168 -0
README.md CHANGED
@@ -1,3 +1,171 @@
1
  ---
2
  license: apache-2.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: apache-2.0
3
+ tags:
4
+ - code generation
5
+ metrics:
6
+ - code_eval
7
+ pipeline_tag: text-generation
8
+ inference: true
9
+ widget:
10
+ - text: 'def print_hello_world():'
11
+ example_title: Hello world
12
+ group: Python
13
+ model-index:
14
+ - name: StarCoder
15
+ results:
16
+ - task:
17
+ type: text-generation
18
+ dataset:
19
+ type: nuprl/MultiPL-E
20
+ name: MultiPL-HumanEval (Python)
21
+ metrics:
22
+ - name: pass@1
23
+ type: pass@1
24
+ value: 0.191
25
+ verified: false
26
+ - task:
27
+ type: text-generation
28
+ dataset:
29
+ type: nuprl/MultiPL-E
30
+ name: MultiPL-HumanEval (JavaScript)
31
+ metrics:
32
+ - name: pass@1
33
+ type: pass@1
34
+ value: 0.184
35
+ verified: false
36
+ - task:
37
+ type: text-generation
38
+ dataset:
39
+ type: nuprl/MultiPL-E
40
+ name: MultiPL-HumanEval (Java)
41
+ metrics:
42
+ - name: pass@1
43
+ type: pass@1
44
+ value: 0.166
45
+ verified: false
46
+ datasets:
47
+ - bigcode/starcoderdata
48
  ---
49
+
50
+ # Model Card for DeciCoder 1B
51
+
52
+ DeciCoder 1B is a 1 billion parameter decoder-only code completion model
53
+ trained on the Python, Java, and Javascript subsets of [Starcoder Training Dataset](https://huggingface.co/datasets/bigcode/starcoderdata).
54
+ The model uses Grouped Query Attention and has a context window of 2048
55
+ tokens. It was trained using a Fill-in-the-Middle training objective. The model's
56
+ architecture was generated by Deci's proprietary Neural Architecture
57
+ Search-based technology, AutoNAC.
58
+
59
+ ## Model Details
60
+
61
+ - **Developed by:** Deci
62
+ - **Model type:** DeciCoder is an auto-regressive language model based on the transformer decoder architecture, using Grouped Query Attention.
63
+ - **Language(s):** Python, Java, JavaScript
64
+ - **License:** Model checkpoints are licensed under the [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0)
65
+
66
+ ## Model Architecture
67
+
68
+ | Parameters | Layers | Heads | Sequence Length | GQA num_key_value_heads | Hidden Size |
69
+ |:----------|:----------|:----------|:----------|:----------|:----------|
70
+ | 1.1B | 20 | 32 | 2048 | 4 | 2048 | |
71
+
72
+
73
+ - **Decoder layer:** Grouped Query Attention [Ainslie et al., 2023](https://arxiv.org/abs/2305.13245)
74
+ - **Position Embeddings:** Rotary Position Embeddings [Su et al., 2021](https://arxiv.org/abs/2104.09864)
75
+
76
+ ## Uses
77
+
78
+ The model is intended to do single/multiline code completion from a
79
+ context window of up to 2048k tokens. It is *not* an instruction model
80
+ and commands like \"Write a function that computes the absolute value of
81
+ an integer,\" won't yield the desired results. A more effective approach
82
+ is to frame instructions in the style of source code comments (e.g. \#
83
+ this function calculates the absolute value of an integer) or to present
84
+ a function signature and docstring, enabling the model to complete the
85
+ function's body.
86
+
87
+ ### How to Use
88
+
89
+ ```bibtex
90
+ # pip install -q transformers
91
+ from transformers import AutoModelForCausalLM, AutoTokenizer
92
+
93
+ checkpoint = "Deci/DeciCoder-1b"
94
+ device = "cuda" # for GPU usage or "cpu" for CPU usage
95
+
96
+ tokenizer = AutoTokenizer.from_pretrained(checkpoint)
97
+ model = AutoModelForCausalLM.from_pretrained(checkpoint, trust_remote_code=True).to(device)
98
+
99
+ inputs = tokenizer.encode("def print_hello_world():", return_tensors="pt").to(device)
100
+ outputs = model.generate(inputs)
101
+ print(tokenizer.decode(outputs[0]))
102
+ ```
103
+
104
+ ### Attribution
105
+
106
+ DeciCoder was trained on StarCoder Training Dataset, filtered for
107
+ Python, Java, and Javascript code. For additional information, please
108
+ refer to [https://huggingface.co/datasets/bigcode/starcoderdata](https://huggingface.co/datasets/bigcode/starcoderdata).
109
+
110
+ ### Limitations
111
+
112
+ The model has undergone training with source code from Python, Java, and
113
+ JavaScript. While the primary language in the source is English, it does
114
+ contain other languages. Therefore, the model can produce code snippets
115
+ given some context. However, there\'s no assurance that the resulting
116
+ code will function as expected. It might be suboptimal, contain bugs, or
117
+ even exploits.
118
+
119
+ ## Training Details
120
+
121
+ ### Training Data
122
+
123
+ DeciCoder was trained on the Python, Java, and Javascript subsets of [Starcoder Training Dataset](https://huggingface.co/datasets/bigcode/starcoderdata)
124
+
125
+
126
+ ### Training Procedure
127
+
128
+ - **Warm-Up Steps**: 9000
129
+ - **Total Training Steps**: 284k
130
+ - **Total Tokenes**: 446B
131
+ - **Global Batch Size**: 768
132
+ - **Optimizer**: AdamW
133
+ - **Optimizer Parameters**: beta1=0.9, beta2=0.95
134
+ - **Weight Decay**: 0.1
135
+ - **Learning Rate**: 4e-4
136
+ - **Learning Rate Schedule**: cosine
137
+
138
+ ## Evaluation
139
+
140
+ Below are DeciCoder's pass@1 on MultiPL HumanEval scores
141
+
142
+ | Python | JavaScript | Java |
143
+ |:----------|:----------|:----------|
144
+ | 19.1% | 18.4% | 16.6% |
145
+
146
+
147
+ ### Runtime Benchmarks
148
+
149
+ |Inference Tool/Hardware | A10G (tokens/sec) | A100 (tokens/sec) |
150
+ |:----------|:----------|:----------|
151
+ | HF Inference Endpoints | 1,364.2 | 3,244.4 |
152
+ | Infery LLM | 3,889.3 | 11,676.8 |
153
+
154
+ ## Documentation
155
+
156
+ - [Notebook](https://colab.research.google.com/drive/1JCxvBsWCZKHfIcHSMVf7GZCs3ClMQPjs)
157
+ - Blog post: [Introducing DeciCoder: The New Gold Standard in Efficient and Accurate Code Generation](https://deci.ai/blog/decicoder-efficient-and-accurate-code-generation-llm/)
158
+ - Questions:Feel free to contact us via our [Discord Community!](https://discord.com/invite/p9ecgRhDR8/)
159
+
160
+ ## How to Cite
161
+
162
+ Please cite this model using this format.
163
+
164
+ ```bibtex
165
+ @misc{DeciFoundationModels,
166
+ title = {DeciCoder},
167
+ author = {DeciAI Research Team},
168
+ year = {2023}
169
+ url={[https://huggingface.co/deci/decicoder-1b](https://huggingface.co/deci/decicoder-1b)},
170
+ }
171
+ ```