  We propose a general framework to simulate stochastic trajectories with
arbitrarily long memory dependence and efficiently evaluate large deviation
functions associated to time-extensive observables. This extends the "cloning"
procedure of Giardin\'a et al. [Phys. Rev. Lett. 96, 120603 (2006)] to
non-Markovian systems. We demonstrate the validity of this method by testing
non-Markovian variants of an ion-channel model and the Totally Asymmetric
Exclusion Process, recovering results obtainable by other means.
