本页还没有译文
本页 6 段还没译成Español,下面显示的是英文原文。LangChain
还没翻译译自英文(docs.vllm.ai)本页 6 段都还没译
LangChain
vLLM is also available via LangChain .
To install LangChain, run
pip install langchain langchain_community -qTo run inference on a single or multiple GPUs, use VLLM class from langchain.
Code
from langchain_community.llms import VLLM
llm = VLLM(
model="Qwen/Qwen3-4B",
trust_remote_code=True, # mandatory for hf models
max_new_tokens=128,
top_k=10,
top_p=0.95,
temperature=0.8,
# for distributed inference
# tensor_parallel_size=...,
)
print(llm("What is the capital of France ?"))Please refer to this Tutorial for more details.
AI 翻译查看英文原文