A GULAG SOUTH exists in Cuba under the socialist revolution launched by Fidel Castro over 27 years ago, and in terms of prison networks for real or alleged "political" offenders, it appears to rank high along with Soviet and South African gulags.

The memoirs by Armando Valladares and Jorge Valls (who were imprisoned for, respectively, 22 and 20 years on vague charges of being "counter-revolutionary" citizens) are frightening and numbing guidebooks to the immense Cuban penal system through which each of them was processed as if from ring to ring in Dante's Inferno.

Valladares and Valls, who never met in the course of their endless and parallel transfers from prison to prison, were among tens of thousands of "politicals" serving long sentences during the '60s and '70s. Today, there are probably between 150 and 200 political prisoners left in Cuban penal centers, some of them held for over a quarter-century, but because there is no way of verifying it, the number could be much higher.

The most striking aspect of the Cuban gulag, apart from the extraordinary inhumanity and cruelty described by Valladares and Valls and other released prisoners, is the irrationality, capriciousness and cynicism with which it is operated. In thousands upon thousands of cases, it was never clear why one prisoner was sentenced to 10 years and another to 30 years for allegedly similar offenses (for trying to leave Cuba illegally, for example), why many of them were re-sentenced without being informed of it, and why captured anti-Castro guerrillas sometimes fared better than mere critics of the regime.

The cynicism is reflected in the way in which the regime uses the prisoners for foreign policy and public relations purposes. Again, Valladares and Valls are examples of this practice. Valladares, whose health was shattered in prison by malnutrition, near-starvation, beatings, solitary confinements and psychological torture, was released in 1982, after a personal intervention by Franc,ois Mitterrand, the socialist president of France. This was the culmination of an international campaign on his behalf, following the publication in Europe of poems Valladares had smuggled out of prison. He had been imprisoned for unspecified acts of "public destruction and sabotage" when he was a 23-year-old employe in the Postal Savings Service. He was outspokenly anti-communist, but had no political involvements.

Valls was freed in 1984, also as a result of international pressure; his smuggled poems had won five European prizes. He had fought in the anti-Batista underground, knew Fidel Castro personally as a university student, and ironically, his imprisonment may have resulted from his court testimony in favor of a former colleague with Communist Party links executed for betraying fellow conspirers to the military dictatorship's secret police.

What the two men had in common, then, was the benefit of foreign pressure on Castro to let them go, an advantage not enjoyed by other hard-core political prisoners who have stayed behind. There are other forms of such cynicism: the release of prisoners to famous foreign visitors to obtain favorable headlines. A group was given to the Rev. Jesse Jackson in 1984; 17 hard-core prisoners were delivered like a going-away gift to the French explorer Jacques Cousteau, who went deep-sea diving with Castro earlier this year; and the last Bay of Pigs invasion prisoner was recently presented to Sen. Edward M. Kennedy.

Reading about the absolute hopelessness surrounding the other prisoners in the Cuban gulag, one can appreciate the luck of the men blessed by foreign attention. But one can also appreciate the luck of Fidel Castro in escaping, when he was a political prisoner more than 30 years ago, the sort of treatment that Valladares and Valls had endured in the very same cells.

I REMEMBER, for example, accompanying Castro last year on a tour of the "model" prison on the Isle of Youth (then the Isle of Pines), including the large cell where he was kept in solitary confinement for many months. Now a shrine, the cell contains the bookcase where Castro had his books, the hot plate on which he told of preparing spaghetti for himself, and a bed with mosquito netting. The Castro regime's prisoners on the Isle of Youth, as Valladares and Valls recount their passage there at different times in the '60s, were overcrowded in small cells (sometimes in "drawers" where a man could only lie), dumped in pools of human excrement, beaten with bayonets, and deprived of the last shred of human dignity.

The incredible disparity between the treatment accorded Castro and his companions, who had set out to overthrow the Batista dictatorship, and that dispensed to Castro's prisoners, whose guilt ranges from the same ambition to change the Cuban government to petty badmouthing of the revolution, raises the fundamental question of standards and legitimacy. Castro takes the view that he had the right to attempt to oust Batista (and most Cubans agreed with him at the time) because the dictatorship was illegitimate, and therefore it was acting illegally in imprisoning the rebels. On the other hand, he insists, the revolution and Marxism-Leninism in Cuba are legitimate because, in effect, he says so (the bulk of the prisoners were under detention before the 1976 socialist constitution was approved by a referendum).

Not surprisingly, Castro uses the argument of every regime in power: the regime's existence is in itself the proof of its legitimacy. This would be irrelevant if it were simply a constitutional argument: in Cuba, it is the justification for 25 years of supreme brutality against tens of thousands of human beings -- and for hundreds of executions. The Cuban gulag system is a terrible blemish on a revolution that was fought in the name of social justice and political freedom, and it is difficult to comprehend why the Castro government has implanted it on a scale far exceeding the normal needs of any country to defend itself (even from United States invasions). But it was Fidel who once urged "more Robespierres in Cuba."

Of the two books, the Valladares account is more interesting and arresting because of the relentless detail of inhumanity to prisoners it presents. The horror is so great and repetitious as to become almost monotonous as, page after page, Valladares tells the tale of Cuban prisons. It is unfortunate, however, that he, too, misrepresents history in many instances. To cite one, it is not true that Castro's rebels murdered patients in a military hospital at the Moncada barracks in Santiago at the time of their first uprising in 1953. Accuracy does not detract from credibility; inaccuracy damages the broader story.

During my stay in Cuba last year, the subject of the Valladares book came up in many conversations with government officials. Aware of the immense damage in prestige this book had caused Cuba among Western European intellectuals (it evidently did not occur to Havana that Valladares would publish his indictment), these officials sought to portray him as an unstable, morally unsavory and artistically unworthy person to whom no attention should be paid. Twenty-seven years after the revolution, however, the time may have come for the outside world to pay attention to the Cuban gulag system. According to the Americas Watch Committee's statistics, there are still at least 110 hard-core political prisoners in three main Cuban prisons after the releases through June 1986, most of whom have been incarcerated for a quarter-century. Then there are many hundreds more in relatively benign "political rehabilitation programs," kept together with common criminals.

Why? Tad Szulc, a former foreign correspondent, is the author of "Fidel: A Critical Portrait," to be published this fall. CAPTION: Picture 1, Jorge Valls; Picture 2, Armando Valladares, (c) by Luis Melendi