To be honest, the heuristics here are kind of bad... The first two paragraphs from Wikipedia page for Viterbi algorithm return as AI generated, while several samples from TinyStories, a GPT-4 generated dataset of children stories for training small LMs, get flagged as certainly human. Maybe the weighing can get some work, or you can just switch to a proper classifier.