NEW YORK (AP) _ A former CIA analyst held fast Wednesday to his charges that U.S. military commanders in Vietnam ignored thousands of enemy soldiers, while conceding that at one time he also had classed one disputed group as ''non-combatants.''

Sam Adams underwent a day of cross-examination by attorneys for retired Gen. William C. Westmoreland, who is seeking $120 million from CBS in a libel suit over the 1982 broadcast ''The Uncounted Enemy: A Vietnam Deception.''

Adams, a co-defendant in the suit, became a $25,000 consultant to the network and helped produce the documentary. It endorsed his contention that, as the war was approaching its peak in 1967, the military held estimates of enemy strength to under 300,000 troops despite evidence that the true figure was nearly twice as large.

Westmoreland, who commanded U.S. troops in Vietnam from 1964 to 1968, says the broadcast was false and that it amounted to a charge that he had knowingly misled his commander-in-chief, President Lyndon B. Johnson, and other superiors in Washington.

Westmoreland testified earlier in the 14-week-old trial that he did order the exclusion in late 1967 of enemy ''self-defense'' and ''secret self- defense'' militia troops from the ''order of battle,'' the official estimate of enemy forces. He said the militia consisted of women, old men and young boys and constituted no military threat.

Adams testified Monday that these forces could have caused up to half of all the American battle-related casualties in the war and that it was improper to exclude them from the order of battle.

As cross-examination began Wednesday, Westmoreland lawyer David Dorsen attacked that claim by introducing a memo Adams wrote in mid-1967 describing the militia as ''non-combatants.''

''Militia largely did not mix into firefights (gun battles),'' Adams conceded, but added, ''As I knew then, they made mines and booby traps.'' Those mines and booby traps, he asserted, accounted for an estimated one-third of U.S. casualties.

Dorsen appeared at one point to have been unprepared for the answers Adams gave as he tried to make the ex-analyst admit that the evidence supporting a higher enemy strength estimate was weak.

The subject was a communist document that fell into U.S. hands in early 1967. The document, Adams testified, showed that there were 180,000 Vietcong guerrillas in South Vietnam at a time when Westmoreland's command was estimating there were only 35,000.

Adams acknowledged that the communists sometimes ''fabricated'' documents to mislead American and South Vietnamese commanders, but said he satisfied himself that this one was genuine.

Dorsen asked if commanders might sometimes inflate the number of troops under their command in order to pad their payroll.

''Vietcong guerrillas did not get paid,'' Adams said, prompting a few chuckles in the courtroom.

Dorsen then asked if a Vietcong commander might inflate the figures in order to get bigger rice shipments.

''No, sir, they ate locally,'' Adams replied. Many spectators and some jurors broke into laughter.

Adams is the first defense witness to take the stand. His other co- defendants, besides the network itself, are George Crile, who produced ''The Uncounted Enemy,'' and CBS News correspondent Mike Wallace, who narrated the broadcast.