LangChain 集成 ScaleDown 上下文模型
LangChain 博客介绍了 langchain-scaledown 集成,并宣布 LangSmith LLM Gateway 将 ScaleDown 的约束解码模型(CDM)作为直接模型提供方接入。该集成附带三种中间件,分别用于摘要旧历史、压缩大型工具结果和从对话中抽取结构化数据,覆盖 ScaleDown 的 Summarize、Compress、Extract 和 Classify 四款单任务模型。LangChain 称这些模型单次可接收最多 100 万 token 输入,部分支持图像和扫描 PDF;ScaleDown 自报其在窄任务上比前沿模型更快更便宜,但文章未给出独立验证。
LangChain 认为长时运行的智能体需要持续做上下文管理决策,并将 ScaleDown 的窄任务模型定位为在这些步骤上替代前沿模型的一种更便宜、更快的选择。
Key Takeaways
- Building long-running agents takes constant context management, and making those decisions with a frontier LLM is slow and expensive. ScaleDown’s constrained decoding models (CDMs) make them faster and cheaper.
langchain-scaledownmakes it easy to use ScaleDown models in your agent, and ships with middleware for summarization, tool result compression, and extraction.- ScaleDown is now supported in the LangSmith LLM Gateway, so its calls are traced and count toward your spend and rate limits.
Building long-running agents comes down to the art of context management: deciding which information goes into the context window, and when. That means summarizing old history, compacting large tool results, and extracting the right data from long inputs. Each of those steps is a decision. Historically we’ve made them with LLMs, which is slow and expensive at the volume a long-running agent needs.
To make those decisions faster and cheaper, we now have a langchain-scaledown integration and support in the LangSmith LLM Gateway for ScaleDown’s constrained decoding models (CDMs). Where a general-purpose LLM writes any string one token at a time, a CDM is trained for one task and only returns answers that task allows, like a label from your list or spans of the input. That lets it be much smaller, faster, and cheaper: ScaleDown reports its models are 200x faster and 467x cheaper than frontier models on these narrow tasks.
#LangChain#ScaleDown#LangSmith LLM Gateway#Deep Agents#LangSmith#langchain-scaledown