Preheat the oven to 325°F. Lightly butter a 3-quart shallow baking dish.
Heat a large pot over medium heat. Add the butter and stir until melted. Add the onions, garlic and thyme. and sauté for about 5 minutes, or until the onions are tender but have not taken on any color. Add the cauliflower and cook for about 6 minutes, stirring often, or until softened. Add the cream and milk, and bring to a simmer. Add the cheese and stir until it melts, then remove from the heat and discard the thyme stems.