DLM_DataSet / README.md
DLMveloper's picture
Update README.md
0b2779f verified
|
Raw
History Blame Contribute Delete
5.4 kB
metadata
language:
  - en
  - kk
  - ru
size_categories:
  - 10M<n<100M
tags:
  - json
  - python
  - javascript
pretty_name: DLM DATASET
license: other

README.md for Dataset:

DLM DATASET

Overview & Background

I compiled this large-scale dataset specifically for training, evaluating, and fine-tuning advanced machine learning models, code assistants, and multi-lingual NLP systems. Because this is a brand new compilation, I don't fully know its exact internal statistics, precise token distribution, or the definitive ratio between natural language text and source code yet.

However, the dataset is structured to provide a comprehensive mix of textual data across three languages—English (en), Kazakh (kk), and Russian (ru)—heavily combined with programming language corpora focusing on python and javascript. While the exact data distribution is still being explored, I know exactly how to integrate it into training pipelines, manage its memory footprint, and utilize it effectively.


Dataset Structure & Expected Schema

The dataset is formatted using JSON and JSON Lines (JSONL) to ensure fast parsing and seamless integration with modern deep learning frameworks.

Data Fields

Based on the compilation process, each data instance is expected to contain the following core attributes:

  • id (string): A unique identifier for tracking individual samples.
  • text (string): The primary payload, which can be a paragraph of natural language or a structured block of source code.
  • language (string): The language code representing the text content (en, kk, or ru).
  • programming_language (string, optional): Explicitly defined as python or javascript if the sample contains source code.
  • metadata (dictionary, optional): Additional contextual attributes such as source origin or license types.

How to Use & Integration Guide

Since the dataset is quite large (ranging between 10 million and 100 million rows), loading it entirely into RAM might be inefficient depending on your hardware setup. Below are the recommended ways to handle the data.

  1. Loading via Hugging Face datasets (Standard Workflow) If you want to download and cache the dataset automatically, make sure you have the datasets library installed (pip install datasets).

from datasets import load_dataset

Load the entire dataset into memory/cache

dataset = load_dataset("DLMveloper/DLM_DATASET") print("Dataset loaded successfully:") print(dataset)

Access a specific slice or sample

first_sample = dataset['train'][0] print(f"Sample Text: {first_sample['text']}")

  1. Stream Loading (Highly Recommended for Large Scale) To avoid high memory overhead and start training or preprocessing immediately without waiting for the entire dataset to download, use the streaming=True parameter:

from datasets import load_dataset

Initialize a streaming instance of the dataset

streaming_dataset = load_dataset("DLMveloper/DLM_DATASET", streaming=True)

Iterate through the data dynamically on-the-fly

print("Streaming the first 5 examples:") for i, sample in enumerate(streaming_dataset['train'].take(5)): print(f"\n--- Sample {i+1} ---") print(f"Language: {sample.get('language')}") print(f"Content: {sample.get('text')[:150]}...")

  1. Local/Raw Processing of JSONL Files If you prefer to work with the raw files manually, you can process them line-by-line using standard Python libraries to keep memory usage at a bare minimum:

import json

file_path = "path_to_your_local_file.jsonl"

print("Starting custom processing pipeline...") with open(file_path, "r", encoding="utf-8") as file: for line in file: if not line.strip(): continue # Skip empty lines

    # Parse individual JSON object
    record = json.loads(line)
    
    text_data = record.get("text")
    lang = record.get("language")
    prog_lang = record.get("programming_language")
    
    # Inject your custom tokenization, filtering, or training logic here
    pass

Intended Applications

This dataset is highly versatile and can be adapted for several downstream tasks: Multilingual Language Modeling: Enhancing model capabilities across English, Russian, and especially Kazakh (kk), which is highly valuable due to the scarcity of high-quality Kazakh datasets. Code Intelligence and Syntactical Modeling: Training models to generate, complete, or document python and javascript code snippets. Cross-Lingual Code Understanding: Building LLMs capable of understanding natural language instructions in one language (e.g., Kazakh or Russian) and translating them directly into working code. Current Status & Feedback Because I am still exploring the final composition of this new dataset, feedback is highly appreciated. If you run an Exploratory Data Analysis (EDA), extract unique statistical insights, or successfully train a model using DLM DATASET, please share your results or suggestions by opening a Discussion in the community tab!

Structural Examples

{ "id": "dlm_instance_001", "text": "def process_multilingual_stream(data):\n # TODO: Analyze token distribution\n return [item for item in data if item is not None]", "language": "en", "programming_language": "python", "metadata": { "source": "automated_compilation", "split_hint": "train" } }

"""