BelugaDataSetCoder commited on
Commit
24d0baa
·
verified ·
1 Parent(s): 7afcda0

Release ClangCoder-0.1 (2.05M parameters)

Browse files
.gitattributes CHANGED
@@ -33,3 +33,4 @@ 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
+ ClangCoder-0.1.gguf filter=lfs diff=lfs merge=lfs -text
ClangCoder-0.1.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:38647027abd9a012e17958e054ef4946d2d4690005c2701886dec095e58f89c9
3
+ size 2994912
Modelfile ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM ./ClangCoder-0.1.gguf
2
+
3
+ TEMPLATE """<|user|>
4
+ {{ .Prompt }}
5
+ <|assistant|>
6
+ """
7
+
8
+ PARAMETER stop "<|end|>"
9
+ PARAMETER stop "<|user|>"
10
+ PARAMETER temperature 0.2
11
+ PARAMETER num_ctx 256
README.md ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ license: apache-2.0
5
+ library_name: transformers
6
+ tags:
7
+ - llama
8
+ - terminal
9
+ - bash
10
+ - zsh
11
+ - fish
12
+ - cli
13
+ - autocomplete
14
+ - gguf
15
+ - tiny-lm
16
+ datasets:
17
+ - BelugaDataSetCoder/ClangCodeDataset
18
+ pipeline_tag: text-generation
19
+ ---
20
+
21
+ # ClangCoder-0.1 (2.05M Ultra-Compact Terminal & CLI Model)
22
+
23
+ **ClangCoder-0.1** is a 2.05M-parameter causal language model based on the Llama architecture, trained from scratch for ultra-fast terminal command autocompletion (`bash`, `zsh`, `fish`) and CLI command generation.
24
+
25
+ ## Model Details
26
+ - **Architecture:** LlamaForCausalLM (`hidden_size=160`, `layers=4`, `heads=4`, `kv_heads=2`, `context=256`)
27
+ - **Parameters:** ~2.05M
28
+ - **Tokenizer:** Custom 2,048-token BPE vocabulary trained specifically on Linux/Unix shell syntax
29
+ - **Training Data:** `BelugaDataSetCoder/ClangCodeDataset`
30
+ - **Formats Included:** SafeTensors (PyTorch / Hugging Face) and `ClangCoder-0.1.gguf` (FP16 for `llama.cpp` / Ollama)
31
+
32
+ ## Prompt Format
33
+
34
+ The model uses ChatML-style special tokens with a shell tag (`[bash]`, `[zsh]`, or `[fish]`):
35
+
36
+ ```text
37
+ <|user|>
38
+ [bash] git status --short
39
+ <|assistant|>
40
+ --branch<|end|>
41
+ ```
42
+
43
+ ## Quick Start with Ollama
44
+
45
+ 1. Download `ClangCoder-0.1.gguf` and `Modelfile` from this repository.
46
+ 2. Create the model in Ollama:
47
+ ```bash
48
+ ollama create clangcoder-0.1 -f Modelfile
49
+ ```
50
+ 3. Run a completion:
51
+ ```bash
52
+ ollama run clangcoder-0.1 "[fish] How do I set a global exported environment variable in Fish?"
53
+ ```
config.json ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "LlamaForCausalLM"
4
+ ],
5
+ "attention_bias": false,
6
+ "attention_dropout": 0.0,
7
+ "bos_token_id": 1,
8
+ "dtype": "float32",
9
+ "eos_token_id": 2,
10
+ "head_dim": 40,
11
+ "hidden_act": "silu",
12
+ "hidden_size": 160,
13
+ "initializer_range": 0.02,
14
+ "intermediate_size": 432,
15
+ "max_position_embeddings": 256,
16
+ "mlp_bias": false,
17
+ "model_type": "llama",
18
+ "num_attention_heads": 4,
19
+ "num_hidden_layers": 4,
20
+ "num_key_value_heads": 2,
21
+ "pad_token_id": 0,
22
+ "pretraining_tp": 1,
23
+ "rms_norm_eps": 1e-06,
24
+ "rope_parameters": {
25
+ "rope_theta": 10000.0,
26
+ "rope_type": "default"
27
+ },
28
+ "tie_word_embeddings": true,
29
+ "transformers_version": "5.24.1",
30
+ "use_cache": false,
31
+ "vocab_size": 2048
32
+ }
generation_config.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "bos_token_id": 1,
4
+ "eos_token_id": 2,
5
+ "output_attentions": false,
6
+ "output_hidden_states": false,
7
+ "pad_token_id": 0,
8
+ "transformers_version": "5.24.1",
9
+ "use_cache": true
10
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9185d3fa2e4cf0242b0a1a56525bfe9ca8306bcb96648ac61b3cd37386420ec4
3
+ size 5867088
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "backend": "tokenizers",
3
+ "bos_token": "<|begin|>",
4
+ "eos_token": "<|end|>",
5
+ "model_max_length": 1000000000000000019884624838656,
6
+ "pad_token": "<|pad|>",
7
+ "tokenizer_class": "TokenizersBackend",
8
+ "unk_token": "<|unk|>"
9
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f306175637ad169261ea2263cd85b15cd57a83df8bab6b64fbd88fb5772bd3a3
3
+ size 5265