At least 30 cadets from a military high school were killed last week when they participated in a major assault by Soviet and Afghan troops on rebels operating within 10 miles of the capital city of Kabul, according to two separate Western diplomatic reports reaching here today.

The assult was reported to have included indiscriminate shelling and strafing of villages around the former summer capital of Paghman, where rebels for the past year have been operating easily despite the proximity to Soviet troop concentrations in Kabul.

The use of partially trained high school cadets -- one diplomatic report put them in the vanguard of the attack -- is another example of the inability of the Soviet-installed government of President Babrak Karmal to muster sufficient regular Army forces to fight the increasingly emboldened rebel bands.

The deaths of the young cadets caused such concern in Kabul that the government was reported to have taken the unprecedented step Sunday of displaying their bodies on state television and lauding them as martyrs who were kiled fighting "looters and enemies."

"This was an astonishing admission," said one diplomatic source, "and the probable explanation is the deaths of so many young cadets could not be concealed."

According to both reports, the cadets' parents were reported to have loudly protested when they went to claim the bodies that their sons had been thrown into battle untrained and ill equipped.

There was no idependent confirmation of the assault and few if any independent Western journalists are allowed into Afghanistan by the Soviet-installed government there. But the separate diplomatic reports, while differing on the number of casualties and the ferocity of the battle, agreed there had been a major Soviet-Afghan attack in the Paghman area. Moreover, their reports matched information received here independently from a source in Kabul who has been reliable in the past.

Reports reaching here during the past week from Afghan sources said Kabul's boys' schools are practically deserted because parents are hiding their sons to keep them from military service. Communist Party youths, meanwhile, are being formed into special groups called Soldiers of the Revolution and sent out with much fanfare after a short period of intensive military training, the reports say.

The young cadets, however, were believed to have received only rudimentary training as an adjunct to their acdemic high school education.

One diplomatic source said 300 partially trained young cadets were in the forefront of the assault and that 200 of them deserted to the rebel side. The other source said the fatalities may have been caused by the accidental strafing of their own forces by Soviet helicopter gunships acting in close support of ground troops. Under the ground rules of the briefing, neither diplomatic source can be identified.

The diplomats also reported that assassination of supporters of the Babrak government are continuing in Kabul, including the shooting of an armed Afghan guard stationed in front of the residence of an American diplomat there. According to the reports, the guard was shot by a man who took his gun and escaped in a waiting taxi.

That was the second guard at a diplomatic residence to be shot last week, the reports, said. The attacks were aimed at party regulars forced to stand guard at exposed, fixed posts outside diplomatic residences, not at the countries involved, they added.

Other reported assassinated were a well-known entertainer, Bakht Zamina, who has been singing the praises of the Babrak government on television, and two men who were reported to have been taking notes in a mosque on a mullah's antigovernment comments during his sermon. In addition, two representatives of the Palestine Liberation Organization were reported to have been shot and wounded on their way to an Iraqi national day celebration.