tmnt 0.7.46b20240330__py3-none-any.whl → 0.7.47__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- tmnt/data_loading.py +5 -4
- {tmnt-0.7.46b20240330.dist-info → tmnt-0.7.47.dist-info}/METADATA +1 -1
- {tmnt-0.7.46b20240330.dist-info → tmnt-0.7.47.dist-info}/RECORD +7 -7
- {tmnt-0.7.46b20240330.dist-info → tmnt-0.7.47.dist-info}/LICENSE +0 -0
- {tmnt-0.7.46b20240330.dist-info → tmnt-0.7.47.dist-info}/NOTICE +0 -0
- {tmnt-0.7.46b20240330.dist-info → tmnt-0.7.47.dist-info}/WHEEL +0 -0
- {tmnt-0.7.46b20240330.dist-info → tmnt-0.7.47.dist-info}/top_level.txt +0 -0
tmnt/data_loading.py
CHANGED
@@ -40,20 +40,21 @@ llm_catalog = {
|
|
40
40
|
'sentence-transformers/all-mpnet-base-v2' : (AutoTokenizer.from_pretrained, AutoModel.from_pretrained),
|
41
41
|
'allenai/scibert_scivocab_uncased': (AutoTokenizer.from_pretrained, AutoModel.from_pretrained),
|
42
42
|
'johngiorgi/declutr-sci-base': (AutoTokenizer.from_pretrained, AutoModel.from_pretrained),
|
43
|
-
'BAAI/bge-base-en-v1.5': (AutoTokenizer.from_pretrained, AutoModel.from_pretrained)
|
43
|
+
'BAAI/bge-base-en-v1.5': (AutoTokenizer.from_pretrained, AutoModel.from_pretrained),
|
44
|
+
'pritamdeka/BioBERT-mnli-snli-scinli-scitail-mednli-stsb': (AutoTokenizer.from_pretrained, AutoModel.from_pretrained)
|
44
45
|
## add more model options here if desired
|
45
46
|
}
|
46
47
|
|
47
48
|
def get_llm(model_name):
|
48
|
-
tok_fn, model_fn = llm_catalog
|
49
|
+
tok_fn, model_fn = llm_catalog.get(model_name, ((AutoTokenizer.from_pretrained, AutoModel.from_pretrained)))
|
49
50
|
return tok_fn(model_name), model_fn(model_name)
|
50
51
|
|
51
52
|
def get_llm_tokenizer(model_name):
|
52
|
-
tok_fn,
|
53
|
+
tok_fn, model_fn = llm_catalog.get(model_name, ((AutoTokenizer.from_pretrained, AutoModel.from_pretrained)))
|
53
54
|
return tok_fn(model_name)
|
54
55
|
|
55
56
|
def get_llm_model(model_name):
|
56
|
-
|
57
|
+
tok_fn, model_fn = llm_catalog.get(model_name, ((AutoTokenizer.from_pretrained, AutoModel.from_pretrained)))
|
57
58
|
return model_fn(model_name)
|
58
59
|
|
59
60
|
def get_unwrapped_llm_dataloader(data, bow_vectorizer, llm_name, label_map, batch_size, max_len, shuffle=False, device='cpu'):
|
@@ -1,6 +1,6 @@
|
|
1
1
|
tmnt/__init__.py,sha256=EPNq1H7UMyMewWT_zTGBaC7ZouvCywX_gMX4G1dtmvw,250
|
2
2
|
tmnt/configuration.py,sha256=P8PEhzVPKO5xG0FrdTLRQ60OYWigbzPY-OSx_hzQlrY,10054
|
3
|
-
tmnt/data_loading.py,sha256=
|
3
|
+
tmnt/data_loading.py,sha256=A0tsM6x61BGhYBV6rAYdryz2NwbR__8EAYj_Q4Z-DCs,18736
|
4
4
|
tmnt/distribution.py,sha256=Pmyc5gwDd_-jP7vLVb0vdNQaSSvF1EuiTZEWg3KfmI8,10866
|
5
5
|
tmnt/estimator.py,sha256=cRdA3s3_PmbSU36xYc8cfano_rkqEl9j_0FM3eZ8IA8,76953
|
6
6
|
tmnt/eval_npmi.py,sha256=ODRDMsBgDM__iCNEX399ck7bAhl7ydvgDqmpfR7Y-q4,5048
|
@@ -17,9 +17,9 @@ tmnt/utils/ngram_helpers.py,sha256=VrIzou2oQHCLBLSWODDeikN3PYat1NqqvEeYQj_GhbA,1
|
|
17
17
|
tmnt/utils/pubmed_utils.py,sha256=3sHwoun7vxb0GV-arhpXLMUbAZne0huAh9xQNy6H40E,1274
|
18
18
|
tmnt/utils/random.py,sha256=qY75WG3peWoMh9pUyCPBEo6q8IvkF6VRjeb5CqJOBF8,327
|
19
19
|
tmnt/utils/recalibrate.py,sha256=TmpB8An8bslICZ13UTJfIvr8VoqiSedtpHxec4n8CHk,1439
|
20
|
-
tmnt-0.7.
|
21
|
-
tmnt-0.7.
|
22
|
-
tmnt-0.7.
|
23
|
-
tmnt-0.7.
|
24
|
-
tmnt-0.7.
|
25
|
-
tmnt-0.7.
|
20
|
+
tmnt-0.7.47.dist-info/LICENSE,sha256=qFZJrfJ7Zi4IXDiyiGVrHWic_l1h2tc36tI8Z7rK9bs,11356
|
21
|
+
tmnt-0.7.47.dist-info/METADATA,sha256=msP8m1SR6O3CRNNWTdu1bd_EbUDEcudNsb9G_TFE70Y,1443
|
22
|
+
tmnt-0.7.47.dist-info/NOTICE,sha256=p0kYIVAkReTFaGb4C-qPa7h5ztze6hGzOpjCMMbOipU,425
|
23
|
+
tmnt-0.7.47.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
24
|
+
tmnt-0.7.47.dist-info/top_level.txt,sha256=RpYgUl187sXnqmiwKjZZdcDlHz2AALs6bGdUcukyd_E,5
|
25
|
+
tmnt-0.7.47.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|