Recently, I came across some literature about predatory caterpillars. I guess lepidopteran larvae are not strictly herbivorous as I assumed. Several ambush predator caterpillars have been found in Hawaii including the green grappler Eupithecia. A YouTube video demonstrates how this kind of caterpillar modifies the strike reflex for ambushing a pasing termite. They have modified thoracic legs and A6 prolegs for grabing the prey and manuveuring the mostly airborn body.
More recently, a paper in Science reported a case-bearing caterpillar named "Hyposmocoma molluscivora" which feeds exclusivly on snails. This kind of caterpillar spins silk over a resting snail in a spiderlike fashion in order to anchor the prey. Then it would start digging into the shell opening all the way to consume the snail, even if that means leaving its silk case behind.
Another class of caterpillar carnivorousity is consipecific cannibalisim when the population density is too high. Semlitsch and West described the relationship between body size and caterpilalr cannibalism in the journal Oecologia. It was found that smaller caterpillars are more likely to become the victims simply because they are not capable of killing the bigger conspecifics.