The top commanders of the Salvadoran armed forces have been reassuring themselves and their backers in Washington for two years that they are winning the war against Marxist-led insurgents.

They were doing the same thing last week as soldiers of the best and most bloodied unit in the Salvadoran Army made their way back to the garrison here after nine grim days of fighting on Guazapa Volcano.

By the time they took the enemy's territory the enemy had disappeared. The soldiers looked less like victors than survivors, and that is how their colonel addressed a platoon of them as they arrived asking after officers wounded in the fighting:

"You are perhaps most lucky," their colonel said with taut emotion, looking at faces stony with exhaustion, "just because you are alive."

The force the Reagan administration is backing with mounting sums of money and American prestige in the fight to draw a line against Marxist revolutionary advances in this hemisphere is a motley collection of raw recruits, crack troops and uniformed thugs, policemen and paramilitaries, who appear increasingly confused by the kind of war that has been thrust upon them.

Trained by their traditions, their culture and some of their officers to use brute force as the solution to any threat, or in some cases to satisfy any whim, they are attempting to adapt virtually overnight to U.S.-style strategies and Anglo-Saxon values as alien to most as tea and crumpets.

Sixteen-year-old peasants unaccustomed to shoes and befuddled by escalators suddenly find themselves whipped into battle in helicopters, armed with M16 rifles as delicate as sewing machines and fixed in the glare of world attention by relentless rhetoric emanating from Washington's polished marble corridors.

But the tactics they are being taught depend on resources they still do not have--high-tech American arms they may not be able to absorb even if they get them, but to which they are turning in the fight against the guerrillas.

The Salvadoran Army officers who proudly stated a year ago that they had defeated the guerrillas' "final offensive" without "a single cartridge" from the United States now say that they cannot begin to do their job effectively without more than $80 million in U.S. military aid being spent in the first four months of fiscal 1982.

U.S. Green Berets trained one rapid-reaction battalion of about a thousand men last year. Its commander, Col. Domingo Monterrosa, said recently he needs a minimum of 15 helicopters just to be able to move one of his seven companies at a time, and there are only 14 "Huey" UH1H transport helicopters in the country, some of which invariably are grounded for maintenance.

Now two other battalions are being trained by the United States as well, one of them at the village of El Paraiso, another in the United States.

Each of these battalions also will need 15 helicopters, according to Monterrosa, a total of 45 in all. But diplomatic sources who have studied the question say this Army does not have the pilots or maintenance facilities to handle even 10 more Hueys.

Although it is clear that a great deal more material is needed, it is not clear that a lot more will win the war. "After two years of cyclical sweeps through the countryside," said one frustrated American diplomat, "there has been absolutely no impact on the guerrillas. And we are making the same assumption we did in Vietnam, that all it's going to take is increases in aid. It's an unproven assumption."

As U.S. assistance has soared for a country of less than 5 million people, the size of the Salvadoran armed forces--including the regular Army and the three main security groups--has increased by more than 50 percent to 23,000 men. The Army makes up half that total, the Treasury Police 2,500, the National Guard 4,500 and the National Police 4,500.

Yet the guerrilla combat forces have grown as well, tripling from about 2,000 or less two years ago to 6,000 or more at the moment.

Estimates quoted by U.S. intelligence forces earlier this year indicate that the government may have lost control of more than a quarter of the country, and the recurrent experience of journalists in the field is that the insurgents now operate more openly in more parts of the nation. Guerrilla commandos blew up El Salvador's largest, most heavily guarded and most vital bridge in October and obliterated almost half the functioning Salvadoran Air Force as it sat on the runway of a military air base earlier this year.

Meanwhile, a steady campaign of sabotage against the national electrical system has left major portions of the country in the dark for weeks at a time. Other assaults on the commercial infrastructure have threatened the economy.

More recently the insurgents have been attacking small government garrisons, keeping the Salvadoran armed forces spread out and worn down while giving their own forces combat experience and a steady supply of new captured weapons.

