You could create the model first, load the parameters from the .txt file, transform them to floats and then tensors, and load each parameter manually via:
with torch.no_grad():
    model.layerX.weight.copy_(layerX_weight)
    model.layerX.bias.copy_(layerX_bias)

Note that his approach is a bit tedious, as it seems you are loading the parameters from a raw text file, which is not a supported via utility methods (such as model.load_state_dict).