File size: 4,598 Bytes
2157f81
 
 
 
d7444f2
2157f81
 
83cc074
2157f81
13dda63
 
966d762
 
 
49ecd86
 
2157f81
dd58664
2157f81
a2defce
 
 
 
 
 
2157f81
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
83cc074
2157f81
83cc074
d7444f2
 
2157f81
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
d7444f2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2157f81
 
 
 
 
13dda63
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
---
license: other
base_model: deepseek-ai/deepseek-coder-1.3b-base
tags:
- axolotl
- generated_from_trainer
model-index:
- name: deepseek-coder-1.3b-typescript
  results: []
datasets:
- bigcode/the-stack-dedup
widget:
- text: "class Person {\n constructor(public name:"
  example_title: "class"
- text: "function quickSort"
  example_title: "function"
---
<img src="codegpt-deepseek-typescript.png" alt="CodeGPT" width="800"  />

<p align="center">
<img width="1000px" alt="CodeGPT: DeepSeek Coder - Typescript" src="codegpt-deepseek-typescript.png?raw=true">
</p>
<p align="center"><a href="https://codegpt.co/">[CodeGPT.co]</a>  |  <a href="https://ollama.ai/codegpt/deepseek-coder-1.3b-typescript">[🦙 Ollama]</a>  |  <a href="https://discord.gg/fKyyJX5pne">[Discord]</a>  |  <a href="https://marketplace.visualstudio.com/items?itemName=DanielSanMedium.dscodegpt">[VSCode Extension]</a> </p>
<hr>

[<img src="https://raw.githubusercontent.com/OpenAccess-AI-Collective/axolotl/main/image/axolotl-badge-web.png" alt="Built with Axolotl" width="200" height="32"/>](https://github.com/OpenAccess-AI-Collective/axolotl)
<details><summary>See axolotl config</summary>

axolotl version: `0.3.0`
```yaml
base_model: deepseek-ai/deepseek-coder-1.3b-base
model_type: AutoModelForCausalLM
trust_remote_code: true
load_in_8bit: false
load_in_4bit: false
strict: false


datasets:
  - path: CodeGPTPlus/typescript-0-500000-seq1024
    type: completion
    field: text


val_set_size: 0.001
output_dir:  ./fft-out

sequence_len: 1024

adapter:
lora_model_dir:
lora_r: 
lora_alpha: 
lora_dropout: 
lora_target_linear: 
lora_fan_in_fan_out:
lora_modules_to_save:

wandb_project: deepseek_1.3_fft
wandb_entity:
wandb_watch:
wandb_name: aws_a10g
wandb_log_model: end


gradient_accumulation_steps: 2
micro_batch_size: 20
num_epochs: 1
optimizer: adamw_bnb_8bit
adam_beta1: 0.9
adam_beta2: 0.999
adam_epsilon: 0.000001
max_grad_norm: 1.0
weight_decay: 0.1
lr_scheduler: cosine
learning_rate: 0.00002
train_on_inputs: false
group_by_length: false
bf16: true
fp16: false
tf32: false
gradient_checkpointing: true
early_stopping_patience:
resume_from_checkpoint:
local_rank:
logging_steps: 1
xformers_attention:
flash_attention: true

loss_watchdog_threshold: 5.0
loss_watchdog_patience: 3

hub_model_id: CodeGPTPlus/deepseek_coder_1.3b_typescript
hub_strategy: every_save
warmup_ratio: 0.01
evals_per_epoch: 20
saves_per_epoch: 3
debug:
deepspeed:

fsdp:
fsdp_config:
special_tokens:
  bos_token: "<|begin▁of▁sentence|>"
  eos_token: "<|end▁of▁sentence|>"
  pad_token: "<|end▁of▁sentence|>"
```

</details><br>

# deepseek-coder-1.3b-typescript

This model is a fine-tuned version of [deepseek-ai/deepseek-coder-1.3b-base](https://huggingface.co/deepseek-ai/deepseek-coder-1.3b-base) on the the-stack dataset, using 0.5B of tokens of typescript only.
It achieves the following results on the evaluation set:
- Loss: 0.7681

## Training procedure

### Training hyperparameters

The following hyperparameters were used during training:
- learning_rate: 2e-05
- train_batch_size: 20
- eval_batch_size: 20
- seed: 42
- gradient_accumulation_steps: 2
- total_train_batch_size: 40
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-06
- lr_scheduler_type: cosine
- lr_scheduler_warmup_steps: 261
- num_epochs: 1

### Training results

| Training Loss | Epoch | Step  | Validation Loss |
|:-------------:|:-----:|:-----:|:---------------:|
| 1.0745        | 0.0   | 1     | 0.8681          |
| 1.2267        | 0.05  | 1308  | 0.8130          |
| 1.1594        | 0.1   | 2616  | 0.8018          |
| 0.7674        | 0.15  | 3924  | 0.7942          |
| 0.6443        | 0.2   | 5232  | 0.7889          |
| 0.9155        | 0.25  | 6540  | 0.7847          |
| 0.7501        | 0.3   | 7848  | 0.7819          |
| 0.8835        | 0.35  | 9156  | 0.7792          |
| 0.7261        | 0.4   | 10464 | 0.7769          |
| 0.9746        | 0.45  | 11772 | 0.7748          |
| 0.6884        | 0.5   | 13080 | 0.7734          |
| 0.6104        | 0.55  | 14388 | 0.7722          |
| 0.8876        | 0.6   | 15696 | 0.7710          |
| 0.9567        | 0.65  | 17004 | 0.7703          |
| 0.6915        | 0.7   | 18312 | 0.7696          |
| 0.8874        | 0.75  | 19620 | 0.7691          |
| 0.6124        | 0.8   | 20928 | 0.7686          |
| 0.8147        | 0.85  | 22236 | 0.7684          |
| 0.8021        | 0.9   | 23544 | 0.7683          |
| 0.8665        | 0.95  | 24852 | 0.7681          |


### Framework versions

- Transformers 4.37.0.dev0
- Pytorch 2.0.1+cu118
- Datasets 2.16.1
- Tokenizers 0.15.0