appledora commited on
Commit
f54ff18
·
verified ·
1 Parent(s): 9cea0d2

Upload __init__.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. __init__.py +32 -0
__init__.py ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # filename: __init__.py
2
+ from transformers.utils import (
3
+ OptionalDependencyNotAvailable,
4
+ _LazyModule,
5
+ is_torch_available,
6
+ )
7
+
8
+ try:
9
+ if not is_torch_available():
10
+ raise OptionalDependencyNotAvailable()
11
+ except OptionalDependencyNotAvailable:
12
+ pass
13
+ else:
14
+ from .modeling_recast_llama import (
15
+ RECAST7b_llamaModel,
16
+ RECAST7b_LlamaForCausalLM,
17
+ )
18
+ from .configuration_recast_llama import RECAST7b_llama
19
+
20
+ from transformers import AutoConfig, AutoModel, AutoModelForCausalLM
21
+
22
+ # Register your models with Auto classes
23
+ AutoConfig.register("recast7b_llama", RECAST7b_llama)
24
+ AutoModel.register(RECAST7b_llama, RECAST7b_llamaModel)
25
+ AutoModelForCausalLM.register(RECAST7b_llama, RECAST7b_LlamaForCausalLM)
26
+
27
+ _import_structure = {
28
+ "configuration_recast_llama": ["RECAST7b_llama"],
29
+ "modeling_recast_llama": ["RECAST7b_llamaModel", "RECAST7b_LlamaForCausalLM"],
30
+ }
31
+
32
+ __all__ = ["RECAST7b_llamaModel", "RECAST7b_LlamaForCausalLM", "RECAST7b_llama"]