Kuantum-ai1 commited on
Commit
b752497
·
verified ·
1 Parent(s): 77c3c0b

Upload folder using huggingface_hub

Browse files
.gitattributes CHANGED
@@ -33,3 +33,6 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ TinyCode1-164M-Python-Q4_0.gguf filter=lfs diff=lfs merge=lfs -text
37
+ TinyCode1-164M-Python-Q4_K_M.gguf filter=lfs diff=lfs merge=lfs -text
38
+ TinyCode1-164M-Python-Q8_0.gguf filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: bigcode-openrail-m
3
+ language:
4
+ - en
5
+ library_name: transformers
6
+ pipeline_tag: text-generation
7
+ base_model: bigcode/tiny_starcoder_py
8
+ datasets:
9
+ - codeparrot/codeparrot-clean
10
+ tags:
11
+ - code
12
+ - python
13
+ ---
14
+
15
+ # TinyCode1-164M-Python
16
+
17
+ A small Python code-completion model, fine-tuned from [`bigcode/tiny_starcoder_py`](https://huggingface.co/bigcode/tiny_starcoder_py) on about 35M tokens of Python source code.
18
+
19
+ ## Training
20
+
21
+ - Base model: `bigcode/tiny_starcoder_py`
22
+ - Dataset: [`codeparrot/codeparrot-clean`](https://huggingface.co/datasets/codeparrot/codeparrot-clean) (English-language Python source files, 35M tokens, 1 epoch)
23
+ - Hardware: 2x NVIDIA T4 (DDP, fp16 mixed precision), sequence length 1024, peak LR 5e-05, cosine schedule
24
+
25
+ ## Evaluation
26
+
27
+ Greedy decoding, pass@1 (%), identical harness for every model (max 200 new tokens, 10 s timeout per program).
28
+ HumanEval uses the standard prompts; MBPP (500 test problems) is zero-shot with a docstring-style prompt containing the task and the first test, so numbers are not directly comparable with few-shot figures reported elsewhere.
29
+
30
+ | Model | Params | HumanEval | MBPP |
31
+ |---|---|---|---|
32
+ | Base: bigcode/tiny_starcoder_py | 164M | 0.61 | 5.2 |
33
+
34
+ The base model is included to show the effect of fine-tuning.
35
+
36
+ ## GGUF
37
+
38
+ - `TinyCode1-164M-Python-Q4_0.gguf`
39
+ - `TinyCode1-164M-Python-Q4_K_M.gguf`
40
+ - `TinyCode1-164M-Python-Q8_0.gguf`
41
+
42
+ ## Usage
43
+
44
+ ```python
45
+ from transformers import AutoModelForCausalLM, AutoTokenizer
46
+ tok = AutoTokenizer.from_pretrained("Kuantum-ai1/TinyCode1-164M-Python")
47
+ model = AutoModelForCausalLM.from_pretrained("Kuantum-ai1/TinyCode1-164M-Python")
48
+ ids = tok("def fibonacci(n):", return_tensors="pt")
49
+ print(tok.decode(model.generate(**ids, max_new_tokens=100)[0]))
50
+ ```
51
+
52
+ ## Limitations
53
+
54
+ Small model: it makes frequent mistakes and should not be relied on for production code. Generated code must be reviewed before use.
55
+
56
+ ## License
57
+
58
+ bigcode-openrail-m
TinyCode1-164M-Python-Q4_0.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d4a77129d4234fcc436f225e8a907ac24ff40d28546c0563c0bea5f0a65c745d
3
+ size 126017920
TinyCode1-164M-Python-Q4_K_M.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8faf9eb20f969d9ed2cba45127c0d2719f3d67c427a314a049052531a6e0a970
3
+ size 133874560
TinyCode1-164M-Python-Q8_0.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6605d29450d2ebbe906244fee3ae8dda9cfaffe643b8e389d5b2d0de38f02095
3
+ size 195125632
config.json ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "activation_function": "gelu_pytorch_tanh",
3
+ "add_cross_attention": false,
4
+ "architectures": [
5
+ "GPTBigCodeForCausalLM"
6
+ ],
7
+ "attention_softmax_in_fp32": true,
8
+ "attn_pdrop": 0.1,
9
+ "bos_token_id": 0,
10
+ "dtype": "float32",
11
+ "embd_pdrop": 0.1,
12
+ "eos_token_id": 0,
13
+ "inference_runner": 0,
14
+ "initializer_range": 0.02,
15
+ "layer_norm_epsilon": 1e-05,
16
+ "max_batch_size": null,
17
+ "max_sequence_length": null,
18
+ "model_type": "gpt_bigcode",
19
+ "multi_query": true,
20
+ "n_embd": 768,
21
+ "n_head": 12,
22
+ "n_inner": 3072,
23
+ "n_layer": 20,
24
+ "n_positions": 8192,
25
+ "num_key_value_heads": 1,
26
+ "pad_key_length": true,
27
+ "pad_token_id": null,
28
+ "pre_allocate_kv_cache": false,
29
+ "resid_pdrop": 0.1,
30
+ "scale_attention_softmax_in_fp32": true,
31
+ "scale_attn_weights": true,
32
+ "summary_activation": null,
33
+ "summary_first_dropout": 0.1,
34
+ "summary_proj_to_labels": true,
35
+ "summary_type": "cls_index",
36
+ "summary_use_proj": true,
37
+ "tie_word_embeddings": true,
38
+ "transformers_version": "5.20.2",
39
+ "use_cache": false,
40
+ "validate_runner_input": true,
41
+ "vocab_size": 49152
42
+ }
generation_config.json ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "bos_token_id": 0,
4
+ "eos_token_id": 0,
5
+ "transformers_version": "5.20.2"
6
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d6365d7088a2977c9f6f5c8c8305012c8e4aab1dbd71b61bb79e1154760f4b37
3
+ size 656601304
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_prefix_space": false,
3
+ "backend": "tokenizers",
4
+ "bos_token": "<|endoftext|>",
5
+ "eos_token": "<|endoftext|>",
6
+ "extra_special_tokens": [
7
+ "<|endoftext|>",
8
+ "<fim_prefix>",
9
+ "<fim_middle>",
10
+ "<fim_suffix>",
11
+ "<fim_pad>",
12
+ "<filename>",
13
+ "<gh_stars>",
14
+ "<issue_start>",
15
+ "<issue_comment>",
16
+ "<issue_closed>",
17
+ "<jupyter_start>",
18
+ "<jupyter_text>",
19
+ "<jupyter_code>",
20
+ "<jupyter_output>",
21
+ "<empty_output>",
22
+ "<commit_before>",
23
+ "<commit_msg>",
24
+ "<commit_after>",
25
+ "<reponame>"
26
+ ],
27
+ "is_local": false,
28
+ "local_files_only": false,
29
+ "model_max_length": 1000000000000000019884624838656,
30
+ "tokenizer_class": "TokenizersBackend",
31
+ "unk_token": "<|endoftext|>",
32
+ "vocab_size": 49152
33
+ }