Datasets:
Update README.md
Browse files
README.md
CHANGED
@@ -44,7 +44,35 @@ good luck !🧑🏻🚀🚀
|
|
44 |
|
45 |
[nreimers/reddit_question_best_answers](https://huggingface.co/datasets/nreimers/reddit_question_best_answers)
|
46 |
|
47 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48 |
|
49 |
```python
|
50 |
import json
|
|
|
44 |
|
45 |
[nreimers/reddit_question_best_answers](https://huggingface.co/datasets/nreimers/reddit_question_best_answers)
|
46 |
|
47 |
+
# How To Use :
|
48 |
+
|
49 |
+
Combine random shards in random quantities to produce a very high quality conversational training dataset for fine tuning by running the following code:
|
50 |
+
|
51 |
+
```python
|
52 |
+
|
53 |
+
import random
|
54 |
+
|
55 |
+
# Define the shards
|
56 |
+
shards = [f"shard_{i}" for i in range(1, 34)]
|
57 |
+
|
58 |
+
# Function to combine random shards
|
59 |
+
def combine_shards():
|
60 |
+
# Select a random shard
|
61 |
+
selected_shard = random.choice(shards)
|
62 |
+
|
63 |
+
# Select a random quantity (1-5)
|
64 |
+
quantity = random.randint(1, 5)
|
65 |
+
|
66 |
+
return selected_shard, quantity
|
67 |
+
|
68 |
+
# Example usage
|
69 |
+
for _ in range(10): # Combine 10 times as an example
|
70 |
+
shard, qty = combine_shards()
|
71 |
+
print(f"Combined {qty} of {shard}")
|
72 |
+
|
73 |
+
```
|
74 |
+
|
75 |
+
# Pre-Processing
|
76 |
|
77 |
```python
|
78 |
import json
|