dongyh commited on
Commit
545d83f
·
verified ·
1 Parent(s): 55c82d2

Upload 2 files

Browse files
Files changed (2) hide show
  1. __init__.py +15 -0
  2. aliases.py +7 -0
__init__.py ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from .config import *
2
+ from .model import *
3
+ from .tokenizer import *
4
+
5
+
6
+ def check_install(cuda: bool = False):
7
+ import torch
8
+
9
+ from .version import VERSION
10
+
11
+ if cuda:
12
+ assert torch.cuda.is_available(), "CUDA is not available!"
13
+ print("CUDA available")
14
+
15
+ print(f"OLMo v{VERSION} installed")
aliases.py ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ from os import PathLike
2
+ from typing import Union
3
+
4
+ __all__ = ["PathOrStr"]
5
+
6
+
7
+ PathOrStr = Union[str, PathLike]