Update README.md
Browse files
README.md
CHANGED
@@ -7,16 +7,10 @@ tags:
|
|
7 |
datasets:
|
8 |
- giulio98/xlcost-single-prompt
|
9 |
widget:
|
10 |
-
- text: "
|
11 |
-
example_title: "
|
12 |
-
- text: "def print_hello_world():\n\t"
|
13 |
-
example_title: "Hello World!"
|
14 |
-
- text: "def get_file_size(filepath):"
|
15 |
-
example_title: "File size"
|
16 |
-
- text: "import numpy as"
|
17 |
-
example_title: "Numpy"
|
18 |
model-index:
|
19 |
-
- name: codegen-350M-multi-xlcost
|
20 |
results:
|
21 |
- task:
|
22 |
name: Code Generation
|
@@ -43,8 +37,8 @@ You can load the CodeGen-350M-multi-xlcost model and tokenizer directly in `tran
|
|
43 |
|
44 |
```Python
|
45 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
46 |
-
tokenizer = AutoTokenizer.from_pretrained("giulio98/codegen-350M-multi-xlcost
|
47 |
-
model = AutoModelForCausalLM.from_pretrained("giulio98/codegen-350M-multi-xlcost
|
48 |
|
49 |
text = tokenizer.eos_token + "\'\'\'\n" + "function to add two numbers" + "\n\'\'\'\n" + "###\n"
|
50 |
input_ids = tokenizer(text, return_tensors="pt").input_ids
|
@@ -67,7 +61,7 @@ The model was finetuned on [XLCost-single-prompt](https://huggingface.co/dataset
|
|
67 |
xlcost-text-to-code](https://huggingface.co/datasets/codeparrot/xlcost-text-to-code). Below the hyperparameters.
|
68 |
|
69 |
|
70 |
-
|
71 |
|Per device train batch size| 8 |
|
72 |
|Context size| 1024 |
|
73 |
|Training steps| 258|
|
@@ -84,8 +78,8 @@ The training was executed on 1 x V100 (16GB) GPU for 6h 42m
|
|
84 |
|
85 |
We evaluated the model on the first 400 samples of XLCOST's [XLCost-single-prompt test split](https://huggingface.co/datasets/giulio98/xlcost-single-prompt/viewer/Python/test) and comparing the outputs of the generated codes with respect to the expected output using pass@k metric.
|
86 |
|
87 |
-
| Metric | codegen-350M-multi-xlcost
|
88 |
-
|
89 |
|pass@1 | 3.70% |
|
90 |
|pass@10 | 14.5% |
|
91 |
|
|
|
7 |
datasets:
|
8 |
- giulio98/xlcost-single-prompt
|
9 |
widget:
|
10 |
+
- text: "'''\nfunction to add two numbers\n'''\n###\n"
|
11 |
+
example_title: "add two numbers"
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
model-index:
|
13 |
+
- name: codegen-350M-multi-xlcost
|
14 |
results:
|
15 |
- task:
|
16 |
name: Code Generation
|
|
|
37 |
|
38 |
```Python
|
39 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
40 |
+
tokenizer = AutoTokenizer.from_pretrained("giulio98/codegen-350M-multi-xlcost")
|
41 |
+
model = AutoModelForCausalLM.from_pretrained("giulio98/codegen-350M-multi-xlcost")
|
42 |
|
43 |
text = tokenizer.eos_token + "\'\'\'\n" + "function to add two numbers" + "\n\'\'\'\n" + "###\n"
|
44 |
input_ids = tokenizer(text, return_tensors="pt").input_ids
|
|
|
61 |
xlcost-text-to-code](https://huggingface.co/datasets/codeparrot/xlcost-text-to-code). Below the hyperparameters.
|
62 |
|
63 |
|
64 |
+
|------|------------------|
|
65 |
|Per device train batch size| 8 |
|
66 |
|Context size| 1024 |
|
67 |
|Training steps| 258|
|
|
|
78 |
|
79 |
We evaluated the model on the first 400 samples of XLCOST's [XLCost-single-prompt test split](https://huggingface.co/datasets/giulio98/xlcost-single-prompt/viewer/Python/test) and comparing the outputs of the generated codes with respect to the expected output using pass@k metric.
|
80 |
|
81 |
+
| Metric | codegen-350M-multi-xlcost |
|
82 |
+
|--------|-----|
|
83 |
|pass@1 | 3.70% |
|
84 |
|pass@10 | 14.5% |
|
85 |
|