Ok, I believe I detached the attributes of model with the following code:
def detach(obj):
    # A more general detach that opens up dict and tuples
    if torch.is_tensor(obj):
        new = obj.detach()
        new.requires_grad_(obj.requires_grad)
        return new
    elif isinstance(obj, tuple):
        return tuple(detach(el) for el in obj)
    elif isinstance(obj, dict):
        return {k:detach(v) for k, v in obj.items()}
    elif isinstance(obj, Model):
        for k, v in vars(obj).items():
            setattr(obj, k, detach(v))
        return obj
    else:
        return obj

def logL(x, theta, model, data):
    N, S, T = (data['N'], data['S'], data['T'])
    p_a = torch.ones(N * S)
    model.start(theta, data['mat'])
    for t in range(1, T + 1):
        def fn(x, model=model, data=data, t=t):
            data = detach(data)
            t = detach(t)
            model = detach(model)
            model.update(data, t)
            return model.p_a
        out = checkpoint.checkpoint(fn, x)
        p_a = p_a * (npeat(data['obs'][:,:,t-1], (S, 1)) * out).sum(1)   
    ll = p_a.reshape(N, S).mean(1).log().sum()   
    return ll 

This gets me past the previous runtime error, but now I’m getting a new one:

File “C:\Users\Peter\Anaconda3\lib\site-packages\scipy\optimize\optimize.py”, line 65, in call
fg = self.fun(x, *args)
File “C:\Users\Peter\Desktop\JMP\Analysis\Original estimation 3-22-19\myLib_new2.py”, line 115, in fun
ll.backward()
File “C:\Users\Peter\AppData\Roaming\Python\Python37\site-packages\torch\tensor.py”, line 198, in backward
torch.autograd.backward(self, gradient, retain_graph, create_graph)
File “C:\Users\Peter\AppData\Roaming\Python\Python37\site-packages\torch\autograd_init_.py”, line 100, in backward
allow_unreachable=True)  # allow_unreachable flag
RuntimeError: The size of tensor a (28000) must match the size of tensor b (56000) at non-singleton dimension 0

Still trying to figure this one out. I know its related to the checkpoint because the model ran fine without it before.