Instructions to use SaeedLab/TITAN-BBB with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use SaeedLab/TITAN-BBB with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("SaeedLab/TITAN-BBB", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Commit ·
72fa1d9
1
Parent(s): 21fa57e
update
Browse files- classification/tokenizer_bbb.py +1 -1
- regression/tokenizer_bbb.py +1 -1
- tokenizer_bbb.py +1 -1
classification/tokenizer_bbb.py
CHANGED
|
@@ -84,7 +84,7 @@ class BBBTokenizer(PreTrainedTokenizer):
|
|
| 84 |
return_tensors: str = "pt",
|
| 85 |
**kwargs
|
| 86 |
):
|
| 87 |
-
if self.
|
| 88 |
if task == 'classification':
|
| 89 |
model_dir = snapshot_download("SaeedLab/TITAN-BBB", allow_patterns=["normalize_cls_tabular.joblib"])
|
| 90 |
transformer_tab_path = os.path.join(model_dir, "normalize_cls_tabular.joblib")
|
|
|
|
| 84 |
return_tensors: str = "pt",
|
| 85 |
**kwargs
|
| 86 |
):
|
| 87 |
+
if self.feature_transformer_tab is None and self.feature_transformer_img is None and self.feature_transformer_txt is None:
|
| 88 |
if task == 'classification':
|
| 89 |
model_dir = snapshot_download("SaeedLab/TITAN-BBB", allow_patterns=["normalize_cls_tabular.joblib"])
|
| 90 |
transformer_tab_path = os.path.join(model_dir, "normalize_cls_tabular.joblib")
|
regression/tokenizer_bbb.py
CHANGED
|
@@ -84,7 +84,7 @@ class BBBTokenizer(PreTrainedTokenizer):
|
|
| 84 |
return_tensors: str = "pt",
|
| 85 |
**kwargs
|
| 86 |
):
|
| 87 |
-
if self.
|
| 88 |
if task == 'classification':
|
| 89 |
model_dir = snapshot_download("SaeedLab/TITAN-BBB", allow_patterns=["normalize_cls_tabular.joblib"])
|
| 90 |
transformer_tab_path = os.path.join(model_dir, "normalize_cls_tabular.joblib")
|
|
|
|
| 84 |
return_tensors: str = "pt",
|
| 85 |
**kwargs
|
| 86 |
):
|
| 87 |
+
if self.feature_transformer_tab is None and self.feature_transformer_img is None and self.feature_transformer_txt is None:
|
| 88 |
if task == 'classification':
|
| 89 |
model_dir = snapshot_download("SaeedLab/TITAN-BBB", allow_patterns=["normalize_cls_tabular.joblib"])
|
| 90 |
transformer_tab_path = os.path.join(model_dir, "normalize_cls_tabular.joblib")
|
tokenizer_bbb.py
CHANGED
|
@@ -84,7 +84,7 @@ class BBBTokenizer(PreTrainedTokenizer):
|
|
| 84 |
return_tensors: str = "pt",
|
| 85 |
**kwargs
|
| 86 |
):
|
| 87 |
-
if self.
|
| 88 |
if task == 'classification':
|
| 89 |
model_dir = snapshot_download("SaeedLab/TITAN-BBB", allow_patterns=["normalize_cls_tabular.joblib"])
|
| 90 |
transformer_tab_path = os.path.join(model_dir, "normalize_cls_tabular.joblib")
|
|
|
|
| 84 |
return_tensors: str = "pt",
|
| 85 |
**kwargs
|
| 86 |
):
|
| 87 |
+
if self.feature_transformer_tab is None and self.feature_transformer_img is None and self.feature_transformer_txt is None:
|
| 88 |
if task == 'classification':
|
| 89 |
model_dir = snapshot_download("SaeedLab/TITAN-BBB", allow_patterns=["normalize_cls_tabular.joblib"])
|
| 90 |
transformer_tab_path = os.path.join(model_dir, "normalize_cls_tabular.joblib")
|