Code for the paper “Selecting Reasoning Traces by Familiarity and Quality for Small Language Model Distillation” (Vu, Nguyen, Nguyen Le; Ton Duc Thang University). It covers every stage: candidate generation from three teachers, answer checking, quality scoring, the selection rules (GRAPE, RSR, LARK, Local Naturalness,...