A historic gathering of more than 14,000 Holocaust survivors and their relatives ended yesterday with Vice President Bush formally setting aside two federal buildings near the Mall to house a permanent memorial to the 6 million Jews slain as part of Adolf Hitler's "Final Solution."

The transfer of the buildings to the presidentially appointed U.S. Holocaust Memorial Council took place at a ceremony on the west steps of the Capitol at which Jewish leaders and U.S. government officials called for renewed attention to human rights as the best prevention against a recurrence of a Holocaust.

"Never again in the history of man will we allow human rights to be so viciously abused," Bush said, adding, "The Holocaust memorial museum will house this lesson you bring here today and it will document the unmentionable, the horrible. And yes, it will point the blame and it will credit the saviors. But most of all it will, because of you, teach. This museum will show what can happen . . . the Holocaust serves as a universal warning."

The museum, intended to memorialize one of the darkest moments in human history and serve as a warning against the potential for evil in human nature, has been five years in the planning. It will be housed in two two-story brick buildings between 14th and 15th streets SW.

The council hopes to raise almost $100 million in private funds to complement the $2.4 million in federal money allocated to the project. The museum is scheduled to open sometime in 1988.

Earlier in the day, survivors and members of the U.S. armed forces gathered in Arlington National Cemetery for a ceremony honoring members of the U.S. armed forces who died fighting Nazi Germany and liberating the inmates of the death camps.

In a third ceremony last night, the grounds of the Washington Monument were lit with hundreds of torches and candles as participants in the gathering closed their four-day reunion with a ceremonial meal of bread, cheese, fruit, and wine. The meal was to celebrate the establishment of the museum, which one speaker called "a center of study into man's inhumanity to man."

A hard-hitting speech by New York Mayor Edward I. Koch generated the greatest response from the crowd, estimated at 8,000 by the U.S. Park Police. Koch told the survivors that the world must be reminded of the Nazi persecution of Jews and of the failure of the U.S. government, despite official knowledge of what was happening, to take in Jewish refugees from Germany or pressure Hitler to stop the killings.

"The world knew and the world did nothing," Koch said. "What we remember, the world will remember whether it wants to or not, because remembering is a personal obligation, a moral obligation, a national obligation and an international obligation."

For most of those at the gathering, the largest of its kind ever held, it was a period of intense emotion, reliving the months and years in the concentration camps.

Some who came to Washington for the gathering could not bring themselves to take the final step into the Washington Convention Center, where most of the workshops and panel discussions took place. One man who had come with his daughter decided to stay in his hotel room rather than go to the center.

"This is a time of great difficulty for many people," said Rabbi Isaac Neuman of Champagne, Ill., a survivor of four years in the death camps.

But for many who did come there were moments to cherish the rest of their lives.

"I was looking for somewhere to find people from Radom, Poland," said Joseph Guttman, a survivor who now lives in Winnipeg, Manitoba. "I came specially to look for somebody I know."

A friend told Guttman about a table in the hall set up for people from Radom and that he had a cousin waiting for him there.

"So naturally I run. I find the table. I walk up to table, I say I am Joe Guttman from Radom."

Elias Snyder said he recognized his first cousin as he approached the table "because he is a perfect image of his father."

Both men last saw each other 44 years ago in their home village of Radom. Both were imprisoned in concentration and labor camps and lost every member of their immediate family. Each thought the other was dead.

"First of all we talked about the family, the family we lost," said Guttman, who took out family snapshots to show his cousin.

"We feel great because, you see, a survivor doesn't have much family," said Snyder, a retired dry cleaner who now lives in Boca Raton, Fla. "Now my kids will have more cousins and we found a brand new family we never knew we had before."