Just have your attorney stall the trial and eventually plea bargain everything down to a misdemeanor. You'll be lucky to do a day in jail but will probably end up with some hefty fines. Beats the hell out of a felony. 5 grams is nothing, certainly not sales level and your attorney should understandd that.