Currently the Library has one function and one function only: Researching spells for you to use.
Once all spells are researched the library is abandoned and all warlocks go to their lair where they will remain for the rest of their lives (excluding the occasional battle). Quite a boring fate.
Let's give the library a little bit more use than it has now. So that the room and the warlocks are useful for the entire map.
Mana Generation
I'm pretty sure we are going to use mana and as far as I know it's generation is based on the amount of 'tiles' your dungeon has claimed.
Let's say that every warlock or other magical creature that is active in the Library will generate 5 or 10 tiles worth of mana. It's a small addition and they can keep doing it after everything is researched.
This gives magical creatures something to do and keeps the Library an active place for an entire map.
Another option could be that researching warlocks only generate 5 tiles worth of mana and once everything is researched they could generate somewhat more mana, for example 10. It could also be level dependent: A level 5 warlock generates 5 tiles worth and a level 8 warlocks generate 8 tiles worth of mana. It's a matter of taste.
It's not abusable, you wont be getting huge boosts in mana generation. Let's take an extreme case, every warlock generate 10 tiles worth of mana. You have 10 warlocks so they generate a total bonus of 100 tiles of mana. A normal 5x5 room is 25 tiles. So that 100 bonus is equal to perhaps 4 rooms. Nothing impressive at all. It's simply there as a small bonus (which can be bigger or smaller depending on balance) and keeps the Library and Warlocks active for an entire map.
Watching warlocks sleep is boring anyway.
Personally a value between 10 and 20 should be balanced, seeing the size of normal dungeons which easily reaches 400 tiles. (Big lairs and workshops are the main cause of this.)