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.
16 lines
380 B
16 lines
380 B
5 months ago
|
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)
|