Congress reversed a decade-long erosion of the federal government's commitment to public housing programs by giving final approval yesterday to a two-year $57.4 billion housing bill.

The Senate voted 93 to 6 to adopt the compromise measure and send it to President Bush for his expected signature.

The bill is an amalgam that replenishes many existing housing assistance programs. It includes some of Housing and Urban Development Secretary Jack Kemp's new proposals to spur tenant aquisition of housing units and measures to shore up the financially ailing Federal Housing Administration, which provides mortgage-loan insurance to single-family home buyers.

Although the legislation represents a consensus that the federal government went too far during the Reagan years in abandoning its support for public housing, the funding commitment contained in the bill must still be backed up by annual appropriations starting next year.

Congressional advocates of a stronger federal role in housing and community development hailed the legislation as a new beginning.

The legislation "represents a major redirection in federal housing policy to meet the basic needs of housing for low-income persons," said Rep. Chalmers P. Wylie (Ohio), the ranking Republican on the House Banking, Finance and Urban Affairs Committee.

The bill authorizes about $35 billion over two years for existing urban housing programs, including those covering low-income rental assistance, and elderly and handicapped facilities. In an important change of policy, the legislation resumes federal support for the construction of public housing.

New programs include a number of Kemp's proposals that would begin to allow public housing tenants to buy their units. It also authorizes more than $770 million for a new National Homeownership Trust fund to help first-time home buyers who meet certain income criteria with financing or down payments on housing purchases.

To protect the FHA's dwindling mortgage-insurance fund, which has been hurt by a rising default rate, the legislation reduces the amount of closing costs that homeowners may finance with FHA assistance. That provision is expected to cost the average buyer of a $65,000 house another $833.

In addition, the legislation requires that home buyers using FHA mortgage assistance pay a risk-based premium of 0.5 percent of their loan balance each year, although those making higher down payments would pay the premium for a shorter period.

Overall, the measure is expected to be a boon to state and local governments. Cities and states will benefit over two years from a $3.1 billion trust fund and that could give them flexibility in meeting their needs for low-income housing.

Under that program, local and state governments may use a line of credit provided by HUD on a range of housing projects from housing rehabilitation and new construction to tenant acquisition of public units.

In separate legislation on Friday, the House passed a compromise two-year reauthorization of a 1987 measure providing about $1.1 billion to help the homeless with shelter, education, job training and medical care.