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/examples/demos/optimize_llm_stack/vllm_example.py

16 lines
379 B

4 months ago
from swarm_models import vLLM
5 months ago
# 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)