Tom Aarsen
commited on
Commit
·
4cfebc7
1
Parent(s):
3fa24f3
Use the trust_remote_code parameter immediately
Browse filesThis gets propagated to the model, tokenizer, and config behind the scenes.
README.md
CHANGED
|
@@ -61,7 +61,11 @@ from sentence_transformers import SentenceTransformer
|
|
| 61 |
import torch
|
| 62 |
|
| 63 |
# Load the model, optionally in float16 precision for faster inference
|
| 64 |
-
model = SentenceTransformer(
|
|
|
|
|
|
|
|
|
|
|
|
|
| 65 |
|
| 66 |
# Prepare a prompt given an instruction
|
| 67 |
instruction = 'Given a question in text, retrieve SQL queries that are appropriate responses to the question.'
|
|
|
|
| 61 |
import torch
|
| 62 |
|
| 63 |
# Load the model, optionally in float16 precision for faster inference
|
| 64 |
+
model = SentenceTransformer(
|
| 65 |
+
"BAAI/bge-code-v1",
|
| 66 |
+
trust_remote_code=True,
|
| 67 |
+
model_kwargs={"torch_dtype": torch.float16},
|
| 68 |
+
)
|
| 69 |
|
| 70 |
# Prepare a prompt given an instruction
|
| 71 |
instruction = 'Given a question in text, retrieve SQL queries that are appropriate responses to the question.'
|