DLMveloper commited on
Commit
738737a
·
verified ·
1 Parent(s): c2acdda

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +19 -38
README.md CHANGED
@@ -33,62 +33,31 @@ Based on the compilation process, each data instance is expected to contain the
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
-
50
  ### How to Use & Integration Guide
51
  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.
52
-
53
-
54
  1. Loading via Hugging Face datasets (Standard Workflow)
55
  If you want to download and cache the dataset automatically, make sure you have the datasets library installed (pip install datasets).
56
 
57
-
58
  from datasets import load_dataset
59
 
60
-
61
- ### Load the entire dataset into memory/cache
62
-
63
-
64
  dataset = load_dataset("DLMveloper/DLM_DATASET")
65
  print("Dataset loaded successfully:")
66
  print(dataset)
67
 
68
-
69
- ### Access a specific slice or sample
70
-
71
-
72
  first_sample = dataset['train'][0]
73
  print(f"Sample Text: {first_sample['text']}")
74
 
75
-
76
  2. Stream Loading (Highly Recommended for Large Scale)
77
  To avoid high memory overhead and start training or preprocessing immediately without waiting for the entire dataset to download, use the streaming=True parameter:
78
 
79
-
80
  from datasets import load_dataset
81
 
82
-
83
- ### Initialize a streaming instance of the dataset
84
-
85
-
86
  streaming_dataset = load_dataset("DLMveloper/DLM_DATASET", streaming=True)
87
 
88
-
89
- ### Iterate through the data dynamically on-the-fly
90
-
91
-
92
  print("Streaming the first 5 examples:")
93
  for i, sample in enumerate(streaming_dataset['train'].take(5)):
94
  print(f"\n--- Sample {i+1} ---")
@@ -97,6 +66,7 @@ for i, sample in enumerate(streaming_dataset['train'].take(5)):
97
 
98
  3. Local/Raw Processing of JSONL Files
99
  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:
 
100
  import json
101
 
102
  file_path = "path_to_your_local_file.jsonl"
@@ -117,12 +87,23 @@ with open(file_path, "r", encoding="utf-8") as file:
117
  # Inject your custom tokenization, filtering, or training logic here
118
  pass
119
 
120
-
121
-
122
  ### Intended Applications
123
  This dataset is highly versatile and can be adapted for several downstream tasks:
124
  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.
125
  Code Intelligence and Syntactical Modeling: Training models to generate, complete, or document python and javascript code snippets.
126
  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.
127
  Current Status & Feedback
128
- 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!
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
  ### How to Use & Integration Guide
37
  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.
 
 
38
  1. Loading via Hugging Face datasets (Standard Workflow)
39
  If you want to download and cache the dataset automatically, make sure you have the datasets library installed (pip install datasets).
40
 
 
41
  from datasets import load_dataset
42
 
43
+ # Load the entire dataset into memory/cache
 
 
 
44
  dataset = load_dataset("DLMveloper/DLM_DATASET")
45
  print("Dataset loaded successfully:")
46
  print(dataset)
47
 
48
+ # Access a specific slice or sample
 
 
 
49
  first_sample = dataset['train'][0]
50
  print(f"Sample Text: {first_sample['text']}")
51
 
 
52
  2. Stream Loading (Highly Recommended for Large Scale)
53
  To avoid high memory overhead and start training or preprocessing immediately without waiting for the entire dataset to download, use the streaming=True parameter:
54
 
 
55
  from datasets import load_dataset
56
 
57
+ # Initialize a streaming instance of the dataset
 
 
 
58
  streaming_dataset = load_dataset("DLMveloper/DLM_DATASET", streaming=True)
59
 
60
+ # Iterate through the data dynamically on-the-fly
 
 
 
61
  print("Streaming the first 5 examples:")
62
  for i, sample in enumerate(streaming_dataset['train'].take(5)):
63
  print(f"\n--- Sample {i+1} ---")
 
66
 
67
  3. Local/Raw Processing of JSONL Files
68
  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:
69
+
70
  import json
71
 
72
  file_path = "path_to_your_local_file.jsonl"
 
87
  # Inject your custom tokenization, filtering, or training logic here
88
  pass
89
 
 
 
90
  ### Intended Applications
91
  This dataset is highly versatile and can be adapted for several downstream tasks:
92
  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.
93
  Code Intelligence and Syntactical Modeling: Training models to generate, complete, or document python and javascript code snippets.
94
  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.
95
  Current Status & Feedback
96
+ 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!
97
+
98
+ ### Structural Examples
99
+
100
+ {
101
+ "id": "dlm_instance_001",
102
+ "text": "def process_multilingual_stream(data):\n # TODO: Analyze token distribution\n return [item for item in data if item is not None]",
103
+ "language": "en",
104
+ "programming_language": "python",
105
+ "metadata": {
106
+ "source": "automated_compilation",
107
+ "split_hint": "train"
108
+ }
109
+ }