Quality science labs drain science packs slower, at the same rate that quality drills and pumpjacks drain resources.
Quality biolabs drain science packs at the same rate that quality big mining drills drain resources.
Should also work with mods that add in new labs.
Some of the code is taken from https://mods.factorio.com/mod/QualityBioLab. Check it out if you want a less cheaty version.