Attorneys for former deputy defense secretary Paul Thayer, trying to avert a prison sentence for him, yesterday produced an extraordinary collection of letters on Thayer's behalf by such prominent figures as former president Gerald R. Ford and the chairmen of the Joint Chiefs of Staff and the Senate Armed Services Committee.

The 68 pleas for leniency for Thayer, who is to be sentenced Wednesday for his role in an insider trading case, also came from Defense Department Inspector General Joseph H. Sherick, Army Undersecretary James R. Ambrose, former defense secretary Clark M. Clifford and top executives of LTV Corp., Rockwell International, Hughes Aircraft, ITT, United Technologies Corp., Martin Marietta, Chrysler and Boeing.

In a sentencing memorandum filed with U.S. District Court Judge Charles R. Richey, the attorneys asked that Thayer be sentenced to community service, saying a prison term "would be blind to the contributions of a lifetime."

The attorneys said Thayer, 65, committed the crimes not out of personal greed but "to provide a small nest egg" for his girlfriend, Sandra K. Ryno, 39, who they said was "increasingly reluctant to take large gifts of cash" from Thayer.

They said Thayer had "become attached" to Ryno's teen-aged daughter, Melanie, and wanted to ensure that Ryno could afford an expensive home in suburban Dallas so Melanie could attend "a better school system."

Thayer, a former LTV chairman, pleaded guilty in March to obstruction of justice and giving false testimony in connection with a scheme that netted eight associates $2 million in illegal stock profits.

Thayer and his codefendant, Dallas stockbroker Billy Bob Harris, 45, face maximum five-year prison terms and fines of $5,000. U.S. Attorney Joseph E. diGenova has recommended that they be incarcerated for crimes that he said were motivated by "greed and arrogance."

Thayer's chief lawyer, Robert B. Fiske Jr., a former U.S. attorney in Manhattan, criticized prosecutors for "widely publicized inflammatory rhetoric."

Harris' lawyer, Judah Best, said Harris should not be jailed because he is "a substantial asset to his community" and "wants to pay for his mistakes." Harris received letters of support from the U.S. attorney and the chief FBI agent in Dallas.

Those supporting Thayer include Gen. John W. Vessey Jr., the Joint Chiefs chairman, and two of his predecessors; other present and former Pentagon officials; the U.S. ambassador to Britain; Senate Armed Services Committee Chairman Barry Goldwater (R-Ariz.), and House Appropriations defense subcommittee Chairman Joseph P. Addabbo (D-N.Y.).

In the memo, Fiske did not deny that Thayer provided inside information about proposed mergers by companies of which he was a director.

But he said Thayer believed the information would benefit only Ryno, Harris and Harris' father and "had no idea" that Harris was passing the stock tips to "a wide group," which included some of their mutual friends.

"To sentence him as though he were the perpetrator of a multimillion-dollar scheme would be unfair and unjust," Fiske said.

Fiske's memo said Thayer did not completely cover up the scheme but attempted a "foolish compromise" between telling the truth to investigators and protecting associates who had testified.

Fiske recited Thayer's achievements as a World War II fighter pilot who shot down six planes, "a model of success" as LTV chairman and his assumption of the Pentagon's No. 2 job at "enormous personal financial sacrifice." He said Thayer had done extensive charity work and, in one case, arranged a funeral for the mother of an LTV cafeteria worker.

This record "far outweighs the aberrational conduct to which he has pleaded guilty," Fiske said. He said Thayer has been amply punished because "he will never live down the image portrayed by the press over the past year."

In the letters, Ford praised Thayer as "honest and forthright . . . a person of good character." Goldwater called him "dedicated" and "patriotic."

Sherick said Thayer was "a strong supporter of my efforts to . . . prevent fraud, waste and mismanagement."