update
Browse files- evaluation/intro.txt +5 -5
evaluation/intro.txt
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
A popular evaluation framework for code generation models is the [pass@k](https://huggingface.co/metrics/code_eval) metric on [HumanEval](https://huggingface.co/datasets/openai_humaneval) dataset, which was introduced in [Codex paper](https://arxiv.org/pdf/2107.03374v2.pdf). The dataset includes 164 handwritten programming problems. In the pass@k metric, k code samples are generated per problem, a problem is considered solved if any sample passes the unit tests and the total fraction of problems solved is reported. Below are some examples for the selcted models.
|
| 2 |
For most models, we sample 200 candidate program completions, and compute pass@1, pass@10, and pass@100 using an unbiased sampling estimator. The table below shows the humanEval scores of CodeParrot, InCoder, GPT-neo models, GPT-J and Codex (not open-source).
|
| 3 |
|
| 4 |
-
<center>
|
| 5 |
|
| 6 |
| Model | pass@1 | pass@10 | pass@100|
|
| 7 |
|-------|--------|---------|---------|
|
|
@@ -16,10 +16,10 @@ For most models, we sample 200 candidate program completions, and compute pass@1
|
|
| 16 |
|GPT-neo (1.5B)| 4.79% | 7.47% | 16.30% |
|
| 17 |
|GPT-J (6B)| 11.62% | 15.74% | 27.74% |
|
| 18 |
|
| 19 |
-
|
| 20 |
|
| 21 |
|
| 22 |
-
To better understand how pass@k metric works, we will illustrate it with some examples. We select 4
|
| 23 |
|
| 24 |
```python
|
| 25 |
|
|
@@ -37,7 +37,7 @@ def has_close_elements(numbers: List[float], threshold: float) -> bool:
|
|
| 37 |
|
| 38 |
````
|
| 39 |
|
| 40 |
-
```
|
| 41 |
|
| 42 |
from typing import List
|
| 43 |
|
|
@@ -53,7 +53,7 @@ def separate_paren_groups(paren_string: str) -> List[str]:
|
|
| 53 |
|
| 54 |
````
|
| 55 |
|
| 56 |
-
```
|
| 57 |
|
| 58 |
def truncate_number(number: float) -> float:
|
| 59 |
""" Given a positive floating point number, it can be decomposed into
|
|
|
|
| 1 |
A popular evaluation framework for code generation models is the [pass@k](https://huggingface.co/metrics/code_eval) metric on [HumanEval](https://huggingface.co/datasets/openai_humaneval) dataset, which was introduced in [Codex paper](https://arxiv.org/pdf/2107.03374v2.pdf). The dataset includes 164 handwritten programming problems. In the pass@k metric, k code samples are generated per problem, a problem is considered solved if any sample passes the unit tests and the total fraction of problems solved is reported. Below are some examples for the selcted models.
|
| 2 |
For most models, we sample 200 candidate program completions, and compute pass@1, pass@10, and pass@100 using an unbiased sampling estimator. The table below shows the humanEval scores of CodeParrot, InCoder, GPT-neo models, GPT-J and Codex (not open-source).
|
| 3 |
|
| 4 |
+
<div align="center">
|
| 5 |
|
| 6 |
| Model | pass@1 | pass@10 | pass@100|
|
| 7 |
|-------|--------|---------|---------|
|
|
|
|
| 16 |
|GPT-neo (1.5B)| 4.79% | 7.47% | 16.30% |
|
| 17 |
|GPT-J (6B)| 11.62% | 15.74% | 27.74% |
|
| 18 |
|
| 19 |
+
</div>
|
| 20 |
|
| 21 |
|
| 22 |
+
To better understand how pass@k metric works, we will illustrate it with some examples. We select 4 problems from the HumanEval dataset and see how the model performs and which code completions pass the unit tests. We will use CodeParrot 🦜 with the three problem below:
|
| 23 |
|
| 24 |
```python
|
| 25 |
|
|
|
|
| 37 |
|
| 38 |
````
|
| 39 |
|
| 40 |
+
```python
|
| 41 |
|
| 42 |
from typing import List
|
| 43 |
|
|
|
|
| 53 |
|
| 54 |
````
|
| 55 |
|
| 56 |
+
```python
|
| 57 |
|
| 58 |
def truncate_number(number: float) -> float:
|
| 59 |
""" Given a positive floating point number, it can be decomposed into
|