Views
No views yet
1from fastembed import TextEmbedding
2
3documents = [
4 "You should stay, study and sprint.",
5 "History can only prepare us to be surprised yet again.",
6]
7
8model = TextEmbedding(model_name="intfloat/multilingual-e5-large")
9embeddings = list(model.embed(documents))
10
11# [
12# array([
13# 0.00611658, 0.00068912, -0.0203846, ..., -0.01751488, -0.01174267,
14# 0.01463472
15# ],
16# dtype=float32),
17# array([
18# 0.00173448, -0.00329958, 0.01557874, ..., -0.01473586, 0.0281806,
19# -0.00448205
20# ],
21# dtype=float32)
22# ]