File size: 5,402 Bytes
5831784
 
 
 
 
 
12a3790
e0a5b13
 
 
 
1de9a01
0b2779f
1de9a01
 
f680bef
 
5de9b41
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
c2acdda
5de9b41
 
 
 
 
 
738737a
5de9b41
 
 
 
738737a
5de9b41
 
 
 
 
95581c1
5de9b41
 
738737a
5de9b41
 
738737a
5de9b41
 
 
 
 
 
 
 
738737a
5de9b41
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
c2acdda
5de9b41
 
 
 
 
738737a
 
 
 
 
 
 
 
 
 
 
 
 
 
dbf2197
 
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
---
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']}")

2. 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]}...")

3. 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"
  }
}

"""