File size: 3,302 Bytes
e7354b2
 
e705a02
0367809
e705a02
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
e7354b2
 
 
 
 
 
915acf0
 
 
d848beb
 
 
 
0367809
e705a02
d848beb
 
0367809
 
 
5ab8711
 
d848beb
b2b7ddc
 
 
 
 
 
d848beb
 
5c9d51b
 
 
 
 
 
 
 
62e4292
5c9d51b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
d848beb
 
0367809
 
 
d848beb
 
 
0367809
1be2a4e
0367809
 
 
 
 
 
 
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
---
license: other
dataset_info:
- config_name: swallow-code-v0.1
  features:
  - name: blob_id
    dtype: string
  - name: path
    dtype: string
  - name: content_id
    dtype: string
  - name: language
    dtype: string
  - name: length_bytes
    dtype: int32
  - name: detected_licenses
    dtype: list
  - name: text
    dtype: string
  - name: license_type
    dtype: string
  - name: src_encoding
    dtype: string
  - name: is_vendor
    dtype: bool
  - name: is_generated
    dtype: bool
  - name: alphanum_fraction
    dtype: float64
  - name: alpha_fraction
    dtype: float64
  - name: num_lines
    dtype: int32
  - name: avg_line_length
    dtype: float
  - name: max_line_length
    dtype: int32
  - name: has_issue
    dtype: bool
  - name: language_type
    dtype: string
  - name: pylint_score
    dtype: float64
  - name: pylint_output
    dtype: string
task_categories:
- text-generation
language:
- en
- ja
tags:
- code
source_datasets:
- bigcode/the-stack-v2-train-smol-ids
---

## What is it?

Swallow-code-v0.1 consists of 4 staged dataset subsets and are filtered from [bigcode/the-stack-v2-train-smol-ids](https://huggingface.co/datasets/bigcode/the-stack-v2-train-smol-ids).

## What is being released?

The dataset is released in four versions:
- **Swallow Code v0.1 stage 1**: 36B tokens, 41M documents containing Python scripts.
- **Swallow Code v0.1 stage 2**: 31B tokens, 37M documents containing Python scripts that are syntax error-free.
- **Swallow Code v0.1 stage 3**: 20B tokens, 24M documents containing Python scripts that are filtered with pylint score.
- **Swallow Code v0.1 stage 4**: 16B tokens, 21M documents containing Python scripts that are filtered with code comments and literal language detection(English and Japanese).

## Results and Performance

Llama-3.1-8B Performance after Continual Pretraining on 50B tokens Japanese, English, and Code(= swallow-code-v0.1) datasets.

![](swallow-code-eval.png)

## Dataset Schema

```python
{
  "blob_id": string,
  "path": string,
  "content_id": string,
  "language": string,
  "length_bytes": int64,
  "detected_licenses": list,
  "license_type": string,
  "src_encoding": string,
  "is_vendor": bool,
  "is_generated": bool,
  "alphanum_fraction": float64,
  "alpha_fraction": float64,
  "num_lines": int64,
  "avg_line_length": float64,
  "max_line_length": int64,
  "text": string,
  "analysis_results": list,
  "has_issues": bool,
  "language_type_issue": list,
  "language_type": string,
  "pylint_score": int64,
  "pylint_output": string
}
```

## Licensing information

Swallow-code-v0.1 follows the license of the stack v2. The following is the license of the stack v2.

The Stack v2 is a collection of source code from repositories with various licenses. Any use of all or part of the code gathered in The Stack v2 must abide by the terms of the original licenses, including attribution clauses when relevant. We facilitate this by providing provenance information for each data point.

## Citation information

```
@misc{fujii2024swallowcode,  
    author       = { Kazuki Fujii, Rio Yokota },  
    title        = { Swallow-Code-v0.1 }, 
    year         = 2024,  
    url          = { https://huggingface.co/datasets/tokyotech-llm/swallow-code-v0.1 },  
	publisher    = { Swallow Project }
}
```