Baseten
Baseten is a provider of all the infrastructure you need to deploy and serve ML models performantly, scalably, and cost-efficiently.
As a model inference platform,
Basetenis aProviderin the LangChain ecosystem. TheBasetenintegration currently implements a singleComponent, LLMs, but more are planned!
Basetenlets you run both open source models like Llama 2 or Mistral and run proprietary or fine-tuned models on dedicated GPUs. If you're used to a provider like OpenAI, using Baseten has a few differences:
- Rather than paying per token, you pay per minute of GPU used.
- Every model on Baseten uses Truss, our open-source model packaging framework, for maximum customizability.
- While we have some OpenAI ChatCompletions-compatible models, you can define your own I/O spec with
Truss.
Learn more about model IDs and deployments.
Learn more about Baseten in the Baseten docs.
安装与设置
要使用 Baseten 模型与 LangChain,你需要两样东西:
将你的API密钥导出为名为 BASETEN_API_KEY 的环境变量。
export BASETEN_API_KEY="paste_your_api_key_here"
LLMs
查看一个 使用示例。
from langchain_community.llms import Baseten
API 参考:Baseten