There are several different levels of access, with increasing prices.
There are the general tables: you can ask to see a particular scroll or book, and view it over the course of the day, for a minimal charge (5 zhu per book).
There's the private room for a day: this comes with an assistant, who will fetch things you need. The assistants (with the library's carefully maintained indexing) are usually more adept at finding the next useful place to look than all but the most learned researcher. This is 2 li/day.
There's Patron of the Library, which is very pricey (3 tael) but permanent, and lets you actually wander in the stacks.
Also, if you wished anything copied out of the books, you must hire the library's scribes, as patrons are not allowed with inks and the like near the books. 5 zhu for a single page. Less per page as it goes up. (Patrons with a private room can sometimes bribe the attendants to permit them to overlook the use of a pencil.)
(The charges above are still a bit fluid - more fragile, more valuable books, and particularly difficult/esoteric requests of your assistant, can increase the charge.)