Snowflake / snowflake-arctic-embed-m-v2.0
Milvus Integrated
작업: 임베딩
형태: 텍스트
유사성 측정법: IP, L1, L2, 코사인
라이선스: Apache 2.0
차원: 768
최대 입력 토큰: 8192
가격: 무료
snowflake-arctic-embed-m-v2.0 소개
snowflake-arctic-embed-m-v2.0 모델은 74개 언어를 지원하는 다국어 텍스트 임베딩 모델로, 영어 및 비영어 언어 전반에서 뛰어난 성능을 제공하면서 고품질 검색과 효율적인 추론에 최적화되어 있습니다. 113M개의 비임베딩 파라미터를 갖추고 있어 빠르고 확장 가능한 추론을 제공하며, Matryoshka Representation Learning 및 양자화 인식 학습을 통해 컴팩트한 표현을 지원합니다.
snowflake-arctic-embed-m-v2.0을 snowflake-arctic-m 모델과 비교:
| 모델 | 파라미터 | 비임베딩 파라미터 | 차원 | 언어 지원 |
|---|---|---|---|---|
| snowflake-arctic-m-v2.0 | 305M | 113M | 768 | 다국어 |
| snowflake-arctic-m | 109M | 86M | 768 | 영어 전용 |
snowflake-arctic-embed-m-v2.0으로 임베딩을 생성하는 방법
벡터 임베딩을 생성하는 두 가지 주요 방법이 있습니다:
- PyMilvus:
snowflake-arctic-embed-m-v2.0모델을 원활하게 통합하는 Milvus용 Python SDK입니다. - 텍스트와 이미지를 위해 Snowflake Cortex에서 제공하는
AI_EMBED함수입니다.
벡터 임베딩이 생성되면, Zilliz Cloud(Milvus 기반의 완전 관리형 벡터 데이터베이스 서비스)에 저장하고 의미론적 유사도 검색에 사용할 수 있습니다. 다음은 네 가지 핵심 단계입니다:
- 무료로 Zilliz Cloud 계정에 가입합니다.
- 서버리스 클러스터를 설정하고 Public Endpoint 및 API Key를 확보합니다.
- 벡터 컬렉션을 생성하고 벡터 임베딩을 삽입합니다.
- 저장된 임베딩에 대해 의미론적 검색을 실행합니다.
PyMilvus를 통해 임베딩을 생성하고 의미론적 검색을 위해 Zilliz Cloud에 삽입하기
from pymilvus.model.dense import SentenceTransformerEmbeddingFunction
from pymilvus import MilvusClient
# Load the Snowflake Arctic Embed M v2.0 model
ef = SentenceTransformerEmbeddingFunction(
"Snowflake/snowflake-arctic-embed-m-v2.0", trust_remote_code=True
)
docs = [
"Artificial intelligence was founded as an academic discipline in 1956.",
"Alan Turing was the first person to conduct substantial research in AI.",
"Born in Maida Vale, London, Turing was raised in southern England.",
]
# Generate embeddings for documents
docs_embeddings = ef(docs)
queries = ["When was artificial intelligence founded", "Where was Alan Turing born?"]
# Generate embeddings for queries
query_embeddings = ef(queries)
# Connect to Zilliz Cloud with Public Endpoint and API Key
client = MilvusClient(uri=ZILLIZ_PUBLIC_ENDPOINT, token=ZILLIZ_API_KEY)
COLLECTION = "arctic_embed_m_v2_documents"
# Drop collection if it exists
if client.has_collection(collection_name=COLLECTION):
client.drop_collection(collection_name=COLLECTION)
# Create collection with auto-detected dimension
client.create_collection(collection_name=COLLECTION, dimension=ef.dim, auto_id=True)
# Insert documents with embeddings
for doc, embedding in zip(docs, docs_embeddings):
client.insert(COLLECTION, {"text": doc, "vector": embedding})
# Search for similar documents
results = client.search(
collection_name=COLLECTION,
data=query_embeddings,
# consistency_level="Strong", # Strong consistency ensures accurate results but may increase latency
output_fields=["text"],
limit=2,
)
# 검색 결과 출력
for i, query in enumerate(queries):
print(f"\nQuery: {query}")
for result in results[i]:
print(f" - {result['entity']['text']} (distance: {result['distance']:.4f})")
자세한 내용은 PyMilvus Embedding Model 문서를 참조하세요.
원활한 AI 워크플로
임베딩부터 확장 가능한 AI 검색까지—Zilliz Cloud를 사용하면 비교할 수 없는 속도와 효율성으로 임베딩을 저장, 인덱싱 및 검색할 수 있습니다.
Zilliz Cloud를 무료로 사용해 보세요




