U.S. District Judge Richard L. Williams yesterday ordered that the sentence he imposed in November on former CIA employe Sharon M. Scranage be reduced from five to two years, allowing her to be released after serving 18 months.

"The court doesn't believe either the citizens of the United States or Ms. Scranage are going to profit from her remaining warehoused for" a longer period, Williams said at a hearing in Alexandria.

Scranage, a native of Virginia's rural Northern Neck, pleaded guilty to disclosing classified information to her Ghanaian boyfriend, Michael A. Soussoudis. Williams recommended at her sentencing that she be paroled after 18 months, but a parole board recently rejected that, said her attorney, Brian Gettings.

Williams yesterday appeared to question the different treatment given Scranage and Soussoudis, to whom she divulged the identities of covert CIA informants in Ghana.

Soussoudis pleaded no contest to espionage charges and, after receiving a 20-year sentence, was exchanged for several Ghanaians in a spy swap between the United States and Ghana.

"Soussoudis, who was basically the culprit in this, wound up getting nothing . . . at the government's recommendation," Williams said.

Assistant U.S. Attorney Justin Williams defended Soussoudis' release as part of an exchange approved at the highest levels of the government. There was "no intent to extend any leniency to Soussoudis," he said.