As one guerrilla commander put it, "We are tenderizing the country before we turn up the heat," and a major new push to raise the pressure on the government is expected before March 28 elections for a constituent assembly, according to leftist sources.

More than a year after their first major offensive, the guerrillas say with some confidence that despite brief setbacks they have suffered only one solid defeat. That was on Jan. 17, 1981, at the settlement of Cutumay Camones in western El Salvador, where, according to an account by a Time magazine reporter at the time, soldiers captured a guerrilla messenger, tortured, interrogated and killed her, then used the information obtained to surround and wipe out a concentration of more than 90 guerrilla combatants.

The steady trend of events, despite the claims of the high command, has been against the government forces. This in turn has served to worsen doubts on the part of some U.S. military personnel, from the instructors here to more senior officers at the Pentagon, about the kind of high command they are backing.

While American military instructors say privately they have real admiration for the troops, the commanders are another question.

The top officers of the Salvadoran Army, including Defense Minister Jose Guillermo Garcia, Vice President Jaime Abdul Gutierrez and chief of the National Guard Carlos Eugenio Vides Casanova, belong to a clique of commanders who graduated from the Salvadoran military academy in the mid-1950s and are oriented more toward the internal power politics of their institutions than the hard realities of this new war, according to various present and former members of the Salvadoran military.

The three recently promoted themselves to the rank of general.

Garcia and Gutierrez were known for their service in the administration of the state-controlled telephone company before seizing the reins of the armed forces in the 1979 coup.

Since then, Garcia has emerged as the strongest figure in the Salvadoran military. While he and the rest of the high command ritually recite the contribution of the armed forces to political, social and economic reforms, the young officers who were the most vocal advocates of this reform process in the 1979 coup have steadily been squeezed out of power. Many senior commanders ousted then have been brought back.

The concern of some diplomats and civilian officials here is that the high command has shown little political acumen outside the vertical structure of the armed forces and little real sense of the kind of enemy or even the kind of war it is up against.

Emphasis is placed on the role of foreign countries, particularly communist countries, and foreign arms supplies to the guerrillas as a key element in the conflict. This perception filters down to the troops as legends of Soviet advisers and black-bearded Cubans fighting in the field.

The guerrillas, for their part, often insist that all their arms are either captured or bought on the black market, even though there has certainly been aid from Cuba. Senior Cuban officials have admitted to several foreign visitors that before the 1981 offensive, large quantities of Western-made arms were sent from Havana to Salvadoran rebels.

A Canadian reporter for the Toronto Globe and Mail, visiting Havana at the end of last year, interviewed a Salvadoran who said he was a guerrilla in a training course there and provided extensive details to back up his claim.

Nicaragua, meanwhile, is openly sympathetic to the Salvadoran insurgents. Little solid proof has been offered as yet of major concrete support by the Nicaraguan government, despite frequent allegations by the United States, but it is known that top guerrilla leaders frequently visit Managua. They are also often found in Mexico City.

There are serious differences and divisions among the five guerrilla factions that make up the Farabundo Marti National Liberation Front, ranging from the details of socialist dogma to revolutionary military philosophy and such fundamental concerns as the extent to which they should be aligned now or later with the Soviet Bloc and Cuba, according to guerrilla officers and their civilian allies.

But a basic conception of the war shared by virtually all of them looks on the military fight as one of three equal forms of "struggle" going on simultaneously in the quest to take power and revolutionize the nation.

According to "Anna Maria," one of the 15 commanders who make up the Unified Revolutionary Directorate of the liberation front and a veteran of the fight since 1970, the insurgents devote as much time and attention to what they call the diplomatic and the political fronts as they do to the military ones.

Until early 1980, the guerrillas were putting most of their hopes in the "mass organizations," the vanguard of their political front, to win the war for them.

But by 1975, after a few years of sporadic and rather ineffectual harassment of the military, the guerrillas were fighting almost as bitterly among themselves as they were against the government. In the process one of the key founders of the movement, Roque Dalton, was executed by his comrades and what had been two factions suddenly became three.

