--- dataset_info: - config_name: default features: - name: text dtype: string - name: id dtype: string - name: dump dtype: string - name: url dtype: string - name: date dtype: string - name: file_path dtype: string - name: language dtype: string - name: language_score dtype: float64 - name: language_script dtype: string - name: minhash_cluster_size dtype: int64 - name: top_langs dtype: string - name: score dtype: float64 - name: token_count dtype: int64 splits: - name: train num_bytes: 619265264278 num_examples: 120457229 - name: test num_bytes: 40181573 num_examples: 7720 download_size: 326618761483 dataset_size: 619305445851 - config_name: small_tokens features: - name: text dtype: string - name: id dtype: string - name: dump dtype: string - name: url dtype: string - name: date dtype: string - name: file_path dtype: string - name: language dtype: string - name: language_score dtype: float64 - name: language_script dtype: string - name: minhash_cluster_size dtype: int64 - name: top_langs dtype: string - name: score dtype: float64 - name: token_count dtype: int64 splits: - name: train num_bytes: 144004611027 num_examples: 64149872 - name: test num_bytes: 9085221 num_examples: 4041 download_size: 77794780909 dataset_size: 144013696248 - config_name: small_tokens_cleaned features: - name: text dtype: string - name: is_cleaned dtype: bool - name: id dtype: string - name: dump dtype: string - name: url dtype: string - name: date dtype: string - name: file_path dtype: string - name: language dtype: string - name: language_score dtype: float64 - name: language_script dtype: string - name: minhash_cluster_size dtype: int64 - name: top_langs dtype: string - name: score dtype: float64 - name: token_count dtype: int64 splits: - name: train num_bytes: 141337983537 num_examples: 64159872 - name: test num_bytes: 17827073 num_examples: 8082 download_size: 75983008004 dataset_size: 141355810610 configs: - config_name: default data_files: - split: train path: data/train-* - split: test path: data/test-* - config_name: small_tokens data_files: - split: train path: small_tokens/train-* - split: test path: small_tokens/test-* - config_name: small_tokens_cleaned data_files: - split: train path: small_tokens_cleaned/train-* - split: test path: small_tokens_cleaned/test-* --- # 🍷 FineWeb2 Educational Dataset for Japanese Language ![FineWeb2 Edu Japanese image](https://huggingface.co/datasets/hotchpotch/fineweb-2-edu-japanese/resolve/main/assets/fw2.png) FineWeb2 の日本語データセット(376M件)から、教育向けコンテンツに絞ってフィルタリングした、120M件の文章のデータセット(約89.3Bトークン)です。以下のサブセットも公開しています。 - default / 約120M(1.2億件)のデータ・約89.3Bトークン - sample_10BT / default からランダムサンプリングした、約10Bトークンのデータ - small_tokens / token_count が512以下で構成される短い文章のデータ - small_tokens_cleaned / small_tokens から、さらにWeb特有のテキストノイズを取り除いたデータ ## 🍷 FineWeb2 Edu Japanese [FineWeb](https://huggingface.co/datasets/HuggingFaceFW/fineweb) (英語のみ)は、Webデータから重複削除・高品質のテキスト抽出を行なったデータセットです。さらに教育に適した質の高いテキストを抽出した[FineWeb-Edu](https://huggingface.co/datasets/HuggingFaceFW/fineweb-edu) データセットでは、FineWeb より少ないトークン数でもより良い学習を行うことが可能です。 2024年12月に公開された、[FineWeb2](https://huggingface.co/datasets/HuggingFaceFW/fineweb-2) は多言語(日本語を含む)に対応し、重複除去・高品質データセットとして公開されました。 ただ2025年2月現在、教育に適した質の高い「Edu」データセットは公開されてなかったため、[FineWeb2 Edu Japaneseデータセット](https://huggingface.co/datasets/hotchpotch/fineweb-2-edu-japanese)を作成し、公開しました。 ## 教育的なデータのフィルタリング フィルタリングには、FineWeb 2 日本語のデータを用いて、教育向け文章の判定機 [fineweb-2-edu-japanese-classifier](https://huggingface.co/hotchpotch/fineweb-2-edu-japanese-classifier) を作成しました。スコアの教師データとしては、DeepSeek-API (deepseek-chat) を使いスコアリングした、[fineweb-2-edu-japanese-scores](https://huggingface.co/datasets/hotchpotch/fineweb-2-edu-japanese-scores)を使っています。 本データセットでは、この教育向け文章の判定機(GPUバージョン)を用い、スコア 2.5以上のデータでフィルターしました。スコアは `score` カラムに付与してあります。 ## トークンカウントの付与 [ModernBERT-Ja-130M](https://huggingface.co/sbintuitions/modernbert-ja-130m)のトークナイザでカウントしたトークン数を、`token_count` カラムに付与してあります。 ## Web 特有のノイズ除去 FineWeb2 の日本語には、Web特有のボイラープレートやノイズが含まれます。例えば、以下のような文章です。 ``` この文章は90日以上更新の無いサイトに表示されています。 ログイン ログアウト 本当に必要な文章以外にも、さまざまなノイズが含まれていることがあります。例えば、この文章もその一例です。本来不要なテキストが入ってしまうことがこのようにあるでしょう。 今なら50%オフ!クリックしてリンク先の商品を表示 とりわけ文章長が短い場合、文章のほとんどがノイズを含む可能性があります。それらを取り除くことで、より高品質の文章を抽出できないかと考えています。 前のページ 次のページ ``` これらの文章を取り除くため、ノイズ文章の判定機 [fineweb-2-japanese-text-cleaner](https://huggingface.co/hotchpotch/fineweb-2-japanese-text-cleaner) を作成しました。ノイズ判定の教師データは[fineweb-2-japanese-noise-spans](https://huggingface.co/datasets/hotchpotch/fineweb-2-japanese-noise-spans)を使っています。このデータセットの作成には、[cyberagent/DeepSeek-R1-Distill-Qwen-32B-Japanese](https://huggingface.co/cyberagent/DeepSeek-R1-Distill-Qwen-32B-Japanese)を利用しました。 この判定機 fineweb-2-japanese-text-cleaner を使うことで、例えば先ほどの文章では、以下のようにノイズ箇所が判定できます。 ``` [NOISE]この文章は90日以上更新の無いサイトに表示されています。[/NOISE] [NOISE]ログイン[/NOISE] [NOISE]ログアウト[/NOISE] 本当に必要な文章以外にも、さまざまなノイズが含まれていることがあります。例えば、この文章もその一例です。本来不要なテキストが入ってしまうことがこのようにあるでしょう。 [NOISE] 今なら50%オフ!クリックしてリンク先の商品を表示[/NOISE] とりわけ文章長が短い場合、文章のほとんどがノイズを含む可能性があります。それらを取り除くことで、より高品質の文章を抽出できないかと考えています。 [NOISE]前のページ[/NOISE] [NOISE]次のページ[/NOISE] ``` `small_tokens_cleaned` は、`small_tokens` のデータから、さらに `fineweb-2-japanese-text-cleaned` を使ってノイズを取り除いたデータが入っています。なお、ノイズ部分を判定した生データは[fineweb-2-edu-japanese-noise-detect-raw](https://huggingface.co/datasets/hotchpotch/fineweb-2-edu-japanese-noise-detect-raw)にあります。 なお、完璧にノイズは除去されているわけではなく、また場合によっては正しい部分もノイズとして取り除いている可能性があるため、ご注意ください。 ## ライセンス このデータセットは元の FineWeb2 と同様の **Open Data Commons Attribution License (ODC-By) v1.0** [ライセンス](https://opendatacommons.org/licenses/by/1-0/)の下で公開されています。また、このデータセットの使用には[CommonCrawlの利用規約](https://commoncrawl.org/terms-of-use)も適用されます。 ## Citation Information ``` @software{yuichi2025fineweb-2-edu-japanese, author = {Yuichi Tateno}, title = {FineWeb2 Educational Dataset for Japanese Language}, month = feb, year = 2025, url = {https://huggingface.co/datasets/hotchpotch/fineweb-2-edu-japanese/} } ```