OptimalScale / OptimalScale/LMFlow
Problems encountered during speculative decoding execution
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 8.5k
- Forks
- 822
- PR merge metrics
- No merged PRs in 30d
Description
Hi, I attempted to use speculative decoding but encountered some errors. May I ask for your assistance?
I used the parameters from the first example.
python ./examples/speculative_inference.py \
--model gpt2-xl
--draft_model gpt2
--temperature 0.3
--gamma 5
--max_new_tokens 512
--gpu 0
An error occurred during the first execution:
RuntimeError: Expected one of cpu, cuda, ipu, xpu, mkldnn, opengl, opencl, ideep, hip, ve, fpga, ort, xla, lazy, vulkan, mps, meta, hpu, mtia, privateuseone device type at start of device string: gpu
Then I modified HFDecoderModel in hf_decoder_model.py to use cuda, and the following error occurred:
NotImplementedError: device "cuda" is not supported
On the third attempt, I changed it to use cpu and got the error:
ValueError: The following model_kwargs are not used by the model: ['use_accelerator']"
Is there any configuration or environment setting error on my part?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with examples/speculative_inference.py and reproduce the command in the issue, recording the device-related traceback. Then inspect hf_decoder_model.py and the handling of the device and use_accelerator arguments; done means the documented speculative-decoding example runs without these reported errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100