The only solution to an improbably dangerous superior threat is improbable odds. Secondary requirements to their mission might limit them in ways that give us a chance. Ok, the aliens are here to kill intelligent carbon based lifeforms. So we know that counts as humans, and possibly a few other species on our planet.
If they care about not completely destroying the ecosystem
...that reduces some of their attack options - they can't send too many crash-bombers into the planet or everything gets wrecked from ensuing dustcloud winter. Likewise, they can't just swarm above the planet to reduce sunlight until we all freeze to death (if they don't care about taking a bit of time to do the job). Which are basically the two overwhelming options they have.
This means they have to go slower, and while they can wreck critical infrastructure as the quickest way to kill the most people (food, water, electricity, etc.), the rest takes longer as they have to find and hunt down the rest. This buys humanity some time.
If it is important that the swarm as a whole survive
...even if they sacrifice many individual units, then you have a chance to scare them off, at high cost, without necessarily having to destroy the whole swarm.
If we can develop a countermeasure in time...
So let's say we can figure out what they're made of and have time to develop something to work against them.
There's a small but dedicated worldwide group of people who keep a look out for potential objects to impact Earth - once folks see a massive swarm of small objects on an intercept course, we're going to turn a whole lot of telescopes that way (we have risky, untested plans for dealing with a large object, but not so much with a lot of small ones so it will get a lot of attention presuming we can see it in time). Even before we get good visuals, we'll probably be able to pick up that they're nearly entirely carbon by spectography.
IF we can figure out they're not natural, IF we have someone theorize they're actually carbon nano-tubes or similar materials, IF we figure out they're probably hostile, IF we start weaponizing our current technology of enzymes that break down carbon nanotubes, we might have a way of doing some damage. However, again, if the aliens care about preserving the rest of the ecosystem mostly, we get a lot more time to work with.
How to deliver these enzymes? Given that the aliens move ridiculously faster than even our newest railgun technology, it's less about targeting them than blanketing as much of the atmosphere with these enzymes - which means modifying bacteria to produce these enzymes and letting them fill as much of our airspace as we can.
Presumably these aliens survive slamming through tiny micrometeors in space, so I doubt the breakdown of general surface damage will do much, but once the enzymes hit the lower layers, the whole unit might come apart as it travels through the atmosphere. At high speeds, that's going to be messy. At lower speeds, the units might simply disassemble.
If the anti-matter sections are built of different material and fail-safe instead of fail-dangerous, humanity gets a tech boost out of the whole affair. Otherwise we get a bunch of antimatter explosions. Crud.
Now what?
Again, assuming the swarm cares to survive, here's possibilities:
Swarm members who haven't entered the atmosphere, will not for fear of contamination. If they have some kind of means of communicating back home, the planet is marked "contaminated" and either left alone or a different, more horrific weapon is sent (over the course of centuries or longer travel time). If they don't have a means of communicating that far, maybe they send a few to fly back, and the rest monitor the infected planet.
If they all have entered the atmosphere (to speed up the hunt), then they're all potentially infected with the bacteria, and may attempt to leave some kind of warning to future aliens to not come here. Perhaps some kind of massive last strike to carve up part of a continent with a symbol or sign. Or they get back to orbit and smash that sign into the far side of the moon.
However, that's a whole LOT of if's to get here. Given that the aliens don't have FTL travel, they would probably just have the drones slam the planet or sunblock it to either a) kill for the sake of destroying potential future rivals or b) by the time they come around for colonization proper the ecosystem has recovered/evolved.