And how do you get the data back from these probes? The voyagers have antennas that are close to 4 meters in diameter and ~25-watt radio transmitters. You aren't doing that in a gram, and you aren't powering that in a gram either.
In short, it’s a swarm of gram-scale probes and they work together to transmit.