diff --git a/examples/offline_inference/basic.py b/examples/offline_inference/basic.py index 5db0963c02af0..a6e96c0bb4339 100644 --- a/examples/offline_inference/basic.py +++ b/examples/offline_inference/basic.py @@ -10,11 +10,10 @@ "The future of AI is", ] # Create a sampling params object. -sampling_params = SamplingParams() #temperature=0.8, top_p=0.95) +sampling_params = SamplingParams(temperature=0.8, top_p=0.95) # Create an LLM. -# llm = LLM(model="facebook/opt-125m") -llm = LLM(model="Qwen/Qwen2-1.5B-Instruct", max_model_len=512, max_num_seqs=16) +llm = LLM(model="facebook/opt-125m") # Generate texts from the prompts. The output is a list of RequestOutput objects # that contain the prompt, generated text, and other information. outputs = llm.generate(prompts, sampling_params) @@ -22,4 +21,4 @@ for output in outputs: prompt = output.prompt generated_text = output.outputs[0].text - print(f"Prompt: {prompt!r}, Generated text: {generated_text!r}") + print(f"Prompt: {prompt!r}, Generated text: {generated_text!r}") \ No newline at end of file