I’m using eagle to accelerate decoding, but the acceptance rate i got is too low.
GPU:Nvidia A100 40G vllm: 0.7.3
server start:
python vllm/entrypoints/openai/api_server.py --model Meta-Llama-3-8B-Instruct --served_model_name Llama-3-8B --dtype=half -tp=1 --gpu_memory_utilization=0.45 --speculative-model EAGLE-LLaMA3-Instruct-8B/ --num_speculative_tokens=7 --port=5413 --speculative_draft_tensor_parallel_size=1 --max_model_len=8192
decode request:
curl ht(linklimit)tp://localhost:5413/v1/completions
-H “Content-Type: application/json”
-d ‘{
“model”: “Llama-3-8B”,
“prompt”: “A chat between a curious human and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the humans questions.\n### Human: Got any creative ideas for a 10 year olds birthday?\n### Assistant: Of course! Here are some creative ideas for a 10-year-olds birthday party:\n1. Treasure Hunt: Organize a treasure hunt in your backyard or nearby park. Create clues and riddles for the kids to solve, leading them to hidden treasures and surprises.\n2. Science Party: Plan a science-themed party where kids can engage in fun and interactive experiments. You can set up different stations with activities like making slime, erupting volcanoes, or creating simple chemical reactions.\n3. Outdoor Movie Night: Set up a backyard movie night with a projector and a large screen or white sheet. Create a cozy seating area with blankets and pillows, and serve popcorn and snacks while the kids enjoy a favorite movie under the stars.\n4. DIY Crafts Party: Arrange a craft party where kids can unleash their creativity. Provide a variety of craft supplies like beads, paints, and fabrics, and let them create their own unique masterpieces to take home as party favors.\n5. Sports Olympics: Host a mini Olympics event with various sports and games. Set up different stations for activities like sack races, relay races, basketball shooting, and obstacle courses. Give out medals or certificates to the participants.\n6. Cooking Party: Have a cooking-themed party where the kids can prepare their own mini pizzas, cupcakes, or cookies. Provide toppings, frosting, and decorating supplies, and let them get hands-on in the kitchen.\n7. Superhero Training Camp: Create a superhero-themed party where the kids can engage in fun training activities. Set up an obstacle course, have them design their own superhero capes or masks, and organize superhero-themed games and challenges.\n8. Outdoor Adventure: Plan an outdoor adventure party at a local park or nature reserve. Arrange activities like hiking, nature scavenger hunts, or a picnic with games. Encourage exploration and appreciation for the outdoors.\nRemember to tailor the activities to the birthday childs interests and preferences. Have a great celebration!\n### Human: Hello\n### Assistant:”,
“max_tokens”: 512,
“temperature”: 0.5
}’
target model: 魔搭社区
draft model: yuhuili/EAGLE-LLaMA3-Instruct-8B · Hugging Face
vllm print:
INFO 04-25 14:23:27 spec_decode_worker.py:1115] SpecDecodeWorker stage times: average_time_per_proposal_tok_ms=1.58 scoring_time_ms=2.95 verification_time_ms=1.29
INFO 04-25 14:23:30 metrics.py:455] Avg prompt throughput: 0.0 tokens/s, Avg generation throughput: 34.6 tokens/s, Running: 1 reqs, Swapped: 0 reqs, Pending: 0 reqs, GPU KV cache usage: 7.3%, CPU KV cache usage: 0.0%.
INFO 04-25 14:23:30 metrics.py:477] Speculative metrics: Draft acceptance rate: 0.077, System efficiency: 0.166, Number of speculative tokens: 7, Number of accepted tokens: 95, Number of draft tokens: 1232, Number of emitted tokens: 234.
why the acceptance rate is so low, what did i do wrong?
i know the implement of eagle in vllm is different from SafeAILab/EAGLE