Partly at Dalton's urging, the guerrilla leadership had begun to return to what many of them had always done best--organizing political protest--as a means of putting massive pressure on the government.

Often working closely with militant Christian groups, the mass organizations began by fighting for bread-and-butter issues, literally the price of beans. Combatants, still few, were concentrating on kidnapings to fund their war chest and on a few political assassinations.

The popular organizations marched and rallied, occupied churches, government buildings and embassies, and by 1979 they could turn out 100,000 people in the streets of San Salvador.

It was not until after the October coup and after the first coalition government, which included a number of Socialists and Communists as well as moderates who were forced out by the present high command, that the guerrillas began preparing seriously again for full-scale armed insurrection or civil war.

When they did, they had a reserve of thousands of people in the mass organizations who were already indoctrinated and committed.

Meanwhile, the diplomatic front opened wide when a number of prominent civilian politicians joined ranks with the guerrillas in early 1980. Social Democrat Guillermo Ungo and Christian Democrat Ruben Zamora, who left his party soon after it joined the second coalition government, and prominent landowner Enrique Alvarez, who was subsequently kidnaped and killed, began touring world capitals and cultivating Western support for the revolution and international legitimacy for the guerrilla movement.

The diplomatic front has become particularly important to the guerrillas now as they edge closer to a military situation that they believe might force an open armed intervention by conservative South American powers or even the United States.

Ernesto Dreyfus, a senior guerrilla staff officer at Guazapa, said that one reason the raid on the military air base was not followed up immediately with major offensive assaults elsewhere was that "at no moment do we want to give the impression of an offensive as big, as explosive as that would have been. We know that imperialism has endless resources and it would not suit us to have the United States intervene."

President Jose Napoleon Duarte and other civilian politicians by then allied to the military, have tried to counteract such moves on the part of the guerrillas with political and diplomatic measures of their own.

Some current military officers acknowledge the role of civilian-prompted and U.S.-backed reforms in "taking away the banners" of the leftists' popular organization during 1980 and thus fatally undermining the attempt at a guerrilla "final offensive" last year. There is also recognition that Christian Democratic President Duarte has played a key role in keeping support from Washington and the Christian Democratic government of Venezuela.

The killing of "subversives," whether armed or not, whether proven guerrillas or only suspected ones, regardless of sex or age--the long string of incidents that push the Salvadoran death toll into the tens of thousands and give the government one of the hemisphere's most negative human rights records--intensified dramatically in 1980 and 1981.

The high command argued that it was trying to bring such "abuses" under control and that in any case the guerrillas often killed suspected government informers and sometimes the families of soldiers in cold blood. But while this is true, there is no indication that such slayings are considered central to the guerrillas' strategy. Some current and former members of the government say they believe the Army has regarded such killings as an essential way to handle subversion.

The murder of 20 suspected subversives in the slum of San Antonio Abad earlier this year, for instance, was attributed by diplomatic sources and residents of the area to regular Army soldiers.

Analysts searching for the roots of such often self-destructive brutality, which has proved militarily inefficient and politically and diplomatically disastrous for the armed forces, look to the Spanish conquest for historical motivations.

The United States is trying to change such attitudes even as it turns the Salvadoran soldier into a more effective fighter on the battlefield. But there is a long way to go.

As one guerrilla staff officer on the Guazapa Volcano explained complacently before the battle there began last month--a "surprise" operation the insurgents knew about at least two days before it started--"We decipher the enemy's moves. We know the enemy's way of operating. But he doesn't know exactly how we work."

When the attack came the guerrillas were able to hold off vastly superior firepower, including 500-pound bombs, for eight days. Despite an all-out effort to encircle them, the vast majority eventually escaped to fight again and even to begin reoccupying the mountain now that the Army has pulled out most troops.

Col. Monterrosa, commander of the crack Atlacatl battalion that participated in the action, says he and his troops are slowly learning.

Asked whether he felt there were problems in his own institution or with the high command that might be hindering the war effort, Monterrosa said no. Asked what was needed to do a better job, he suggested Cobra gunships and better airplanes, or better air support.