Lecture time 
File "/content/MyDrive/IBM/TechQA-Base/techqa-master/model_techqa.py", line 113, in forward
   Hq = self.lq(hq)
 File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 532, in __call__
   result = self.forward(*input, **kwargs)
 File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/linear.py", line 87, in forward
   return F.linear(input, self.weight, self.bias)
 File "/usr/local/lib/python3.6/dist-packages/torch/nn/functional.py", line 1372, in linear
   output = input.matmul(weight.t())
RuntimeError: Expected object of scalar type Float but got scalar type Half for argument #2 'mat2' in call to _th_mm

If you carefully see the traceback, you will realize that the error happened at line Hq = self.lq(hq). What’s happening there? You are making a call to the forward (the next line) of that model lq. What does it have? An F.Linear layer. And what happens in that layer? input.matmul(weight.t()). So, if you traceback, the input to the model lq is hq and the weight is? You guessed it right. torch.sigmoid(nn.Parameter(torch.zeros(1))).
Now, the first error you posted said RuntimeError: Expected object of device type cuda but got device type cpu for argument #1 'self' in call to _th_mm. This means there’s an mm (matrix multiplication), happening on the device, which takes two inputs, the first one being input and the second one being weight.t(). So, the earlier error was solved by sending input aka ‘hq’ to the device. Likewise, now the second error will be taken care of by setting the datatype of weight.t() aka self.wb. How? By specifying .float() or .double() when you call torch.zeros().
I know I wasn’t extremely clear but you get the point.