ljcnju commited on
Commit
e94d1a2
·
verified ·
1 Parent(s): 6a48872

Training in progress, epoch 1

Browse files
README.md CHANGED
@@ -33,62 +33,13 @@ This is the model card of a 🤗 transformers model that has been pushed on the
33
  - **Paper [optional]:** [More Information Needed]
34
  - **Demo [optional]:** [More Information Needed]
35
 
36
- ## Driectly Uses
37
-
38
- ```Python
39
- from transformers import AutoTokenizer, AutoModelForCausalLM,pipeline
40
- from peft import PeftModelForCausalLM
41
- from transformers import BitsAndBytesConfig
42
- base_model = "ljcnju/DeepSeek7bForCodeTrans"
43
- tokenzier = AutoTokenizer.from_pretrained(base_model)
44
- babcfig = BitsAndBytesConfig(load_in_8bit=True,llm_int8_enable_fp32_cpu_offload=True)
45
- basemodel = "deepseek-ai/deepseek-coder-6.7b-base"
46
- model = AutoModelForCausalLM.from_pretrained(basemodel,
47
- device_map = "cuda:0",
48
- quantization_config = babcfig)
49
- model.resize_token_embeddings(len(tokenzier))
50
-
51
- model = PeftModelForCausalLM.from_pretrained(model,base_model)
52
-
53
- prompt = "<|translate|> public void removePresentationFormat() {remove1stProperty(PropertyIDMap.PID_PRESFORMAT);}\n<|end_of_c-sharp_code|><|begin_of_c-sharp_code|>"
54
- input = tokenzier(prompt,return_tensors="pt")
55
- output_ids = model.generate(**input)
56
- print(tokenzier.batch_decode(output_ids))
57
- ```
58
-
59
- ### Use with vLLM
60
-
61
- ```Python
62
- from vllm import LLM, SamplingParams,EngineArgs, LLMEngine, RequestOutput
63
- from vllm.lora.request import LoRARequest
64
- engine_args = EngineArgs(model="deepseek-ai/deepseek-coder-6.7b-base",
65
- enable_lora=True,
66
- max_loras=1,
67
- max_lora_rank=8,
68
- max_cpu_loras=2,
69
- max_num_seqs=256,
70
- max_model_len= 512)
71
- engine = LLMEngine.from_engine_args(engine_args)
72
- lorarequest = LoRARequest("DeepSeek7bForCodeTrans",1,"ljcnju/DeepSeek7bForCodeTrans")
73
- engine.add_lora(lorarequest)
74
-
75
- additional_special_tokens = {'additional_special_tokens':['<|begin_of_java_code|>','<|end_of_java_code|>'\
76
- ,'<|begin_of_c-sharp_code|>','<|end_of_c-sharp_code|>',\
77
- '<|translate|>']}
78
- prompt = "public void serialize(LittleEndianOutput out) {out.writeShort(field_1_vcenter);}\n"
79
- prompt = additional_special_tokens['additional_special_tokens'][0] + prompt + additional_special_tokens['additional_special_tokens'][1] + additional_special_tokens['additional_special_tokens'][2]
80
-
81
- sampling_params = SamplingParams(temperature=0.1,max_tokens= 512,stop_token_ids=[32022,32014],skip_special_tokens=False)
82
- engine.add_request(str(1),prompt,sampling_params,lora_request=lorarequest)
83
- engine.step()
84
- real_output = ""
85
- finished = False
86
- while engine.has_unfinished_requests():
87
- request_outputs = engine.step()
88
- for request_output in request_outputs:
89
- finished = finished | request_output.finished
90
- print(request_outputs[0].outputs[0].text)
91
- ```
92
 
93
  [More Information Needed]
94
 
 
33
  - **Paper [optional]:** [More Information Needed]
34
  - **Demo [optional]:** [More Information Needed]
35
 
36
+ ## Uses
37
+
38
+ <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
39
+
40
+ ### Direct Use
41
+
42
+ <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
43
 
44
  [More Information Needed]
45
 
