caikybaldo999 commited on
Commit
ee9c8c2
·
verified ·
1 Parent(s): 8cbceb6

Upload folder using huggingface_hub

Browse files
README.md ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - code
4
+ library_name: transformers
5
+ pipeline_tag: text-generation
6
+ tags:
7
+ - html
8
+ - css
9
+ - javascript
10
+ - code
11
+ - llama
12
+ - from-scratch
13
+ ---
14
+
15
+ # WebCoder-100M
16
+
17
+ A small decoder-only model specialized in HTML, CSS and JavaScript.
18
+
19
+ ## Architecture
20
+ - Parameters: **99,894,528**
21
+ - Layers: 11
22
+ - Hidden size: 768
23
+ - Attention heads: 12
24
+ - Vocabulary: 28,672
25
+ - Max context: 2,048
26
+ - Training sequence length: 1,024
27
+
28
+ ## Training
29
+ The model was initialized from scratch.
30
+
31
+ 1. Causal pre-training on HTML/CSS/JavaScript.
32
+ 2. Instruction fine-tuning on web-development instruction/code pairs.
33
+
34
+ ## Token accounting
35
+ - Total processed: **582,209,140**
36
+ - Pre-training: **568,246,272**
37
+ - SFT processed: **13,962,868**
38
+ - SFT supervised response tokens: **9,124,446**
39
+ - Global cap: **2,000,000,000**
40
+
41
+ ## Data
42
+ Pre-training: `bigcode/the-stack-smol-xl`, HTML/JavaScript/CSS subsets.
43
+
44
+ Instruction tuning: `iamtarun/code_instructions_120k_alpaca`, filtered for web-development examples.
45
+
46
+ Review upstream dataset cards and source licenses before commercial use.
47
+
48
+ ## Prompt format
49
+ ```text
50
+ <|system|>
51
+ You are WebCoder...<|end|>
52
+ <|user|>
53
+ Create a responsive landing page...<|end|>
54
+ <|assistant|>
55
+ ...
56
+ ```
57
+
58
+ ## Limitations
59
+ This is a roughly 100M-parameter model trained from scratch. Its quality depends
60
+ strongly on how many tokens were actually processed. Generated code can contain
61
+ bugs or security issues and should be reviewed.
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": 64,
11
+ "hidden_act": "silu",
12
+ "hidden_size": 768,
13
+ "initializer_range": 0.02,
14
+ "intermediate_size": 2048,
15
+ "max_position_embeddings": 2048,
16
+ "mlp_bias": false,
17
+ "model_type": "llama",
18
+ "num_attention_heads": 12,
19
+ "num_hidden_layers": 11,
20
+ "num_key_value_heads": 12,
21
+ "pad_token_id": 0,
22
+ "pretraining_tp": 1,
23
+ "rms_norm_eps": 1e-05,
24
+ "rope_parameters": {
25
+ "rope_theta": 10000.0,
26
+ "rope_type": "default"
27
+ },
28
+ "tie_word_embeddings": true,
29
+ "transformers_version": "5.15.0",
30
+ "use_cache": true,
31
+ "vocab_size": 28672
32
+ }
generation_config.json ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token_id": 1,
3
+ "do_sample": true,
4
+ "eos_token_id": 2,
5
+ "max_new_tokens": 768,
6
+ "pad_token_id": 0,
7
+ "repetition_penalty": 1.05,
8
+ "temperature": 0.7,
9
+ "top_k": 50,
10
+ "top_p": 0.92,
11
+ "transformers_version": "5.15.0"
12
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a65d0f4dc02e2bfcf321b92feef28586196f625872c1773ded167512cf324b98
3
+ size 399589328
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "backend": "tokenizers",
3
+ "bos_token": "<|bos|>",
4
+ "eos_token": "<|eos|>",
5
+ "extra_special_tokens": [
6
+ "<|system|>",
7
+ "<|user|>",
8
+ "<|assistant|>",
9
+ "<|end|>"
10
+ ],
11
+ "model_max_length": 2048,
12
+ "pad_token": "<|pad|>",
13
+ "tokenizer_class": "TokenizersBackend",
14
+ "unk_token": "<|unk|>"
15
+ }
training_config.json ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "model_name": "WebCoder-100M",
3
+ "vocab_size": 28672,
4
+ "hidden_size": 768,
5
+ "intermediate_size": 2048,
6
+ "num_hidden_layers": 11,
7
+ "num_attention_heads": 12,
8
+ "num_key_value_heads": 12,
9
+ "max_position_embeddings": 2048,
10
+ "seq_len": 1024,
11
+ "docs_per_language": 10000,
12
+ "tokenizer_docs_per_language": 4000,
13
+ "max_chars_per_doc": 200000,
14
+ "micro_batch_size": 8,
15
+ "grad_accum_steps": 4,
16
+ "pretrain_lr": 0.0003,
17
+ "sft_lr": 8e-05,
18
+ "weight_decay": 0.1,
19
+ "grad_clip": 1.0,
20
+ "max_total_tokens": 2000000000,
21
+ "pretrain_token_cap": 1950000000,
22
+ "sft_token_cap": 50000000,
23
+ "pretrain_warmup_tokens": 2000000,
24
+ "pretrain_decay_tokens": 250000000,
25
+ "sft_warmup_tokens": 250000,
26
+ "sft_decay_tokens": 25000000,
27
+ "train_minutes": 55.0,
28
+ "reserve_sft_minutes": 10.0,
29
+ "checkpoint_every_updates": 500,
30
+ "log_every_updates": 20,
31
+ "sft_dataset": "iamtarun/code_instructions_120k_alpaca",
32
+ "sft_max_examples": 40000,
33
+ "sft_epochs": 2,
34
+ "work_dir": "/content/webcoder100m",
35
+ "use_google_drive": false,
36
+ "drive_dir": "/content/drive/MyDrive/WebCoder100M",
37
+ "hf_repo_name": "webcoder-100m-html-css-js",
38
+ "hf_private": false
39
+ }
training_metrics.json ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "parameters": 99894528,
3
+ "vocab_size": 28672,
4
+ "context_window": 2048,
5
+ "training_sequence_length": 1024,
6
+ "total_tokens_processed": 582209140,
7
+ "pretrain_tokens_processed": 568246272,
8
+ "sft_tokens_processed": 13962868,
9
+ "sft_supervised_tokens": 9124446,
10
+ "global_token_cap": 2000000000,
11
+ "optimizer_updates": 19137
12
+ }