GST is not applicable on free supplies or samples.
In TallyPrime, enable the option Use separate Actual and Billed Quantity columns in invoices under F11 (Features). Now, enter separate billed quantity and actual quantity including the quantity of free supplies/samples while recording the transactions. The value of invoice will be based on billed quantity and quantity of free supplies/samples will be added at zero value.
In case a separate invoice is created for free supplies/samples, record the invoice with zero value.