President Carter and Syrian President Hafez Assad ended what was called an "extremely valuable, very informative" meeting tonight with no dramatic movement toward achieving a Middle East peace settlement soon.

In what Assad described before the session as an "atmosphere of great optimism," the two leaders met for more than four hours at the Intercontinental Hotel here.

The talks, according to national security adviser, Zbigniew Brzezinski, ranged over such issues as the future of the Palestinians. Israel's insistence on militarily secure borders and Carter's suggestion of establishing buffer zones between Israel and the Arab nations as an interim step toward a settlement.

In briefing reporters about the meeting, however, Brzezinski stressed that it was only a part of a "protracted process" aimed first at establishing "a wider area of understanding" among Carter and the Middle Eastern leaders.

Pressed for specifics, Brzenzinski would say only that there had been "some further exploration of possible solutions" during the talks, which he and Secretary of State Cyrus Vance also attended.

Assad established an unusually optimistic tone for the meeting this afternoon.

Speaking to reporters with Carter before their meeting, Assad, in what appeared to be off-the-cuff remarks, expressed optimism about achieving a Middle East peace settlement and credited "the expressions of President Carter on the subject" for creating on atmosphere of faith and encouraging atmosphere of optimism."

The optimistic tone was striking not only because of Assad's reputation as hardliner but because in recent days he has been described as among the most cautious of Middle Eastern leaders in viewing the prospects for a peace settlement in the near future.

But when Assad turned to his prepared statement he bluntly warned that Israel's continued occupation of territories captured in the 1967 war and the "homelessness" of the Palestinians "inevitably means the prolongation of a grave situation that threatens to renew the wars and tragedies from which our region has suffered for 30 years."

Carter, speaking without a text or notes, reiterated specifically his belief that a Middle East peace settlement must provide "a homeland for the Palestinians, . . . some resolution of border disputes" and "guarantees for the future security of these countries, which all can trust."

The President flew here from London this afternoon for his first encounter with Assad after a two-day economic summit conference with leaders of the United States' industrial allies and a meeting this morning on the status of Berlin.

Carter has already met in Washington with the other major leaders in the area - Yitzhak Rabin, before he took leave as prime minister of Israel: President Anwar Sadat of Egypt and King Hussein of Jordan.

But Assad, a key figure in any Middle East peace settlement, preferred to meet Carter here, in neutral Switzerland, rather than in Washington. The two leaders met in Assad's suite and then Carter later held a dinner for Assad.

Assad, has been considered a hardliner in dealing with Israel and a vocal champion of the Palestinians' cause. For years he was aligned with the Soviet Union, but recently has shown more openness toward the West.

Nonetheless, before meeting with Carter today, Assad made it a point to fly to Moscow last month for two days of talks with Soviet leader Leonid Brezhnev. Syria still depends on the Soviets for arms and is interested in maintaining a close relationship with them.

For Carter, much is riding on the outcome of his meetings with Assad and the other Middle East leaders. He has already invested considerable time, effort and person prestige in an attempt to reconvene the Geneva conference on the Middle East later this year.

American officials believe that prospects for peace in the Middle East are particularly good now because of the presence of relatively moderate Arab leaders, some of whom may not survive politically if there is no movement toward a settlement soon.

Carter struck this theme in his opening remarks, saying that 1977 "is a year when we are blessed with strong and moderate leaders in the Middle Eastern region.

"I believe it is a year of hope for substantial progress, but it can only be achieved with close consultation, open minds and a determination to succeed in spite of very difficult obstacles," he added.

Then Carter laid out his own formula for reaching a settlement:

"There must be fairness," he said. "There must be some flexibility. There must be a forgetting about past differences and misunderstandings. There must be determination."

Assad said that United States initiatives toward reaching a peace settlement "are basic and important.

"I sincerely hope that our talks will enhance the opportunities for peace, will throw light on the justice of our cause and will pave the way with clear ideas for the holding of the Geneva conference," he said.

Carter is expected to meet in Washington soon with acting Israeli Prime Minister Shimon Peres, who is expected to succeed Rabin if the Labor Party refrains power in Israeli's May 17 elections. He is to meet Prince FAHD of Arabia in Washington later this month.

He will then have had face-to-face encounters with all the involved Middle East leaders, after which Vance will be dispatched to the region for more detailed discussions of a possible Geneva conference.