It depends on the circumstances. Each of the states' police forces have introduced 'drug diversion' programs, where those caught with small amounts of a drug can be required to attend drug counselling rather than having a drug possession offense marked on their record.
The same is the case with marijuana - except it's called cannabis cautioning. It pays to remember that while these options are available to the police, they are not obliged to penalise you in this way. However, these diversionary measures involve a lot less paperwork than booking you, so if you're polite and cooperative, they're likely to do it for you.
If you're a prick, chances are they'll prosecute you. It always pays to be polite to cops, no matter how pissed off you are at them.