An unusual military experiment in which Spanish-speaking U.S. Army specialists are teaching young cadets from El Salvador how to fight and kill, while emphasizing that the best strategy sometimes is not to use violence, is unfolding on the huge infantry training ground here.

The plan is to combine training needed to survive and win against hardened and battle-tested leftist guerrilla forces in El Salvador with a greater respect for what Americans call "human rights."

At the heart of such respect is the need to avoid excessive and indiscriminate shooting and violence that can easily turn Salvadorans against an army that is supposed to be protecting them.

For years, charges of indiscriminate violence have plagued Salvadoran government forces, which number about 22,000. Included are about 6,000 members of the national guard, national police and other security units that are frequently accused of unnecessary violence.

Within the next few weeks, 477 young cadets from El Salvador, most of whom are 19 or 20 with a few as old as 26, will graduate from a three-month course here that amounts to an effort to keep an army from becoming its own worst enemy.

About 160 Spanish-speaking soldiers and officers of the U.S. Army, many from elite Special Forces and Ranger units, have been brought here from posts around the world to help teach the cadets. All of the training manuals have been translated into Spanish. At Fort Bragg, N.C., a 957-man battalion from El Salvador is to finish another 13-week U.S. Army course next month.

The two projects, combined with the training of perhaps two to six more battalions that may be sent to the United States, amounts to one of the largest efforts ever to bring a foreign army to this country, train it and send it home.

The troops at Fort Bragg are foot soldiers, while those here are the future junior officers. All here are high school graduates, and at least one-fourth have attended college.

In effect, Pentagon officials say the cadets amount to the student body of El Salvador's military academy and one-third of the corps of would-be junior officers in the Salvadoran army. Within a few weeks, many will be in the field facing what is estimated to be a hard-core force of 4,000 to 6,000 guerrillas.

The government forces are short of junior officers, especially well trained ones. U.S. officers here say that even platoon-sized units in El Salvador rarely have officers with them and that this type of situation, combined with a lack of training, often causes young peasant draftees to fire indiscriminately.

Last week, the Pentagon allowed reporters to visit the training site here among the rolling hills and pine forests of southern Georgia. The brief, rather tightly controlled event made it impossible to judge how effective the training will be.

All of the U.S. trainers made available to reporters highly praised the cadets' enthusiasm, discipline, mechanical and military skills, and the praise appeared genuine.

Colombian-born U.S. Army Lt. Jaime Carmona said the cadets have an "excellent" chance of surviving and giving a good account against an enemy. Capt. Jeff Lambert, a Special Forces officer from Panama, said he is "incredibly impressed about how much they care about what they are doing. You can't get rid of them after class."

Maj. Gen. Robert L. Wetzel, commander of the infantry center here, said the cadets scored better on marksmanship than U.S. officers taking the basic infantry course. "They fire as though they had personally purchased every round."

The 618 hours of instruction, including several long patrol exercises that the cadets said they like best, are predominantly military. But included are 38 hours of human rights training and 11 hours of work in anti-urban guerrilla operations. The latter also integrates human rights training.

Aside from being taught the value of not killing or otherwise alienating the population, the cadets are taught in classrooms and in the field not to mistreat prisoners, because they are potentially good intelligence sources, or not to mistreat women or personal property.

Last year, U.S. advisers in El Salvador trained the 900-man "Atlacatal" batallion as an elite, quick-reaction force that could be moved around the countryside. The troops here and at Fort Bragg are the first trained in this country, and the cadets are the first to receive a heavy dose of human rights training.

U.S. officials claim the Atlacatal unit performs all right militarily. Pentagon officials claim it will take six or eight months to see how the new cadets and soldiers do and if their human rights training holds up under pressure.

On the surface, the cadets here seem young to become effective leaders quickly. Almost all of them are from the capital of San Salvador, raising questions about how they will fare in the countryside.

The cadets said they do not think their training with U.S. tactics and field manuals will pose problems when they reach home because many Salvadoran senior officers also were trained by Americans.

El Salvador's armed forces include only about 700 officers, far below the necessary minimum of 1,200.

The official party visiting here last week included Swiss-born Fred C. Ikle, the undersecretary of defense who boldly struggled through a pep talk to the cadets in Spanish, and Elliott Abrams, assistant secretary of state for human rights. He sought to explain to young cadets far from home the crucial link between congressional approval of continued aid to El Salvador and the necessity to end abuses of human rights.