After two decades of refusing anything resembling an international handout, China has agreed to accept an initial $15 million from the United Nations and is looking for higher donations.

If China insists on its full share under a special allocation formula, diplomats here say, it would jump to the top of the list of U.N. Development Program recipients and create a growing drain on international aid funds.

Peking also is talking to the Japanese about receiving more than $8 billion in long-term, low-interest loans of a sort it had rejected when portraying itself as a benefactor of other developing nations less self-reliant.

"This has been a very fast evolution in the past six to nine months, from a donor attitude to a recipient attitude," said Nessim Shallon, the first resident representative of the U.N. Development Program in China.

U.N. officials say talks may soon be held on financial or technical assistance for China's planned national census and that a first batch of food worth about $500,000, supplied by the U.N. High Commissioner on Refugees, will soon arrive to help feed 250,000 refugees from Vietnam in southern China.

Diplomats point out that this is very different from accepting food for China's own population. Peking has remained unwilling to accept food for that purpose even in cases of natural disasters, such as the 1976 earthquake.

The Chinese occasionally have shown some sensitivity to the suggestion that they have abandoned their self-reliance policy forged when Moscow shut off aid 20 years ago. They insist they are only getting their share from U.N. programs they have contributed to over the years. Shallon said he admires China's own aid program, which has "helped about 50 countries in Africa and Asia especially."

But in the last two years China has virtually ended some major aid programs, including its assistance to Albania and Vietnam. Its initial draw of $15 million from the U.N. Development Program is more than the $6 million it has contributed to the same fund in the last seven years. Most of that contribution was spent inside China anyway for programs in which Peking invited Third World technicians to study Chinese methods in truck maintenance, acupuncture and other skills.

"We still insist on self-reliance in our economy as much as possible in order to avoid spending great amounts of hard currency abroad, but if aid is being offered like this with no conditions, then it is silly for us not to accept it," said one Chinese official.

The Chinese have sent up Shallon and a small staff in a 20-room building here formerly used by the Yugoslav Embassy. U.N. Development Program administrator Bradford Morse officially opened on Sept. 4 what he called the program's 109th field office. He described a "twoway process to which both China and UNDP will contribute."

Shallon listed several modest projects that would be funded in the first year, including work on pasture development in northern China where a lack of forage crops reduces the number of meat animals.

U.N. money and experts also will assist in improvising Chinese analysis of the weather data collected from a vast network of observation stations. Other projects will seek improvements in language training methods in China and in the data processing services of the Peking city government.