TitanML은 기업이 훈련, 압축 및 추론 최적화 플랫폼을 통해 더 나은, 더 작은, 더 저렴한, 더 빠른 NLP 모델을 구축하고 배포할 수 있도록 지원합니다. 우리의 추론 서버인 Titan Takeoff는 단일 명령으로 하드웨어에 로컬로 LLM을 배포할 수 있게 해줍니다. 대부분의 embedding 모델이 기본적으로 지원되며, 특정 모델에 문제가 발생하면 [email protected]로 알려주시기 바랍니다.

사용 예제

다음은 Titan Takeoff Server를 시작하는 데 도움이 되는 몇 가지 예제입니다. 이러한 명령을 실행하기 전에 Takeoff Server가 백그라운드에서 시작되었는지 확인해야 합니다. 자세한 내용은 Takeoff 실행을 위한 문서 페이지를 참조하세요.
import time

from langchain_community.embeddings import TitanTakeoffEmbed

예제 1

기본 포트(즉, localhost:3000)를 사용하여 머신에서 Takeoff가 실행 중이라고 가정한 기본 사용법입니다.
embed = TitanTakeoffEmbed()
output = embed.embed_query(
    "What is the weather in London in August?", consumer_group="embed"
)
print(output)

예제 2

TitanTakeoffEmbed Python Wrapper를 사용하여 reader를 시작합니다. Takeoff를 처음 실행할 때 reader를 생성하지 않았거나 다른 reader를 추가하려는 경우 TitanTakeoffEmbed 객체를 초기화할 때 추가할 수 있습니다. 시작하려는 모델 목록을 models 매개변수로 전달하기만 하면 됩니다. embed.query_documents를 사용하여 여러 문서를 한 번에 embedding할 수 있습니다. 예상되는 입력은 embed_query 메서드에 예상되는 단일 문자열이 아닌 문자열 목록입니다.
# Model config for the embedding model, where you can specify the following parameters:
#   model_name (str): The name of the model to use
#   device: (str): The device to use for inference, cuda or cpu
#   consumer_group (str): The consumer group to place the reader into
embedding_model = {
    "model_name": "BAAI/bge-large-en-v1.5",
    "device": "cpu",
    "consumer_group": "embed",
}
embed = TitanTakeoffEmbed(models=[embedding_model])

# The model needs time to spin up, length of time need will depend on the size of model and your network connection speed
time.sleep(60)

prompt = "What is the capital of France?"
# We specified "embed" consumer group so need to send request to the same consumer group so it hits our embedding model and not others
output = embed.embed_query(prompt, consumer_group="embed")
print(output)

Connect these docs programmatically to Claude, VSCode, and more via MCP for real-time answers.
I