cognitivess
commited on
Commit
•
a137844
1
Parent(s):
797a52c
Update cognitivess_model/__init__.py
Browse files- cognitivess_model/__init__.py +20 -115
cognitivess_model/__init__.py
CHANGED
@@ -1,116 +1,21 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
#
|
9 |
-
# Unless required by applicable law or agreed to in writing, software
|
10 |
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
11 |
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12 |
-
# See the License for the specific language governing permissions and
|
13 |
-
# limitations under the License.
|
14 |
-
from typing import TYPE_CHECKING
|
15 |
-
|
16 |
-
from ...utils import (
|
17 |
-
OptionalDependencyNotAvailable,
|
18 |
-
_LazyModule,
|
19 |
-
is_flax_available,
|
20 |
-
is_sentencepiece_available,
|
21 |
-
is_tokenizers_available,
|
22 |
-
is_torch_available,
|
23 |
)
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
try:
|
39 |
-
if not is_tokenizers_available():
|
40 |
-
raise OptionalDependencyNotAvailable()
|
41 |
-
except OptionalDependencyNotAvailable:
|
42 |
-
pass
|
43 |
-
else:
|
44 |
-
_import_structure["tokenization_Cognitivess_fast"] = ["CognitivessTokenizerFast"]
|
45 |
-
|
46 |
-
try:
|
47 |
-
if not is_torch_available():
|
48 |
-
raise OptionalDependencyNotAvailable()
|
49 |
-
except OptionalDependencyNotAvailable:
|
50 |
-
pass
|
51 |
-
else:
|
52 |
-
_import_structure["modeling_Cognitivess"] = [
|
53 |
-
"CognitivessForCausalLM",
|
54 |
-
"CognitivessModel",
|
55 |
-
"CognitivessPreTrainedModel",
|
56 |
-
"CognitivessForSequenceClassification",
|
57 |
-
"CognitivessForQuestionAnswering",
|
58 |
-
"CognitivessForTokenClassification",
|
59 |
-
]
|
60 |
-
|
61 |
-
try:
|
62 |
-
if not is_flax_available():
|
63 |
-
raise OptionalDependencyNotAvailable()
|
64 |
-
except OptionalDependencyNotAvailable:
|
65 |
-
pass
|
66 |
-
else:
|
67 |
-
_import_structure["modeling_flax_Cognitivess"] = ["FlaxCognitivessForCausalLM", "FlaxCognitivessModel", "FlaxCognitivessPreTrainedModel"]
|
68 |
-
|
69 |
-
|
70 |
-
if TYPE_CHECKING:
|
71 |
-
from .configuration_Cognitivess import CognitivessConfig
|
72 |
-
|
73 |
-
try:
|
74 |
-
if not is_sentencepiece_available():
|
75 |
-
raise OptionalDependencyNotAvailable()
|
76 |
-
except OptionalDependencyNotAvailable:
|
77 |
-
pass
|
78 |
-
else:
|
79 |
-
from .tokenization_Cognitivess import CognitivessTokenizer
|
80 |
-
|
81 |
-
try:
|
82 |
-
if not is_tokenizers_available():
|
83 |
-
raise OptionalDependencyNotAvailable()
|
84 |
-
except OptionalDependencyNotAvailable:
|
85 |
-
pass
|
86 |
-
else:
|
87 |
-
from .tokenization_Cognitivess_fast import CognitivessTokenizerFast
|
88 |
-
|
89 |
-
try:
|
90 |
-
if not is_torch_available():
|
91 |
-
raise OptionalDependencyNotAvailable()
|
92 |
-
except OptionalDependencyNotAvailable:
|
93 |
-
pass
|
94 |
-
else:
|
95 |
-
from .modeling_Cognitivess import (
|
96 |
-
CognitivessForCausalLM,
|
97 |
-
CognitivessForQuestionAnswering,
|
98 |
-
CognitivessForSequenceClassification,
|
99 |
-
CognitivessForTokenClassification,
|
100 |
-
CognitivessModel,
|
101 |
-
CognitivessPreTrainedModel,
|
102 |
-
)
|
103 |
-
|
104 |
-
try:
|
105 |
-
if not is_flax_available():
|
106 |
-
raise OptionalDependencyNotAvailable()
|
107 |
-
except OptionalDependencyNotAvailable:
|
108 |
-
pass
|
109 |
-
else:
|
110 |
-
from .modeling_flax_Cognitivess import FlaxCognitivessForCausalLM, FlaxCognitivessModel, FlaxCognitivessPreTrainedModel
|
111 |
-
|
112 |
-
|
113 |
-
else:
|
114 |
-
import sys
|
115 |
-
|
116 |
-
sys.modules[__name__] = _LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)
|
|
|
1 |
+
from .configuration_cognitivess import CognitivessConfig
|
2 |
+
from .modeling_cognitivess import (
|
3 |
+
CognitivessModel,
|
4 |
+
CognitivessForCausalLM,
|
5 |
+
CognitivessForSequenceClassification,
|
6 |
+
CognitivessForTokenClassification,
|
7 |
+
CognitivessForQuestionAnswering,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
)
|
9 |
+
from .tokenization_cognitivess import CognitivessTokenizer
|
10 |
+
from .tokenization_cognitivess_fast import CognitivessTokenizerFast
|
11 |
+
|
12 |
+
__all__ = [
|
13 |
+
"CognitivessConfig",
|
14 |
+
"CognitivessModel",
|
15 |
+
"CognitivessForCausalLM",
|
16 |
+
"CognitivessForSequenceClassification",
|
17 |
+
"CognitivessForTokenClassification",
|
18 |
+
"CognitivessForQuestionAnswering",
|
19 |
+
"CognitivessTokenizer",
|
20 |
+
"CognitivessTokenizerFast",
|
21 |
+
]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|