SOFT
SOFT copied to clipboard
About from SOFT import _c library file problem
Hello, I read your article and code, but I found an error in the section of from SOFT import _c in the subtraction file, would you please tell me where to find this library
You may first install SOFT with
python -m pip install -e SOFT
Or, we have provided a pytorch version implementation, you can just delete C-related sentences in Python codes and use our pytorch implementation.
I have carefully reviewed the code you provided,for example,
After the _c sentence is deleted, there is no way to put key,query and output into the Gaussian kernel for operation at the same time. I haven't found the code about the Gaussian kernel written by pytorch, perhaps I haven't noticed it. Could you please give me a hint? Thank you
You would better first install SOFT with
python -m pip install -e SOFT
This will solve most of the issues caused by library SOFT
.
And then, if you want to avoid using CUDA
, please set the parameter --kernel-method
as torch
.
It will lead to code
https://github.com/fudan-zvg/SOFT/blob/41debdd7c5de192f9c09e9c42e8cf2361f3d61fd/models/softmax_free_transformer.py#L38
You can now delete
https://github.com/fudan-zvg/SOFT/blob/41debdd7c5de192f9c09e9c42e8cf2361f3d61fd/models/softmax_free_transformer.py#L5
Thanks for your kind instruction, now I can run the program successfully.