Upload src/mine_memorized.py with huggingface_hub
Browse files- src/mine_memorized.py +3 -3
src/mine_memorized.py
CHANGED
|
@@ -49,7 +49,7 @@ def sample_sequences(
|
|
| 49 |
min_text_tokens: int = None,
|
| 50 |
seed: int = 42,
|
| 51 |
streaming: bool = True,
|
| 52 |
-
dataset_config: Optional[str] =
|
| 53 |
text_column: str = "text",
|
| 54 |
) -> list[MemorizedSequence]:
|
| 55 |
"""
|
|
@@ -253,14 +253,14 @@ def filter_memorized(
|
|
| 253 |
def mine_memorized_sequences(
|
| 254 |
model: nn.Module,
|
| 255 |
tokenizer,
|
| 256 |
-
dataset_name: str = "allenai/
|
| 257 |
target_count: int = 1000,
|
| 258 |
max_candidates: int = 50000,
|
| 259 |
prefix_len: int = 64,
|
| 260 |
suffix_len: int = 48,
|
| 261 |
batch_size: int = 8,
|
| 262 |
seed: int = 42,
|
| 263 |
-
dataset_config: Optional[str] =
|
| 264 |
strict: bool = True,
|
| 265 |
) -> list[MemorizedSequence]:
|
| 266 |
"""
|
|
|
|
| 49 |
min_text_tokens: int = None,
|
| 50 |
seed: int = 42,
|
| 51 |
streaming: bool = True,
|
| 52 |
+
dataset_config: Optional[str] = "en", # Default to English for C4
|
| 53 |
text_column: str = "text",
|
| 54 |
) -> list[MemorizedSequence]:
|
| 55 |
"""
|
|
|
|
| 253 |
def mine_memorized_sequences(
|
| 254 |
model: nn.Module,
|
| 255 |
tokenizer,
|
| 256 |
+
dataset_name: str = "allenai/c4",
|
| 257 |
target_count: int = 1000,
|
| 258 |
max_candidates: int = 50000,
|
| 259 |
prefix_len: int = 64,
|
| 260 |
suffix_len: int = 48,
|
| 261 |
batch_size: int = 8,
|
| 262 |
seed: int = 42,
|
| 263 |
+
dataset_config: Optional[str] = "en", # Default to English for C4
|
| 264 |
strict: bool = True,
|
| 265 |
) -> list[MemorizedSequence]:
|
| 266 |
"""
|