About half the nearly 7,000 Salvadoran officers and troops the United States has trained to combat leftist guerrillas in that country have left the army since President Reagan began the training program in 1981, Pentagon officials said yesterday.

Administration officials have stressed that they have no plans to send American troops to El Salvador or any other Central American country but will instead train local armies.

But in the case of El Salvador at least, Pentagon figures dramatize how difficult it is to keep these trained men in uniform.

Only about 15 percent of the 1,500 Salvadoran officers and enlisted men that the United States gave three months of "full-spectrum" training in 1981 are still in the army; the rest left as soon as their 18- or 24-month enlistments expired.

The numbers are better for 1982 and 1983 because fewer soldiers have completed their obligatory tours. Of 3,400 Salvadorans trained by the United States in 1982, the Pentagon said, 50 to 60 percent are still in the service. So far this year, 95 percent of 500 men in training are still in uniform.

The Pentagon said an additional 1,500 Salvadorans have been trained in small groups since 1981, bringing the total number to 6,900 out of a total force of 33,000, of which 21,500 are active-duty regulars and the rest are security forces. Of the 6,900 Salvadorans trained by the United States, about 500 are officers, according to the Pentagon.

Defense officials bewailed the exodus of trained talent, blaming it on low pay that impels Salvadoran soldiers to return to the farm as soon as they can. Officials noted that the Salvadoran government has not declared a national emergency and extended the enlistments, or offered reenlistment bonuses.

The failure of the South Vietnamese government to order conscription was a sore point with Congress in the early days of the Vietnam war.

The Salvadoran government's inability to keep the soldiers the United States is training at considerable expense also could become a political issue as Reagan raises the ante for Central America.

Pentagon officials conceded that they are in an uphill effort to build a professional military force for El Salvador. They warned that it cannot be done overnight but said progress is being made.

"We've been doing what we can to professionalize military service" in El Salvador, said one officer. "But there is a mind-set against this. There won't be any dramatic shift overnight. There is marginal progress. Things are getting better."

Progress, he said, includes retaining more noncommissioned Salvadoran officers--the sergeants who really run things in armies all over the world.