Albert Smith closes his eyes tight when he talks, trying to hold onto the ideas that rush through his head. When he cannot think of the exact word that he wants, he holds his breath, stretches his arms in front of him and wiggles his fingers, playing some invisible piano to summon his thoughts.

But when asked whether he is happy over his recent release from Forest Haven, the District's institution for the mentally retarded, after spending 48 of his 56 years behind its red brick walls, Smith is direct.

"Yes sir, yes sir," he says. "I did want to get out."

Smith, who now lives on upper Connecticut Avenue, is one of 200 former residents of Forest Haven whose lives were changed in 1977, when U.S. District Court Judge John H. Pratt ordered the institution closed and its residents sent to group homes in residential neighborhoods and other facilities.

Judge Pratt issued the order in connection with a lawsuit involving the death of a 17 year-old Forest Haven resident. In the order, the judge noted abuses of residents at what he called a substandard institution.

Since 1977, 38 group homes and apartments have opened, run by private organizations under contract with the city. Mental health officials say that more than 60 group homes, halfway houses and other facilities will be needed in the next several years to accommodate the 540 persons still at Forest Haven.

Many neighborhoods, from well-to-do areas of Northwest to impoverished parts of Congress Heights in Southeast, have become concerned at the prospect of retarded people moving in next door.

In most cases, residents said they worried that group homes would reduce their property values. Once opened, however, the group homes appear to quickly gain acceptance in most areas.

"There's some pretty widespread ignorance out there," said Vincent Gray, executive director of the District of Columbia Association for Retarded Citizens. "The question is: Can this city accept about 700 retarded citizens into its population of 635,000 people? I would say, 'Yes, I hope so.' "

Gray said the fear that group homes will lower property values is groundless, and cited a Princeton University study showing that group homes have no effect on a neighborhood's property values.

The District's newest group home, in the Palisades neighborhood of Northwest near the Potomac River and the city line, is the first one here to be set aside exclusively for autistic people.

Many residents had expressed opposition at neighborhood meetings when the home's operator, St. John's Child Development Center, bought the house on the 5000 block of Fulton Street a year ago for four autistic men between the ages of 16 and 21. But the residents' opposition has subsided, city officials said.

"We minded before they moved in," said Frank Ingenito, a next-door neighbor. "But I don't notice them now. It's like there's nothing there."

Across the street, Mrs. Harold Gray disagreed. "They sure messed this street up something awful," Mrs. Gray said of the city officials. "It's misplaced in this neighborhood."

"These young men aren't dangerous, but they frighten people," she said of her autistic neighbors, who, according to the home's officials, have the minds of 3-year-olds and require round-the-clock supervision. She cited one man who screamed night and day for his first several weeks in the group home and threw temper tantrums on the street before being returned to Forest Haven.

"They're big, but they're not they're not mean," insisted Gayle Union, St. John's development coordinator. "They'll never hurt anybody."

The young men, who had spent as many as 20 years in Forest Haven, now make their own beds, clean their rooms and attend classes, their counselors say.

The events on Fulton Street are similar to those at another fashionable address on Cathedral Avenue NW, where some neighbors were upset about the appearance of a group home in September, 1981. But the problems disappeared after the residents met their new neighbors.

Five retarded women, former Forest Haven residents, had been moved there because their previous group home at 13th and U streets NW, a tough, crime-plagued neighborhood, had been considered an inappropriate area in which to teach them about independent living.

"Not a single one of the opponents has said a word about the retarded women one way or another" since their arrival, said one neighbor, attorney and former D.C. Corporation Counsel John Risher. "It's just another house."

In years past, group homes for the mentally ill were concentrated in poor neighborhoods around the city, mental health officials said, partly because of a need for large, inexpensive houses. But today, city officials are sprinkling the group homes throughout the city.

In addition to the 38 group homes for Forest Haven residents, there are 298 other licensed group homes similarly distributed around the District for the mentally ill, former prison inmates, troubled children and other groups, city officials report.

The Association for Retarded Citizens has launched a public relations campaign to counteract what it interprets as bigotry against the retarded. Using the slogan, "Being retarded never stopped anyone from being a good neighbor," the group is advertising on radio and on Metro buses, and is sponsoring a high-school essay contest.

Vincent Gray sees irony in the controversy over group homes in some neighborhoods. He notes that retarded people often are as terrified of the "straight" world as their neighbors are concerned about them.

Smith, who cannot recall anything about his childhood or how he got to Forest Haven, said that a number of his friends in Forest Haven are refusing to leave because they like the routine of life there. He mentioned one friend, a man named Freddy, who collects radio and television parts in the basement of his building there. "He says he doesn't want to get in any trouble," Smith said. "He's afraid he'll get robbed."

"They say I'm doing real good now," said Smith, who has a job stuffing envelopes for the federal government, lives in a private home on upper Connecticut Avenue with five other retarded men, and has a girlfriend. "I'm in my good home now."