Hi, bavaria has the strongest rules in germany, penalty depends on the amount... but foreigners pay only a fine for a couple of grammes, up to several hundert Euros
you must be very carefully. especially when you are arrive about czech border. and don't smoke in public, passersby frequently call the cops only because the smell of weed.
Some people got house searches after the cops found some Gs in their pockets or cars! And some people who ran away from the cops, got headshots from behind!