This one is tricky.
I don't view myself as a libertarian, but I do believe in a minimal government. Especially at the federal level.
On the one hand, I think there is a role for the government to fund science. On the other, I think they do a pretty bad job at it. They fund research that is at best pointless and at worst actually harmful to society. Also, it is easy to see what benefits we have reaped from government funded research, it is impossible to know what benefits we would have from privately funded research. Of course we have always had privately funded research but one could imagine a scenario where private firms did not engage in research because they wanted to free ride the government.
I don't really have an answer though.