(Reuters) - The United States assured Afghanistan's leaders on Monday it would keep funding Afghan security forces at a targeted peak level of 352,000 personnel at least into 2017 to provide stability as foreign troops withdraw from the country.

The announcement by U.S. Defense Secretary Ash Carter came ahead of talks at the White House on Tuesday at which Afghan President Ashraf Ghani is expected to press his case for a slowing of the withdrawal of U.S. forces.

After a day of talks at the U.S. presidential retreat at Camp David, Carter, U.S. Secretary of State John Kerry and Afghan leaders were at pains to avoid getting ahead of the White House talks, at which Obama is expected to respond to Ghani's plea.

However, in response to a question at a joint news conference, Kerry said, "It’s our knowledge that President Obama is actively considering that request."

Ghani replaced Hamid Karzai as Afghan president last year and enjoys a much smoother relationship with Washington.

Earlier on Monday, he delivered an address to U.S. soldiers and military families at the Pentagon and sought to reassure Americans of the value of their sacrifice in lives lost and money spent in the battle against al Qaeda and other extremists in more than 13 years of war in Afghanistan.

Noting that more than 2,215 Americans had been killed and 20,000 wounded, he said, "Each one of you has left a legacy, but I also understand that Afghanistan has marked you."

Ghani's words of gratitude marked a sharp contrast with Karzai, who left office last year accusing the United States of inflicting a war on his country that intensified with the drawdown of U.S. forces.

With a more friendly partner in Ghani, U.S. officials acknowledge that conditions have changed since May when Obama declared that by the end of 2015 the U.S. force would be roughly halved from the current total of about 10,000 and would operate only from bases in Kabul and Bagram.

The U.S. military has been drawing up revised options and a senior U.S. official told Reuters last week the U.S. military bases in Kandahar and Jalalabad were likely to remain open beyond the end of 2015.

HIGH-LEVEL TALKS RESUME

Carter said pinning down the troop level the United States planned to finance was a way of providing "some stability to the Afghan security forces and a perspective into the future."

Carter announced the resumption of regular high-level diplomatic and defense talks with Afghanistan after a three-year gap, while Kerry unveiled a plan to "promote Afghan self-reliance" by using up to $800 million of U.S. aid money to promote Afghan-led reform and development work.

A senior Obama administration official acknowledged that due to heavy attrition caused by desertions and casualties, Afghan forces were currently well below the 352,000 level - possibly around 330,000 now.

An Obama administration official declined to forecast the amount of U.S. funding that would be required in 2017 but noted that the cost in 2015 was around $4 billion and estimated to be nearly that much in 2016.

Kerry said the continued U.S. commitments to Afghanistan, showed the Taliban and others the United States was "prepared for the long-term to support our friends.” He also said he hoped it would encourage peace efforts with the Taliban.