Last active
June 11, 2024 17:20
-
-
Save elijahbenizzy/0181acef633ccfe5413dccefe5d01f10 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def embedder() -> URLEmbedder: | |
env = rh.env( | |
name=f"langchain_embed_env", | |
reqs=[ | |
"langchain", | |
"langchain-community", | |
"langchainhub", | |
"sentence_transformers", | |
"bs4" | |
], | |
) | |
cluster = rh.cluster(f"/dongreenberg/rh-hamilton-a10g", | |
instance_type="A10G:1", | |
auto_stop_mins=5, | |
spot=True).up_if_not() | |
RemoteURLEmbedder = rh.module(URLEmbedder).to(cluster, env) | |
return RemoteURLEmbedder( | |
model_name_or_path="BAAI/bge-large-en-v1.5", | |
device="cuda", | |
name=f"doc_embedder", | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment