Genetic similarity between organisms arises from segments of shared genome, which are said to be identical by descent (IBD). Modeling IBD in pedigrees forms the basis of classical linkage analysis and has been a fruitful method of statistical genetics. We examine methods for modeling IBD in more general settings where relationships among subjects are not known completely. A natural approach is to use a hidden Markov model (HMM) based on a transition model for IBD along the chromosome, but the number of possible IBD states for more than a few individuals makes standard HMM calculations infeasible. We describe two approaches to sampling from this model. First, we decompose the group IBD model into a series of more efficient pairwise approximations. This decomposition permits other modifications to the model so that it can be used with unphased genotypes or incomplete pedigree information. Second, we implement a Gibbs sampling algorithm based on particle filtering, which is computationally intensive but targets the correct model. Both methods are compared against exact HMM sampling.