iCloud Photos will always keep local copies of the most recently used photos and videos in your library, as space permits, and the smaller thumbnail for each item, as they are needed for browsing. It is not possible to reduce the size of the local copy of your Photos Library completely -if you are lucky, it could shrink to 10% of the size in iCloud.
The only way to get the photos completely off your Mac would be to move your Photos Library to an external volume. See: Move your Photos library to save space on your Mac - Apple Support
If the external volume with the library is not connected, you can access the photos using the web interface at www.icloud.com . But it will be much less convenient than using the Photos.app.