As settlement of a reverse-discrimination suit charging that blacks get preferential treatment at the General Accounting Office, more than 2,000 white male workers at the agency yesterday won a pledge from GAO that it will treat the races equally.

The GAO, the congressional watchdog agency, made no admission that it had over been unfair to its white workers, or that any of the allegations in the suit were true.

Nonetheless, the agency said that in the future it would not require whites to attend a "functional recism seminar," which until last year had been a job requirement for white workers. Blacks did not have to attend a similar seminar.

In addition, GAO said it "agrees that all employes of the agency will be required to follow the same rules and regulations... in regard to employe conduct and other terms and conditions of employment, regardless of race."

The agency also said implementation of its affirmative action hiring program for minorities "will have no adverse impact on the promotional opportunities" of the whites and that GAO's Upward Mobility Program will be open to all employes. GAO promised that it will give "proper management support" to supervisors, including instances when they have to discipline workers, whether the workers are black or white.

The unusual agreement was the result of lengthy negotiations after the suit was filed by Donald B. Smith, who until his retirement last August was chief of the GAO's legal information and reference service. The settlement was signed yesterday by U.S. District Court Judge George L. Hart Jr. A companion suit brought by two white women and two white men has also been settled by GAO but that agreement has not yet been spproved by Hart.

Smith's lawyer, Richard T. Sampson, said the agreement shows that the antidiscrimination clause (Title VII) of the 1964 Civil Rights Act is "not just for blacks."

"Any employment decision based on a person's race, national origin, religion or sex is illegal," he said.

Smith's suit, brought on behalf of all white men who have applied for work at the GAO since March 24, 1972, or who who have worked for the agency since then, alleged that GAO does not pursue grievances brought by whites "as effectively or vigorously" as it does with blacks.

Smith also alleged that the agency does not force blacks to obey GAO rules, as it does whites; gives preferential treatment to the hirining and promotions of blacks, and sidesteps "standarad promotion practices" applied to nonminority employes in administering its Upward Mobility Program.

If any of the white GAO workers feel that the agency is not complying with the order, the pact requires GAO to respond to attorney Sampson about future allegations. Sampson could in turn ask the court for sanctions against GAO.

Although Smith and other plaintiffs in the case did not win any back pay as part of the settlement, GAO agreed to pay Sampson and another lawyer in the case, Walter T. Chalton, $12,000 in legal fees and $2,240 for expenses.