You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
swarms/playground/demos/optimize_llm_stack/vllm.py

15 lines
378 B

from swarms.models import vLLM
# Initialize vLLM with custom model and parameters
custom_vllm = vLLM(
model_name="custom/model",
tensor_parallel_size=8,
trust_remote_code=True,
revision="abc123",
temperature=0.7,
top_p=0.8
)
# Generate text with custom configuration
generated_text = custom_vllm.run("Create a poem about nature.")
print(generated_text)