Many years ago when I hitchhiked that route, I went from Melrose SYHA to Carlisle YHA then back to Dumfriesshire. My next stop was Gatehouse-of-Fleet SYHA which is long gone. I don't think there were any other hostels until you got to Stranraer.