Skip to content
This repository has been archived by the owner on Aug 19, 2023. It is now read-only.

RuntimeError: Cannot set version_counter for inference tensor #16

Open
meyert11 opened this issue May 20, 2023 · 0 comments
Open

RuntimeError: Cannot set version_counter for inference tensor #16

meyert11 opened this issue May 20, 2023 · 0 comments

Comments

@meyert11
Copy link

Nice work! I've forking this for directml use, and it seems to work, loads it up in my AMD card and I get to the prompt, but after I entered the prompt I get the following error, I haven't been able to find a solution, any ideas?

(llama_dml) G:\LLaMA_dml>python chat.py --ckpt_dir models/7B --tokenizer_path G:/llama/models/tokenizer.model --max_batch_size 1 --max_seq_len 256 Seed: 19266 Loading checkpoint Loaded in 10.67 seconds Running the raw 'llama' model in an auto-complete mode. Enter your LLaMA prompt: Facebook is good because Thinking... Traceback (most recent call last): File "chat.py", line 146, in <module> fire.Fire(main) File "C:\ProgramData\Anaconda3\envs\llama_dml\lib\site-packages\fire\core.py", line 141, in Fire component_trace = _Fire(component, args, parsed_flag_args, context, name) File "C:\ProgramData\Anaconda3\envs\llama_dml\lib\site-packages\fire\core.py", line 475, in _Fire component, remaining_args = _CallAndUpdateTrace( File "C:\ProgramData\Anaconda3\envs\llama_dml\lib\site-packages\fire\core.py", line 691, in _CallAndUpdateTrace component = fn(*varargs, **kwargs) File "chat.py", line 129, in main results = generator.generate( File "G:\LLaMA_dml\llama\generation.py", line 46, in generate logits = self.model.forward(tokens[:, prev_pos:cur_pos], prev_pos) File "C:\ProgramData\Anaconda3\envs\llama_dml\lib\site-packages\torch\utils\_contextlib.py", line 115, in decorate_context return func(*args, **kwargs) File "G:\LLaMA_dml\llama\model.py", line 265, in forward h = self.tok_embeddings(tokens) File "C:\ProgramData\Anaconda3\envs\llama_dml\lib\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl return forward_call(*args, **kwargs) File "C:\ProgramData\Anaconda3\envs\llama_dml\lib\site-packages\torch\nn\modules\sparse.py", line 162, in forward return F.embedding( File "C:\ProgramData\Anaconda3\envs\llama_dml\lib\site-packages\torch\nn\functional.py", line 2210, in embedding return torch.embedding(weight, input, padding_idx, scale_grad_by_freq, sparse) RuntimeError: Cannot set version_counter for inference tensor

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant