Producer prices edged up by 0.1 percent last month, as rising food prices offset a record decline in energy prices, the government reported yesterday.

The relatively small increase, following two months of declining producer prices, was welcomed by the administration as a sign of "continued moderation of inflation pressure," according to White House spokesman Larry Speakes.

But the recession, which has been a major factor in reducing inflation, continued last month, according to another set of government figures released yesterday. The Federal Reserve reported that industrial production fell 0.6 percent in April, the eighth monthly drop in the last nine months.

"The new report indicates that the recession will not end in the second quarter," Allen Sinai of Data Resources Inc. said yesterday. Commerce Department economist Robert Ortner agreed that the economy "has not turned around yet."

However, there is some evidence that the recession is slowing. The April decline in production was smaller than the 0.8 percent decline in March and the even larger drops during the winter. Earlier this week the Commerce Department reported a strong rise in retail sales, according to preliminary figures.

In addition, yesterday's Commerce Department report on producer prices said that raw materials prices, which are sensitive to changes in the economy, rose by 1.8 percent last month, after falling in each of the two prevous months.

Last month's increase in producer prices is equivalent to an annual inflation rate of 0.9 percent, the Commerce Department said. Producer prices rose at an annual rate of 0.4 percent in the first four months of this year, compared to a 7 percent increase during 1981.

The April increase in producer prices followed a rare two months of back-to-back declines in these prices. "I think that favorable trend had to be reversed," Sandra Shaber of Chase Econometrics said yesterday, adding, "but I don't think anyone should jump to the opposite extreme and think we're heading back to double-digit inflation."

The oil glut which slashed energy prices has kept producer price inflation almost flat so far this year, offsetting other price increases. Last month energy prices dropped by a record 5.2 percent. Until April, food prices had also helped to hold down overall inflation in most recent months, but last month they soared by 1.6 percent.

When both food and energy prices are excluded, other producer prices rose by 0.6 percent last month, the Commerce Department report said. This follows increases of just 0.2 percent in February and March.

Auto prices fell by 1.3 percent last month after rising in March when the rebate programs ended. Automobile production was also up sharply in April. However, the rise of more than 40 percent in auto assemblies since their "extraordinarily low rate in January" still left them "depressed compared to earlier periods," the Federal Reserve release said.

Economist Jerry Jasinowski of the National Association of Manufacturers said yesterday the report on industrial production showed "there's still a lot of weakness in other industrial sectors" despite the strong increase in auto production.

The recession continues to cut into business investment. Last month output of business equipment was down by 1.6 percent from March, bringing the decline over the last year to 8.5 percent.

Most analysts expect that a recovery will only really get under way this summer after the next installment of individual income tax cuts due in July. They also believe that a decline in interest rates from high levels is necessary to ensure strong recovery.

There have been slight declines in rates this week, which some analysts believe may continue.

The Federal Reserve yesterday reported an increase of $800 million in the M1 measure of the money supply in the week ended May 12, following a large decline in the previous week. This was slightly below the expected rise in M1, which includes all currency in circulation and all checking accounts.