File size: 3,022 Bytes
4519d4a
ace6d64
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4519d4a
ace6d64
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
language:
- ja
pretty_name: lambda-chat
license: other
task_categories:
- text-generation
tags:
- japanese
- instruction-following
- conversational
- parquet
size_categories:
- 100K<n<1M
configs:
- config_name: default
  data_files:
  - split: train
    path: "train/*.parquet"
  - split: validation
    path: "validation.parquet"
  - split: test
    path: "test.parquet"
---

# lambda-chat

lambda-chat is a Japanese instruction-following dataset for supervised fine-tuning of chat models. It combines openly available datasets into one consistent chat format for easier use.

## Purpose

The dataset is intended for training and evaluating Japanese chat and instruction-following models. Each example uses a list of messages with `role` and `content` fields.

## Source Data

The dataset contains data from the following sources. 

- [APTO-001/ja-safety-sft-dataset](https://huggingface.co/datasets/APTO-001/ja-safety-sft-dataset)
- [APTO-001/japanese-civil-law-llm-instruction-dataset](https://huggingface.co/datasets/APTO-001/japanese-civil-law-llm-instruction-dataset)
- [APTO-001/instruction-following-dataset](https://huggingface.co/datasets/APTO-001/instruction-following-dataset)
- [APTO-001/japanese-reasoning-dataset-sample](https://huggingface.co/datasets/APTO-001/japanese-reasoning-dataset-sample)
- [APTO-001/japanese-style-contrast-dataset](https://huggingface.co/datasets/APTO-001/japanese-style-contrast-dataset)
- [APTO-001/llm-safety-japanese-multiturn-dataset](https://huggingface.co/datasets/APTO-001/llm-safety-japanese-multiturn-dataset)
- [megagonlabs/instruction_ja](https://huggingface.co/datasets/megagonlabs/instruction_ja)
- [llm-jp/extraction-wiki-ja](https://huggingface.co/datasets/llm-jp/extraction-wiki-ja)
- [llm-jp/llm-jp-instructions](https://huggingface.co/datasets/llm-jp/llm-jp-instructions)
- [llm-jp/magpie-sft-v1.0](https://huggingface.co/datasets/llm-jp/magpie-sft-v1.0)
- [OpenAssistant/oasst1](https://huggingface.co/datasets/OpenAssistant/oasst1)

`llm-jp/llm-jp-instructions` and `APTO-001/ja-safety-sft-dataset` are published under `CC BY 4.0` license.

## Data Processing

The source data was deduplicated, normalized with NFKC, and filtered to remove code and LaTeX content. The examples were then randomly shuffled and split into train, validation, and test sets.

## Dataset Size

| Split | Rows |
| --- | ---: |
| train | 183,072 |
| validation | 1,868 |
| test | 1,868 |
| total | 186,808 |

The dataset contains about 50M assistant tokens measured by Gemma 4 12B tokenizer.

## Columns

| Column | Description |
| --- | --- |
| `id` | Unique identifier for the example. |
| `messages` | Chat messages. Each message has `role` and `content`. |
| `output_char` | Number of characters in all assistant responses. |
| `output_token` | Number of tokens in all assistant responses. |
| `dataset_name` | Source dataset name |

## Example

```python
from datasets import load_dataset

dataset = load_dataset("KeisukeMiyamoto/lambda-chat")
print(dataset["train"][0])
```