This is called underload. An M.S. (not Ph.D.) student can request an underload in the last semester of study if fewer than 9 credits are required for graduation. For instance, if you have earned 24 graduate credits and only 7 are required to graduate, you can request an underload to register for only 7 credits. An M.S. student with an approved underload is still considered a full-time student.
When applying for an underload with the office of Visa & Immigration Services (http://www.stonybrook.edu/commcms/visa/current_students/parttime_enrollment.html), be sure to use the following contact email for Computer Science: email@example.com
If you are a G1 student (have less than 24 graduate credits) then you must register for 12 credits. However, even in this case underload (i.e., registration for less than 12 credits) might be possible. For instance, suppose you have accumulated 18 credits and two courses have an "I" grade. Assuming that you will complete these two courses in the semester that just begun, you can request an underload for 6 credits.
Note that if you request an underload in a certain semester, you must graduate at the end of that semester. Therefore, underloading carries certain risks, especially for foreign students. For instance, failing a course at this stage will prevent the student from graduating and may require reinstatement from the Immigration according to prevalent visa rules.
A Ph.D. student in the G5 status must register for 9 credits of CSE 699. There is no provision for underload for Ph.D. students --- unlike in the case of M.S. students.