Elias Wendt commited on
Commit ·
d81a515
1
Parent(s): 67b1d72
Add checkpoint download
Browse files
README.md
CHANGED
|
@@ -123,6 +123,8 @@ Use the code below to get started with the model.
|
|
| 123 |
from utils.regression_head import RegressionHead
|
| 124 |
from transformers import AutoModel, AutoTokenizer
|
| 125 |
from torch import bfloat16, no_grad, nn
|
|
|
|
|
|
|
| 126 |
|
| 127 |
embedding_model = AutoModel.from_pretrained(
|
| 128 |
'Snowflake/snowflake-arctic-embed-m-v2.0',
|
|
@@ -132,8 +134,14 @@ embedding_model = AutoModel.from_pretrained(
|
|
| 132 |
add_pooling_layer=False,
|
| 133 |
).cuda()
|
| 134 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 135 |
regression_head = RegressionHead.load_from_checkpoint(
|
| 136 |
-
|
| 137 |
map_location='cuda'
|
| 138 |
).to(bfloat16)
|
| 139 |
|
|
|
|
| 123 |
from utils.regression_head import RegressionHead
|
| 124 |
from transformers import AutoModel, AutoTokenizer
|
| 125 |
from torch import bfloat16, no_grad, nn
|
| 126 |
+
from huggingface_hub import hf_hub_download
|
| 127 |
+
|
| 128 |
|
| 129 |
embedding_model = AutoModel.from_pretrained(
|
| 130 |
'Snowflake/snowflake-arctic-embed-m-v2.0',
|
|
|
|
| 134 |
add_pooling_layer=False,
|
| 135 |
).cuda()
|
| 136 |
|
| 137 |
+
file_path = hf_hub_download(
|
| 138 |
+
repo_id="Jackal-AI/JQL-Edu-Heads",
|
| 139 |
+
filename="checkpoints/edu-mistral-snowflake-balanced.ckpt",
|
| 140 |
+
repo_type="model"
|
| 141 |
+
)
|
| 142 |
+
|
| 143 |
regression_head = RegressionHead.load_from_checkpoint(
|
| 144 |
+
file_path,
|
| 145 |
map_location='cuda'
|
| 146 |
).to(bfloat16)
|
| 147 |
|