tusrau
tusrau
you can try `import os os.environ['CUDA_VISIBLE_DEVICES'] = '6' device = torch.device('cuda:0' if torch.cuda.is_available() else 'cpu') model.to(device) ` works for me
> Same problem. Have you solved it? No
> After fixing the 'grad_fn' issue , I got another error: File "/mnt/xcli/pruning/codes/Torch-Pruning/examples/LLMs/prune_llm.py", line 363, in main m.num_key_value_groups = m.num_heads // m.num_key_value_heads File "/mnt/xcli/envs/llama_cpp/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1695, in **getattr** raise AttributeError(f"'{type(self).**name**}'...
希望提供配置openai格式embedding使用