I've tried several different designs for infinite villager breeders in my single player survival world, It seems they all suffer from a common problem however. They start off great, but eventually the breeding slows to a crawl and then stops all together, despite it being an "infinite" breeder. I have Googled extensively and this is a very common problem. Unfortunately, no one knows exactly what causes it or how to fix it.
After much frustration with those designs, I decided to go with this one:
I know it's not infinite, (the title says that it is, but that's only if you transport the villagers out and away from the farm) but it is fairly expandable and I've had great success with it. The design in the video will produce 12 villagers total (enough for a small iron farm), since villager cap is is equal to the number of doors X .35, rounded down. So 36 (9 doors a side) X .35 = 12.6
Knowing that, it's fairly easy to work in reverse. Say you needed 40 villagers for some project. 40 / .35 = 114 doors. So just expand the structure, placing 29 doors on a side for a total of 116 doors. Then just till and place your water sources accordingly. Drop in 2 starter villagers and given enough time, they will breed up to 40.
Hope this helps.