Commit cb42564
[BugFix] Fix eagle3 accuracy problem when enforce_eager=True (#4521)
### What this PR does / why we need it?
### Does this PR introduce _any_ user-facing change?
### How was this patch tested?
def main():
prompts = [
"The future of AI is",
]
# Create a sampling params object.
sampling_params = SamplingParams(temperature=0.8, top_p=0.95)
# Create an LLM.
llm = LLM(
model="meta-llama/Llama-3.1-8B-Instruct",
tensor_parallel_size=1,
speculative_config={
"method": "eagle3",
"model": "yuhuili/EAGLE3-LLaMA3.1-Instruct-8B"
"num_speculative_tokens": 3
},
enforce_eager=True,
)
# Generate texts from the prompts.
outputs = llm.generate(prompts, sampling_params)
print(f"Outputs: {outputs}")
for output in outputs:
prompt = output.prompt
generated_text = output.outputs[0].text
print(f"Prompt: {prompt!r}, Generated text: {generated_text!r}")
- vLLM version: v0.12.0
- vLLM main:
vllm-project/vllm@ad32e3e
---------
Signed-off-by: zhaomingyu <[email protected]>
Co-authored-by: wangxiyuan <[email protected]>1 parent 3480094 commit cb42564
File tree
2 files changed
+12
-5
lines changed- tests/e2e/singlecard/spec_decode_v1
- vllm_ascend/spec_decode
2 files changed
+12
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
113 | | - | |
| 113 | + | |
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
| 82 | + | |
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
| |||
430 | 430 | | |
431 | 431 | | |
432 | 432 | | |
433 | | - | |
434 | | - | |
435 | | - | |
| 433 | + | |
436 | 434 | | |
437 | 435 | | |
438 | 436 | | |
| |||
507 | 505 | | |
508 | 506 | | |
509 | 507 | | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
510 | 512 | | |
511 | 513 | | |
512 | 514 | | |
| 515 | + | |
| 516 | + | |
513 | 517 | | |
514 | 518 | | |
515 | 519 | | |
| |||
536 | 540 | | |
537 | 541 | | |
538 | 542 | | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
539 | 546 | | |
540 | 547 | | |
541 | 548 | | |
| |||
0 commit comments