Rename experiments/exp_007_aleph_routed_attention/lexical_atlas.py to experiments/exp_007_aleph_routed_attention/3_lexical_atlas.py
Browse files
experiments/exp_007_aleph_routed_attention/{lexical_atlas.py → 3_lexical_atlas.py}
RENAMED
|
@@ -61,6 +61,8 @@ import torch
|
|
| 61 |
import torch.nn.functional as F
|
| 62 |
from torch import Tensor
|
| 63 |
|
|
|
|
|
|
|
| 64 |
DATASET = "AbstractPhil/wordnet-lexical-topology"
|
| 65 |
PAD_BYTE = 0x00 # reserved pad symbol (documented, learned slot)
|
| 66 |
|
|
@@ -482,9 +484,9 @@ if __name__ == "__main__":
|
|
| 482 |
ap = argparse.ArgumentParser(description="Full lexical-topology atlas")
|
| 483 |
ap.add_argument("--checkpoint", default=None)
|
| 484 |
ap.add_argument("--configs", nargs="+",
|
| 485 |
-
default=["
|
| 486 |
-
|
| 487 |
-
|
| 488 |
ap.add_argument("--d-base", type=int, default=48)
|
| 489 |
ap.add_argument("--out", default="atlas")
|
| 490 |
ap.add_argument("--device",
|
|
|
|
| 61 |
import torch.nn.functional as F
|
| 62 |
from torch import Tensor
|
| 63 |
|
| 64 |
+
from aleph_trigram_lm import statute
|
| 65 |
+
|
| 66 |
DATASET = "AbstractPhil/wordnet-lexical-topology"
|
| 67 |
PAD_BYTE = 0x00 # reserved pad symbol (documented, learned slot)
|
| 68 |
|
|
|
|
| 484 |
ap = argparse.ArgumentParser(description="Full lexical-topology atlas")
|
| 485 |
ap.add_argument("--checkpoint", default=None)
|
| 486 |
ap.add_argument("--configs", nargs="+",
|
| 487 |
+
default=["char_eng_unigram", "char_eng_2gram",
|
| 488 |
+
"char_eng_3gram", "char_eng_4gram",
|
| 489 |
+
"char_eng_5gram"])
|
| 490 |
ap.add_argument("--d-base", type=int, default=48)
|
| 491 |
ap.add_argument("--out", default="atlas")
|
| 492 |
ap.add_argument("--device",
|