Sentence Similarity
sentence-transformers
PyTorch
Transformers
English
t5
text-embedding
embeddings
information-retrieval
beir
text-classification
language-model
text-clustering
text-semantic-similarity
text-evaluation
prompt-retrieval
text-reranking
feature-extraction
English
Sentence Similarity
natural_questions
ms_marco
fever
hotpot_qa
mteb
Eval Results (legacy)
Instructions to use hkunlp/instructor-xl with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use hkunlp/instructor-xl with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("hkunlp/instructor-xl") sentences = [ "That is a happy person", "That is a happy dog", "That is a very happy person", "Today is a sunny day" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Transformers
How to use hkunlp/instructor-xl with Transformers:
# Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("hkunlp/instructor-xl") model = AutoModel.from_pretrained("hkunlp/instructor-xl") - Notebooks
- Google Colab
- Kaggle
embedding processing happens locally on my system or on hugging face server
#26
by sushmitaraj19365 - opened
hi , when i use this command - instructor_embeddings = HuggingFaceInstructEmbeddings(model_name="hkunlp/instructor-xl")
and then here i have created a function to create vector db from any given youtube url
def create_db_from_youtube_video_url(video_url: str) -> FAISS:
#loads youtube transcripts from the given url
loader = YoutubeLoader.from_youtube_url(video_url)
transcript = loader.load()
#splits the text into chunks
text_splitter = RecursiveCharacterTextSplitter(chunk_size=1000, chunk_overlap=20)
docs = text_splitter.split_documents(transcript)
db = FAISS.from_documents(docs, instructor_embeddings)
return db
so here will the doc be uploaded on the server or the processinghappens locally, how can i confirm this behaviour?