tessl install tessl/pypi-vllm@0.10.0A high-throughput and memory-efficient inference and serving engine for LLMs
Agent Success
Agent success rate when using this tile
69%
Improvement
Agent success rate improvement when using this tile compared to baseline
1.33x
Baseline
Agent success rate without this tile
52%
Build a text generation utility that provides fine-grained control over how language models generate text responses. The utility should support various generation strategies including deterministic generation, creative generation with randomness controls, and generating multiple alternative completions.
The utility must support the following generation configuration options:
The utility should provide:
@generates
def generate_default(model: str, prompt: str) -> str:
"""
Generate text using default settings (greedy decoding).
Args:
model: Name or path of the model to use
prompt: Input text prompt
Returns:
Generated text completion
"""
pass
def generate_creative(model: str, prompt: str, temperature: float = 0.8, top_p: float = 0.9) -> str:
"""
Generate creative text with controlled randomness.
Args:
model: Name or path of the model to use
prompt: Input text prompt
temperature: Sampling temperature (higher = more random)
top_p: Nucleus sampling threshold
Returns:
Generated text completion
"""
pass
def generate_multiple(model: str, prompt: str, n: int = 3) -> list[str]:
"""
Generate multiple diverse completions for the same prompt.
Args:
model: Name or path of the model to use
prompt: Input text prompt
n: Number of completions to generate
Returns:
List of generated text completions
"""
pass
def generate_reproducible(model: str, prompt: str, seed: int, max_tokens: int = 50) -> str:
"""
Generate text with reproducible results using a seed.
Args:
model: Name or path of the model to use
prompt: Input text prompt
seed: Random seed for reproducibility
max_tokens: Maximum number of tokens to generate
Returns:
Generated text completion
"""
passProvides high-throughput LLM inference capabilities with fine-grained sampling control.
@satisfied-by