RichardErkhov commited on
Commit
fa6f9fd
1 Parent(s): 320615d

uploaded readme

Browse files
Files changed (1) hide show
  1. README.md +136 -0
README.md ADDED
@@ -0,0 +1,136 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Quantization made by Richard Erkhov.
2
+
3
+ [Github](https://github.com/RichardErkhov)
4
+
5
+ [Discord](https://discord.gg/pvy7H8DZMG)
6
+
7
+ [Request more models](https://github.com/RichardErkhov/quant_request)
8
+
9
+
10
+ tiny_starcoder_py - GGUF
11
+ - Model creator: https://huggingface.co/bigcode/
12
+ - Original model: https://huggingface.co/bigcode/tiny_starcoder_py/
13
+
14
+
15
+ | Name | Quant method | Size |
16
+ | ---- | ---- | ---- |
17
+ | [tiny_starcoder_py.Q2_K.gguf](https://huggingface.co/RichardErkhov/bigcode_-_tiny_starcoder_py-gguf/blob/main/tiny_starcoder_py.Q2_K.gguf) | Q2_K | 0.1GB |
18
+ | [tiny_starcoder_py.IQ3_XS.gguf](https://huggingface.co/RichardErkhov/bigcode_-_tiny_starcoder_py-gguf/blob/main/tiny_starcoder_py.IQ3_XS.gguf) | IQ3_XS | 0.1GB |
19
+ | [tiny_starcoder_py.IQ3_S.gguf](https://huggingface.co/RichardErkhov/bigcode_-_tiny_starcoder_py-gguf/blob/main/tiny_starcoder_py.IQ3_S.gguf) | IQ3_S | 0.1GB |
20
+ | [tiny_starcoder_py.Q3_K_S.gguf](https://huggingface.co/RichardErkhov/bigcode_-_tiny_starcoder_py-gguf/blob/main/tiny_starcoder_py.Q3_K_S.gguf) | Q3_K_S | 0.1GB |
21
+ | [tiny_starcoder_py.IQ3_M.gguf](https://huggingface.co/RichardErkhov/bigcode_-_tiny_starcoder_py-gguf/blob/main/tiny_starcoder_py.IQ3_M.gguf) | IQ3_M | 0.11GB |
22
+ | [tiny_starcoder_py.Q3_K.gguf](https://huggingface.co/RichardErkhov/bigcode_-_tiny_starcoder_py-gguf/blob/main/tiny_starcoder_py.Q3_K.gguf) | Q3_K | 0.11GB |
23
+ | [tiny_starcoder_py.Q3_K_M.gguf](https://huggingface.co/RichardErkhov/bigcode_-_tiny_starcoder_py-gguf/blob/main/tiny_starcoder_py.Q3_K_M.gguf) | Q3_K_M | 0.11GB |
24
+ | [tiny_starcoder_py.Q3_K_L.gguf](https://huggingface.co/RichardErkhov/bigcode_-_tiny_starcoder_py-gguf/blob/main/tiny_starcoder_py.Q3_K_L.gguf) | Q3_K_L | 0.12GB |
25
+ | [tiny_starcoder_py.IQ4_XS.gguf](https://huggingface.co/RichardErkhov/bigcode_-_tiny_starcoder_py-gguf/blob/main/tiny_starcoder_py.IQ4_XS.gguf) | IQ4_XS | 0.11GB |
26
+ | [tiny_starcoder_py.Q4_0.gguf](https://huggingface.co/RichardErkhov/bigcode_-_tiny_starcoder_py-gguf/blob/main/tiny_starcoder_py.Q4_0.gguf) | Q4_0 | 0.12GB |
27
+ | [tiny_starcoder_py.IQ4_NL.gguf](https://huggingface.co/RichardErkhov/bigcode_-_tiny_starcoder_py-gguf/blob/main/tiny_starcoder_py.IQ4_NL.gguf) | IQ4_NL | 0.12GB |
28
+ | [tiny_starcoder_py.Q4_K_S.gguf](https://huggingface.co/RichardErkhov/bigcode_-_tiny_starcoder_py-gguf/blob/main/tiny_starcoder_py.Q4_K_S.gguf) | Q4_K_S | 0.12GB |
29
+ | [tiny_starcoder_py.Q4_K.gguf](https://huggingface.co/RichardErkhov/bigcode_-_tiny_starcoder_py-gguf/blob/main/tiny_starcoder_py.Q4_K.gguf) | Q4_K | 0.12GB |
30
+ | [tiny_starcoder_py.Q4_K_M.gguf](https://huggingface.co/RichardErkhov/bigcode_-_tiny_starcoder_py-gguf/blob/main/tiny_starcoder_py.Q4_K_M.gguf) | Q4_K_M | 0.12GB |
31
+ | [tiny_starcoder_py.Q4_1.gguf](https://huggingface.co/RichardErkhov/bigcode_-_tiny_starcoder_py-gguf/blob/main/tiny_starcoder_py.Q4_1.gguf) | Q4_1 | 0.12GB |
32
+ | [tiny_starcoder_py.Q5_0.gguf](https://huggingface.co/RichardErkhov/bigcode_-_tiny_starcoder_py-gguf/blob/main/tiny_starcoder_py.Q5_0.gguf) | Q5_0 | 0.13GB |
33
+ | [tiny_starcoder_py.Q5_K_S.gguf](https://huggingface.co/RichardErkhov/bigcode_-_tiny_starcoder_py-gguf/blob/main/tiny_starcoder_py.Q5_K_S.gguf) | Q5_K_S | 0.13GB |
34
+ | [tiny_starcoder_py.Q5_K.gguf](https://huggingface.co/RichardErkhov/bigcode_-_tiny_starcoder_py-gguf/blob/main/tiny_starcoder_py.Q5_K.gguf) | Q5_K | 0.14GB |
35
+ | [tiny_starcoder_py.Q5_K_M.gguf](https://huggingface.co/RichardErkhov/bigcode_-_tiny_starcoder_py-gguf/blob/main/tiny_starcoder_py.Q5_K_M.gguf) | Q5_K_M | 0.14GB |
36
+ | [tiny_starcoder_py.Q5_1.gguf](https://huggingface.co/RichardErkhov/bigcode_-_tiny_starcoder_py-gguf/blob/main/tiny_starcoder_py.Q5_1.gguf) | Q5_1 | 0.14GB |
37
+ | [tiny_starcoder_py.Q6_K.gguf](https://huggingface.co/RichardErkhov/bigcode_-_tiny_starcoder_py-gguf/blob/main/tiny_starcoder_py.Q6_K.gguf) | Q6_K | 0.15GB |
38
+ | [tiny_starcoder_py.Q8_0.gguf](https://huggingface.co/RichardErkhov/bigcode_-_tiny_starcoder_py-gguf/blob/main/tiny_starcoder_py.Q8_0.gguf) | Q8_0 | 0.18GB |
39
+
40
+
41
+
42
+
43
+ Original model description:
44
+ ---
45
+ pipeline_tag: text-generation
46
+ inference: true
47
+ widget:
48
+ - text: 'def print_hello_world():'
49
+ example_title: Hello world
50
+ group: Python
51
+ license: bigcode-openrail-m
52
+ datasets:
53
+ - bigcode/the-stack-dedup
54
+ metrics:
55
+ - code_eval
56
+ library_name: transformers
57
+ tags:
58
+ - code
59
+ model-index:
60
+ - name: Tiny-StarCoder-Py
61
+ results:
62
+ - task:
63
+ type: text-generation
64
+ dataset:
65
+ type: openai_humaneval
66
+ name: HumanEval
67
+ metrics:
68
+ - name: pass@1
69
+ type: pass@1
70
+ value: 7.84%
71
+ verified: false
72
+ ---
73
+
74
+ # TinyStarCoderPy
75
+
76
+ This is a 164M parameters model with the same architecture as [StarCoder](https://huggingface.co/bigcode/starcoder) (8k context length, MQA & FIM). It was trained on the Python data from [StarCoderData](https://huggingface.co/datasets/bigcode/starcoderdata)
77
+ for ~6 epochs which amounts to 100B tokens.
78
+
79
+
80
+ ## Use
81
+
82
+ ### Intended use
83
+
84
+ The model was trained on GitHub code, to assist with some tasks like [Assisted Generation](https://huggingface.co/blog/assisted-generation). For pure code completion, we advise using our 15B models [StarCoder]() or [StarCoderBase]().
85
+
86
+
87
+ ### Generation
88
+ ```python
89
+ # pip install -q transformers
90
+ from transformers import AutoModelForCausalLM, AutoTokenizer
91
+
92
+ checkpoint = "bigcode/tiny_starcoder_py"
93
+ device = "cuda" # for GPU usage or "cpu" for CPU usage
94
+
95
+ tokenizer = AutoTokenizer.from_pretrained(checkpoint)
96
+ model = AutoModelForCausalLM.from_pretrained(checkpoint).to(device)
97
+
98
+ inputs = tokenizer.encode("def print_hello_world():", return_tensors="pt").to(device)
99
+ outputs = model.generate(inputs)
100
+ print(tokenizer.decode(outputs[0]))
101
+ ```
102
+
103
+ ### Fill-in-the-middle
104
+ Fill-in-the-middle uses special tokens to identify the prefix/middle/suffix part of the input and output:
105
+
106
+ ```python
107
+ input_text = "<fim_prefix>def print_one_two_three():\n print('one')\n <fim_suffix>\n print('three')<fim_middle>"
108
+ inputs = tokenizer.encode(input_text, return_tensors="pt").to(device)
109
+ outputs = model.generate(inputs)
110
+ print(tokenizer.decode(outputs[0]))
111
+ ```
112
+
113
+ # Training
114
+
115
+ ## Model
116
+
117
+ - **Architecture:** GPT-2 model with multi-query attention and Fill-in-the-Middle objective
118
+ - **Pretraining steps:** 50k
119
+ - **Pretraining tokens:** 100 billion
120
+ - **Precision:** bfloat16
121
+
122
+ ## Hardware
123
+
124
+ - **GPUs:** 32 Tesla A100
125
+ - **Training time:** 18 hours
126
+
127
+ ## Software
128
+
129
+ - **Orchestration:** [Megatron-LM](https://github.com/bigcode-project/Megatron-LM)
130
+ - **Neural networks:** [PyTorch](https://github.com/pytorch/pytorch)
131
+ - **BP16 if applicable:** [apex](https://github.com/NVIDIA/apex)
132
+
133
+ # License
134
+ 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).
135
+
136
+