adapter_config.json CHANGED
@@ -1,7 +1,7 @@
1
  {
2
  "alpha_pattern": {},
3
  "auto_mapping": null,
4
- "base_model_name_or_path": "deepseek-ai/deepseek-coder-6.7b-base",
5
  "bias": "none",
6
  "fan_in_fan_out": false,
7
  "inference_mode": true,
 
1
  {
2
  "alpha_pattern": {},
3
  "auto_mapping": null,
4
+ "base_model_name_or_path": "../../../../Models/deepseek-ai/deepseek-coder-6.7b-base",
5
  "bias": "none",
6
  "fan_in_fan_out": false,
7
  "inference_mode": true,
adapter_model.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:f5755eacccb10dfbc388cd956b5ae73c56948dcd7373f121d10b114862fa8d61
3
  size 16794200
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6619ac0331fff08fef952de1121907f36a29d7979022859cbb6d18be8023c846
3
  size 16794200
special_tokens_map.json CHANGED
@@ -1,14 +1,14 @@
1
  {
2
  "additional_special_tokens": [
3
  {
4
- "content": "<|end_of_c-sharp_code|>",
5
  "lstrip": false,
6
  "normalized": false,
7
  "rstrip": false,
8
  "single_word": false
9
  },
10
  {
11
- "content": "<|translate|>",
12
  "lstrip": false,
13
  "normalized": false,
14
  "rstrip": false,
@@ -22,14 +22,14 @@
22
  "single_word": false
23
  },
24
  {
25
- "content": "<|end_of_java_code|>",
26
  "lstrip": false,
27
  "normalized": false,
28
  "rstrip": false,
29
  "single_word": false
30
  },
31
  {
32
- "content": "<|begin_of_java_code|>",
33
  "lstrip": false,
34
  "normalized": false,
35
  "rstrip": false,
 
1
  {
2
  "additional_special_tokens": [
3
  {
4
+ "content": "<|begin_of_java_code|>",
5
  "lstrip": false,
6
  "normalized": false,
7
  "rstrip": false,
8
  "single_word": false
9
  },
10
  {
11
+ "content": "<|end_of_java_code|>",
12
  "lstrip": false,
13
  "normalized": false,
14
  "rstrip": false,
 
22
  "single_word": false
23
  },
24
  {
25
+ "content": "<|end_of_c-sharp_code|>",
26
  "lstrip": false,
27
  "normalized": false,
28
  "rstrip": false,
29
  "single_word": false
30
  },
31
  {
32
+ "content": "<|translate|>",
33
  "lstrip": false,
34
  "normalized": false,
35
  "rstrip": false,
tokenizer.json CHANGED
@@ -1,7 +1,21 @@
1
  {
2
  "version": "1.0",
3
- "truncation": null,
4
- "padding": null,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
  "added_tokens": [
6
  {
7
  "id": 32000,
@@ -203,7 +217,7 @@
203
  },
204
  {
205
  "id": 32022,
206
- "content": "<|end_of_c-sharp_code|>",
207
  "single_word": false,
208
  "lstrip": false,
209
  "rstrip": false,
@@ -212,7 +226,7 @@
212
  },
213
  {
214
  "id": 32023,
215
- "content": "<|translate|>",
216
  "single_word": false,
217
  "lstrip": false,
218
  "rstrip": false,
@@ -230,7 +244,7 @@
230
  },
231
  {
232
  "id": 32025,
233
- "content": "<|end_of_java_code|>",
234
  "single_word": false,
235
  "lstrip": false,
236
  "rstrip": false,
@@ -239,7 +253,7 @@
239
  },
240
  {
241
  "id": 32026,
242
- "content": "<|begin_of_java_code|>",
243
  "single_word": false,
244
  "lstrip": false,
245
  "rstrip": false,
 
1
  {
2
  "version": "1.0",
3
+ "truncation": {
4
+ "direction": "Right",
5
+ "max_length": 512,
6
+ "strategy": "LongestFirst",
7
+ "stride": 0
8
+ },
9
+ "padding": {
10
+ "strategy": {
11
+ "Fixed": 512
12
+ },
13
+ "direction": "Right",
14
+ "pad_to_multiple_of": null,
15
+ "pad_id": 32014,
16
+ "pad_type_id": 0,
17
+ "pad_token": "<|end▁of▁sentence|>"
18
+ },
19
  "added_tokens": [
20
  {
21
  "id": 32000,
 
217
  },
218
  {
219
  "id": 32022,
220
+ "content": "<|begin_of_java_code|>",
221
  "single_word": false,
222
  "lstrip": false,
223
  "rstrip": false,
 
226
  },
227
  {
228
  "id": 32023,
229
+ "content": "<|end_of_java_code|>",
230
  "single_word": false,
231
  "lstrip": false,
232
  "rstrip": false,
 
244
  },
245
  {
246
  "id": 32025,
247
+ "content": "<|end_of_c-sharp_code|>",
248
  "single_word": false,
249
  "lstrip": false,
250
  "rstrip": false,
 
253
  },
254
  {
255
  "id": 32026,
256
+ "content": "<|translate|>",
257
  "single_word": false,
258
  "lstrip": false,
259
  "rstrip": false,
tokenizer_config.json CHANGED
@@ -1,4 +1,6 @@
1
  {
 
 
2
  "added_tokens_decoder": {
3
  "32000": {
4
  "content": "õ",
@@ -177,7 +179,7 @@
177
  "special": false
178
  },
179
  "32022": {
180
- "content": "<|end_of_c-sharp_code|>",
181
  "lstrip": false,
182
  "normalized": false,
183
  "rstrip": false,
@@ -185,7 +187,7 @@
185
  "special": true
186
  },
187
  "32023": {
188
- "content": "<|translate|>",
189
  "lstrip": false,
190
  "normalized": false,
191
  "rstrip": false,
@@ -201,7 +203,7 @@
201
  "special": true
202
  },
203
  "32025": {
204
- "content": "<|end_of_java_code|>",
205
  "lstrip": false,
206
  "normalized": false,
207
  "rstrip": false,
@@ -209,7 +211,7 @@
209
  "special": true
210
  },
211
  "32026": {
212
- "content": "<|begin_of_java_code|>",
213
  "lstrip": false,
214
  "normalized": false,
215
  "rstrip": false,
@@ -218,11 +220,11 @@
218
  }
219
  },
220
  "additional_special_tokens": [
221
- "<|end_of_c-sharp_code|>",
222
- "<|translate|>",
223
- "<|begin_of_c-sharp_code|>",
224
  "<|end_of_java_code|>",
225
- "<|begin_of_java_code|>"
 
 
226
  ],
227
  "bos_token": "<|begin▁of▁sentence|>",
228
  "clean_up_tokenization_spaces": false,
 
1
  {
2
+ "add_bos_token": true,
3
+ "add_eos_token": false,
4
  "added_tokens_decoder": {
5
  "32000": {
6
  "content": "õ",
 
179
  "special": false
180
  },
181
  "32022": {
182
+ "content": "<|begin_of_java_code|>",
183
  "lstrip": false,
184
  "normalized": false,
185
  "rstrip": false,
 
187
  "special": true
188
  },
189
  "32023": {
190
+ "content": "<|end_of_java_code|>",
191
  "lstrip": false,
192
  "normalized": false,
193
  "rstrip": false,
 
203
  "special": true
204
  },
205
  "32025": {
206
+ "content": "<|end_of_c-sharp_code|>",
207
  "lstrip": false,
208
  "normalized": false,
209
  "rstrip": false,
 
211
  "special": true
212
  },
213
  "32026": {
214
+ "content": "<|translate|>",
215
  "lstrip": false,
216
  "normalized": false,
217
  "rstrip": false,
 
220
  }
221
  },
222
  "additional_special_tokens": [
223
+ "<|begin_of_java_code|>",
 
 
224
  "<|end_of_java_code|>",
225
+ "<|begin_of_c-sharp_code|>",
226
+ "<|end_of_c-sharp_code|>",
227
+ "<|translate|>"
228
  ],
229
  "bos_token": "<|begin▁of▁sentence|>",
230
  "clean_up_tokenization_spaces": false,
training_args.bin CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:db357bcd7b7f80f2bae124a5c6ab6172f381e1b216336d366d7280c6af68d384
3
- size 4600
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:000f9e1abb31dbbe1028a90de5727cce3c3fc08165a092df1078608a63d4581e
3
+ size 4728