DLMveloper commited on
Commit
5de9b41
·
verified ·
1 Parent(s): 1de9a01

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +95 -1
README.md CHANGED
@@ -12,4 +12,98 @@ tags:
12
  pretty_name: DLM DATASET
13
  ---
14
 
15
- The dataset was compiled for models and it was new, so I don’t know what it has.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12
  pretty_name: DLM DATASET
13
  ---
14
 
15
+ # DLM DATASET
16
+
17
+ ## Overview & Background
18
+ 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.
19
+
20
+ 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.
21
+
22
+ ---
23
+
24
+ ## Dataset Structure & Expected Schema
25
+
26
+ The dataset is formatted using **JSON** and **JSON Lines (JSONL)** to ensure fast parsing and seamless integration with modern deep learning frameworks.
27
+
28
+ ### Data Fields
29
+ Based on the compilation process, each data instance is expected to contain the following core attributes:
30
+ * **`id`** *(string)*: A unique identifier for tracking individual samples.
31
+ * **`text`** *(string)*: The primary payload, which can be a paragraph of natural language or a structured block of source code.
32
+ * **`language`** *(string)*: The language code representing the text content (`en`, `kk`, or `ru`).
33
+ * **`programming_language`** *(string, optional)*: Explicitly defined as `python` or `javascript` if the sample contains source code.
34
+ * **`metadata`** *(dictionary, optional)*: Additional contextual attributes such as source origin or license types.
35
+
36
+ ### Structural Example
37
+ ```json
38
+ {
39
+ "id": "dlm_instance_001",
40
+ "text": "def process_multilingual_stream(data):\n # TODO: Analyze token distribution\n return [item for item in data if item is not None]",
41
+ "language": "en",
42
+ "programming_language": "python",
43
+ "metadata": {
44
+ "source": "automated_compilation",
45
+ "split_hint": "train"
46
+ }
47
+ }
48
+
49
+ How to Use & Integration Guide
50
+ 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.
51
+
52
+
53
+ 1. Loading via Hugging Face datasets (Standard Workflow)
54
+ If you want to download and cache the dataset automatically, make sure you have the datasets library installed (pip install datasets).
55
+
56
+ from datasets import load_dataset
57
+
58
+ # Load the entire dataset into memory/cache
59
+ dataset = load_dataset("DLMveloper/DLM_DATASET")
60
+ print("Dataset loaded successfully:")
61
+ print(dataset)
62
+
63
+ # Access a specific slice or sample
64
+ first_sample = dataset['train'][0]
65
+ print(f"Sample Text: {first_sample['text']}")
66
+
67
+ 2. Stream Loading (Highly Recommended for Large Scale)
68
+ To avoid high memory overhead and start training or preprocessing immediately without waiting for the entire dataset to download, use the streaming=True parameter:
69
+ from datasets import load_dataset
70
+
71
+ # Initialize a streaming instance of the dataset
72
+ streaming_dataset = load_dataset("DLMveloper/DLM_DATASET", streaming=True)
73
+
74
+ # Iterate through the data dynamically on-the-fly
75
+ print("Streaming the first 5 examples:")
76
+ for i, sample in enumerate(streaming_dataset['train'].take(5)):
77
+ print(f"\n--- Sample {i+1} ---")
78
+ print(f"Language: {sample.get('language')}")
79
+ print(f"Content: {sample.get('text')[:150]}...")
80
+
81
+ 3. Local/Raw Processing of JSONL Files
82
+ 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:
83
+ import json
84
+
85
+ file_path = "path_to_your_local_file.jsonl"
86
+
87
+ print("Starting custom processing pipeline...")
88
+ with open(file_path, "r", encoding="utf-8") as file:
89
+ for line in file:
90
+ if not line.strip():
91
+ continue # Skip empty lines
92
+
93
+ # Parse individual JSON object
94
+ record = json.loads(line)
95
+
96
+ text_data = record.get("text")
97
+ lang = record.get("language")
98
+ prog_lang = record.get("programming_language")
99
+
100
+ # Inject your custom tokenization, filtering, or training logic here
101
+ pass
102
+
103
+ Intended Applications
104
+ This dataset is highly versatile and can be adapted for several downstream tasks:
105
+ 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.
106
+ Code Intelligence and Syntactical Modeling: Training models to generate, complete, or document python and javascript code snippets.
107
+ 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.
108
+ Current Status & Feedback
109
+ 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!