lvwerra HF staff commited on
Commit
76e8fbd
1 Parent(s): 44b897e

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +91 -0
README.md CHANGED
@@ -1,3 +1,94 @@
1
  ---
 
 
 
 
 
 
 
 
2
  license: bigcode-openrail-m
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ pipeline_tag: text-generation
3
+ inference: true
4
+ widget:
5
+ - text: 'def print_hello_world():'
6
+ example_title: Hello world
7
+ group: Python
8
+ datasets:
9
+ - bigcode/the-stack-v2-train
10
  license: bigcode-openrail-m
11
+ library_name: transformers
12
+ tags:
13
+ - code
14
  ---
15
+
16
+ # StarCoder
17
+
18
+ TODO
19
+ ![banner]()
20
+
21
+ ## Table of Contents
22
+
23
+ 1. [Model Summary](##model-summary)
24
+ 2. [Use](##use)
25
+ 3. [Limitations](##limitations)
26
+ 4. [Training](##training)
27
+ 5. [License](##license)
28
+ 6. [Citation](##citation)
29
+
30
+ ## Model Summary
31
+
32
+ The StarCoderBase models are 15.5B parameter models trained on 600+ programming languages from [The Stack v2](https://huggingface.co/datasets/bigcode/the-stack-v2-train), with opt-out requests excluded. The model uses [Grouped Query Attention](https://arxiv.org/abs/2305.13245), [a context window of 16,384 tokens](https://arxiv.org/abs/2205.14135) with [a sliding window attention of 4,096 tokens](https://arxiv.org/abs/2004.05150v2), and was trained using the [Fill-in-the-Middle objective](https://arxiv.org/abs/2207.14255) on 4+ trillion tokens.
33
+
34
+ - **Project Website:** [bigcode-project.org](https://www.bigcode-project.org)
35
+ - **Paper:** TODO
36
+ - **Point of Contact:** [[email protected]](mailto:[email protected])
37
+ - **Languages:** 600+ Programming languages
38
+
39
+ ## Use
40
+
41
+ ### Intended use
42
+
43
+ The model was trained on GitHub code as well as additional selected data sources such as Arxiv and Wikipedia. As such it is _not_ an instruction model and commands like "Write a function that computes the square root." do not work well.
44
+
45
+ ### Generation
46
+ ```python
47
+ # pip install -q transformers # TODO: from main
48
+ from transformers import AutoModelForCausalLM, AutoTokenizer
49
+
50
+ checkpoint = "bigcode/starcoderbase"
51
+ device = "cuda" # for GPU usage or "cpu" for CPU usage
52
+
53
+ tokenizer = AutoTokenizer.from_pretrained(checkpoint)
54
+ model = AutoModelForCausalLM.from_pretrained(checkpoint, trust_remote_code=True).to(device)
55
+
56
+ inputs = tokenizer.encode("def print_hello_world():", return_tensors="pt").to(device)
57
+ outputs = model.generate(inputs)
58
+ print(tokenizer.decode(outputs[0]))
59
+ ```
60
+
61
+ ### Attribution & Other Requirements
62
+
63
+ The pretraining dataset of the model was filtered for permissive licenses and code with no license only. Nevertheless, the model can generate source code verbatim from the dataset. The code's license might require attribution and/or other specific requirements that must be respected. We provide a [search index](TODO) that let's you search through the pretraining data to identify where generated code came from and apply the proper attribution to your code.
64
+
65
+ # Limitations
66
+
67
+ The model has been trained on source code from 600+ programming languages. The predominant language in source is English although other languages are also present. As such the model is capable to generate code snippets provided some context but the generated code is not guaranteed to work as intended. It can be inefficient, contain bugs or exploits. See [the paper](TODO) for an in-depth discussion of the model limitations.
68
+
69
+ # Training
70
+
71
+ ## Model
72
+
73
+ - **Architecture:** Transformer decoder with grouped-query and sliding window attention and Fill-in-the-Middle objective
74
+ - **Pretraining steps:** TODO
75
+ - **Pretraining tokens:** 4+ trillion
76
+ - **Precision:** bfloat16
77
+
78
+ ## Hardware
79
+
80
+ - **GPUs:** 1024 A100
81
+ - **Training time:** TODO
82
+
83
+ ## Software
84
+
85
+ - **Framework:** [Megatron-Nemo](https://github.com/NVIDIA/NeMo) TODO double check
86
+ - **Neural networks:** [PyTorch](https://github.com/pytorch/pytorch)
87
+
88
+ # License
89
+
90
+ The model is licensed under the BigCode OpenRAIL-M v1 license agreement. You can find the full agreement [here](https://huggingface.co/spaces/bigcode/bigcode-model-license-agreement).
91
+
92
+ # Citation
93
+
94
+ TODO